I need to compute daily climate
normals (30-yrs averages) from
a daily dataset (variable: var_dta),
with
dimensions of I:1385; J:596; L:10957.
As the machine memory is not large
enough for me to compute the normals for the
entire
field, I had to do so at each data point along the
i-dimension (1:1385) and
output the results to an intermediate nc file, using the
code below. (Potentially, I may have to do
so at each of xy data points. Printing out
values at each of all xy data points to
an ascii file takes too long!)
Unfortunately, I am getting an
error message (see below) and would
appreciate any help you may provide.
If you have a better way for
computing daily climate normals with a large dataset,
I'd appreciate it if you could share your method with
me.
Thanks,
--- Peng
------
! -
Define a daily modulo time axis
def
axis/t=0:365.2425/edges/npoints=365/t0=1-JAN-0001/units=days/modulo
tdaily
! –
Compute daily normals along i-dimension
sp rm -f v_ij.nc
repeat/range=1:`idm`/name=ii (;\
let v_ij=var_dta[i=`ii`] ;\
let v_norm=v_ij[GT=tdaily@mod] ;\
let v_std=(v_ij[GT=tdaily@modvar])^0.5 ;\
let v_min=v_ij[GT=tdaily@modmin] ;\
let v_max=v_ij[GT=tdaily@modmax] ;\
let v_npts=v_ij[GT=tdaily@modngd] ;\
save/file=v_ij.nc/app
v_norm,v_std,v_min,v_max,v_npts ;\
can var v_* ;\
)
**TMAP
ERR: Requested data range
is outside of data set limits
Expected: V_NORM[I= 2 : 2 ]
Found: V_NORM[I= 1 : 1 ]
LIST/FORMAT=CDF/file=v_ij.nc/app
v_norm,v_std,v_min,v_max,v_npts
The
same error message if I use
either one of the following two:
save/file=v_ij.nc/app/I=1 v_norm,v_std,v_min,v_max,v_npts
;\
save/file=v_ij.nc/app/I=`ii` v_norm,v_std,v_min,v_max,v_npts
;\