Switching longitude convention in a netcdf

From: HAVENER, KEVIN F GS-12 USAF AFWA 14 WS/WXED <kevin.havener_at_nyahnyahspammersnyahnyah>
Date: Thu Apr 17 2014 - 11:13:14 MDT

I have a grib1 file whose longitudes range from 0-360, is it possible to ncl_convert2nc the file to create a netcdf file whose longitudes range from -180 to 180? I've found a solution for grib2 but not grib1.

Background: Wesley Ebisuzaki has patched (not released yet) his netcdf converter in wgrib2 to properly create netcdf files with a monotonically increasing longitude ranging from -180 to +180. Before his patch, his regridding function must have just mathematically subtracted 360 for longitudes greater than 180 leaving the variable data intact (not moving it within the file). Converting that file to netcdf resulted in a file organized from 0 to +180/-180 to 0 which breaks netcdf specs. He fixed that and the data gets properly reordered along with the coordinate conversion. Now I'm trying to figure out how to do the same for grib1 files. Wesley's original wgrib doesn't do netcdf conversions, so can ncl do it? Or is there some other way to manipulate the grib1 file first that I'm not aware of?

Pardon this if the question has already been asked before, but I can't seem to search the archives.

Kevin Havener
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Apr 17 11:13:34 2014

This archive was generated by hypermail 2.1.8 : Tue Apr 29 2014 - 09:04:20 MDT