Two Questions about NETCDF and GRIB
Steven Chan
schan at FSU.EDU
Sat Feb 13 17:01:03 EST 2010
http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2/
If the grib format you want is grib2 then you can consider the NCEP
wgrib2 tool. If it is grib1 than it is quite a bit more tricky. NCEP has
a Fortran library called w3lib that you can try for doing I/O with
grib1; it may take some time and research to understand how it works --
there is a code example inside the Readme in w3lib tar file, but dealing
with the Grib header is tricky. A trick is to read from a similar grib1
file header, make necessary changes (like the date), and just change the
output data.
Steven Chan
On 2/12/2010 4:52 PM, Jeffrey Duda wrote:
> One way I know how to convert netcdf to grib is by using the WRF Post
> Processor (generally only works if the model you're running is the WRF
> though).
>
> Regarding the linear interpolation of time between sets, I don't think
> you can create new files that have interpolated data in them, but you
> can always compute the interpolated values yourself in Grads and just
> display them. For example, if you have wind speed 24 hours apart, you
> could compute a linearly interpolated value of wind speed at a given
> hour in between by defining a variable this way:
>
> define dwinddt = windspeed(t=t1) - windspeed(t=t0)/(24 hours, 1440
> minutes, 86400 s)
> display windspeed(t=t0) + dwinddt*(1 hr, 60 min, or 3600 s depending
> on what unit you want to use)
>
> Hope this helps.
>
> Jeff Duda
>
> On Fri, Feb 12, 2010 at 3:20 PM, Jason Snyder <jmssnyder at ucdavis.edu
> <mailto:jmssnyder at ucdavis.edu>> wrote:
>
> I am running an aerosol puff model that can only use GRIB data
> sets and also needs the data to be in hourly time steps. The data
> I currently have is in daily time steps and I was wondering if I
> could interpolate this data to have to display in hourly time steps.
> Also how do I convert netcdf to grib?
> Thanks,
> Jason
>
>
>
>
> --
> Jeff Duda
> Iowa State University
> Meteorology Graduate Student
> 3134 Agronomy Hall
> www.meteor.iastate.edu/~jdduda <http://www.meteor.iastate.edu/%7Ejdduda>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100213/f173f506/attachment.html
More information about the gradsusr
mailing list