I'm seeing some odd behavior with the clmDayTLL function. It appears to be
related to having a latitude dimension of size 1 because when I change
my obs_3d to size (/nrows,ncols-1,1/), my script works just fine:
<code snippet>
dat = asciiread("training.csv",(/nrows,ncols+2/),"float")
utc_time = floattoint(dat(:,0:2)) ; year, month, day
ddd = day_of_year(utc_time(:,0),utc_time(:,1),utc_time(:,2))
yyyyddd = utc_time(:,0)*1000 + ddd
obs_3d = new((/nrows,1,ncols-1/),"float")
obs_3d!0 = "time"
obs_3d!1 = "lat" ; describing data as "lat/lon" to take
advantage of climatology functions
obs_3d!2 = "lon"
do c = 0,ncols-2
obs_3d(:,0,c) = (/dat(:,c+3)/)
end do
printVarSummary(obs_3d)
; Calculate stats
obsClmDay = clmDayTLL(obs_3d,yyyyddd) ; daily climatology at each location
printVarSummary(obsClmDay)
obsClmDay_sm1 = smthClmDayTLL(obsClmDay,1) ; smoothed daily climatology
obsClmDay_sm2 = smthClmDayTLL(obsClmDay,2) ; smoothed daily climatology
obsClmDay_sm3 = smthClmDayTLL(obsClmDay,3) ; smoothed daily climatology
<output>
Variable: obs_3d
Type: float
Total Size: 21916000 bytes
5479000 values
Number of Dimensions: 3
Dimensions and sizes: [time | 10958] x [lat | 1] x [lon | 500]
Coordinates:
Number Of Attributes: 1
_FillValue : 9.96921e+36
warning:VarVarWrite: Dimension names for dimension number (0) don't match,
assigning name of rhs dimension to lhs and overwriting coordinate variable,
use "(/../)" if this change is not desired
Variable: obsClmDay
Type: float
Total Size: 732000 bytes
183000 values
Number of Dimensions: 3
Dimensions and sizes: [lat | 366] x [1] x [lon | 500]
Coordinates:
Number Of Attributes: 3
long_name : Daily Climatology
information : Raw daily averages across all years
smoothing : None
(0) smthClmDayTLL: Warning: Usually expect year_day to be the dimension name
fatal:(missing) is not a dimension name in variable (clmDay), could not
determine dimension number
fatal:Execute: Error occurred at or near line 3969 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
-- Bridget Thrasher, PhD Independent Contractor, Research Scientist
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 12 11:37:19 2012
This archive was generated by hypermail 2.1.8 : Tue Mar 13 2012 - 14:00:14 MDT