copygb is a program to change grids of a grib file. It
can be used to make regional subsets, change the resolution.
and the projection. It's a nifty program.
The support for copygb is limited to bug fixes of the g95 version
running on linux (i386). (Poor documentation doesn't count as a bug.)
If you need to port the code to another system, good luck as you are
on your own. If you don't understand the directions, read them again.
WRF users can get copygb support through regular WRF support.
The codes are available from
ftp://ftp.cpc.ncep.noaa.gov/wd51we/copygb
Files dated before 1/2005 are for historical continuity.
How to make custom lat-long grids with copygb
NX = number of points on latitude cirle
NY = number of points on longitude meridian
LAT0 = latitude of origin * 1000 (lat = -90 .. 90)
LON0 = longitude of origin * 1000 (lon=-360 .. 360 ?)
LAT1 = latitude of extreme (last) point * 1000
LON1 = latitude of extreme (last) point * 1000
DX = latitudianal increment * 1000 (sign used)
DY = longitudinal increment * 1000 (sign used)
grid='255 0 NX NY LAT0 LON0 128 LAT1 LAT2 DX DY 64'
copygb -g"$grid" -x in.grb out.grb
ex 0.1 x 0.1 degree grid from 25N to 45N and from 90W to 70W.
grid='255 0 201 201 25000 270000 128 45000 290000 100 100 64'
copygb -g"$grid" -x in.grb out.grb
The resultant grid is W to E, S to N.
Copygb understands winds. If one considers the interpolation near the poles, one
quickly realizes that vector quantities need a different interpolation scheme than
scalars. Consequently one can not interpolate the zonal (meridional) wind component
without having the corresponding meridonal (zonal) wind component in the same grib file.
If only one component is available, copygb will not do an interpolation.
comments/questions: Wesley.Ebisuzaki@noaa.gov, (Wesley Ebisuzaki,
Climate Prediction Center, National Centers for Environmental
Prediction, 5200 Auth Rd, Camp Springs, MD, 20746, USA)
|