[Thread Prev][Thread Next][Index]
Re: converting z axis
Hello Ufuk Utku Turuncoglu:
One way to use less memory is to do your cdf writing timestep
by timestep:
DEFINE AXIS/Z=1:1:1 znew ! same as your definition
LET slp2=slp+z[gz=znew]*0 ! easier than zaxreplace
SAVE/FILE=slp2.nc/L=1 slp2 ! write only the first timestep
REPEAT/L=2:1460 SAVE/FILE=slp2.nc/APPEND slp2 ! write the rest, one at a time
Note the use of the /APPEND qualifier on the LIST command.
By looping over the L values, only one slab of the grid is
brought into memory at a time. You can only append as simply
as this along a time axis (to APPEND along another axis see
the User's Guide Chapter 10 Section 2 Example 4).
Also note that SAVE is an alias for LIST/FORMAT=cdf.
Also note that ZAXREPLACE is not necessary, and is likely
to use a lot more resources (probably more memory, I think).
Regards ..... Billy K
> From: Ufuk Utku Turuncoglu <turuncogl1@itu.edu.tr>
> Date: Mon, 01 Sep 2003 17:23:13 +0300
> Subject: converting z axis
>
> hi,
>
> my variable is,
>
> name title I J K L
> SLP 4xDaily Sea Level Pressure 1:144 1:73 ... 1:1460
>
> and i want to chage K or Z axes to 1 level as fallowing variable
>
> name title I J K L
> SLP 4xDaily Sea Level Pressure 1:144 1:73 1:1 1:1460
>
> How can i do this ? i have done this using fallowing journal file but is there any easiest way doing it ?
> because my file size is big and this script uses large memory.
>
> DEFINE AXIS/Z=1:1:1 znew
> let sigma=0/SLP
> let SLP2= ZAXREPLACE( SLP, sigma, z[gz=znew])
> LIST/FORMAT=CDF/FILE=slp2.nc SLP2
>
> thanks,
>
> Ufuk Utku Turuncoglu
> Eurasia Institute of Earth Sciences
> Istanbul Technical University
> Turkey
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement