[gradsusr] problem wiht sdfwrite in saving 4D netcdf data
James T. Potemra
jimp at hawaii.edu
Thu Feb 6 15:48:32 EST 2014
Pankaj,
It looks like you are only specifying lon and lat, then writing to the
netCDF file. Did
you try set time and level? E.g.,
'set lon 0 360'
'set lat -90 90'
'set t 1 12'
'set z 1 10'
'sdfwrite var'
Jim
On 2/5/14 11:37 PM, pankaj kumar wrote:
> Hi,
>
> If someone can look into my problem.... I am writing a set of data
> into netcdf format using GRADS from 4D global netcdf data for 1 year.
> I am using sdfwrite command to generate netcdf file, however, the
> output is generated for the final time and final vertical layer only
> though the grads-display shows the script is running for all layers
> and for all time. The problem is that netcdf output is not saved for
> all layers and all time but for the final time and layer. Please
> suggest me some corrections in my script which is mentioned below.
>
> 'set lon 0 360'
> 'set lat -90 90'
>
> #'set gxout fwrite'
> 'set sdfwrite ncdata.nc'
> 'sdfwrite var'
>
> t=1
> while(t<=12)
> 'set t 't
> z=1
> while(z<=10)
> 'set z 'z
> 'define avg = aave(var,g)'
> 'd var'
> z=z+1
> endwhile
> t=t+1
> endwhile
>
> Thank you and Regards
> Pankaj
> ees, hokkaido university
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140206/eb8d59f7/attachment.html
More information about the gradsusr
mailing list