[gradsusr] Saving NetCDF lon parameter in geographic

Mark Hess mhess at oceani.com
Thu Apr 12 15:57:53 EDT 2012


I have a NetCDF file which I can ingest and display in GrADS with out a problem.  The LON parameter is set to a 0-360 grid as opposed to 0-180W & 0-180E (or 0 to 180 for east and 0 to -180 for west).  If I "set lon 239 244" and then display my variable of interest (in this case U), the data display properly showing the data between 116W-121W (116W equaling -116=244-360 and 121W equaling -121=360-239).  That all is fine until I try to save my geographically subsetted area to a new .nc file using the sdfwrite function.  The file saves fine, but it saves the LON information in the 0-360 format instead of the 0 to -180 format which I need for another application.  Is there a way to either 1) save the new, subsetted .nc file with the lons converting to the in 0 to -180 format as part of the process or 2) convert the lon format within GrADS first and then save the new .nc file with the lon values in the format I want?  Can I subtract 360 from my "lon" variable to create a 'new' lon variable?

Thanks,

Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120412/6d0e81c4/attachment-0003.html 


More information about the gradsusr mailing list