6. Optional: regrid UPP using wgrib2

6. Optional: regrid UPP using wgrib2
arbetter Mon, 10/26/2020 - 11:54

UPP grib2 output is on the same grid as the model output, which for the MRW is a Guassian grid. The specifications for a simple lat-lon projection are:

-new_grid latlon lon0:nlon:dlon lat0:nlat:dlat

Variable  Description
lon0/lat0 Longitude/Latitude of first grid point in degrees
nlon/nlat Number of Longitudes/Latitudes
dlon/dlat Grid resolution in degrees of Longitude/Latitude

 

Move to the run directory and run the following example.

cd $CASEROOT/run
wgrib2 GFSPRS.GrbF12 -new_grid_winds earth -new_grid latlon 0:1440:0.25 90:721:-0.25 GFSPRS.GrbF12.latlon

This would interpolate to a 0.25 degree latitude-longitude grid with earth-relative winds (U-wind goes east, V-wind goes north).

You can check the new grid by again using wgrib2. We will print out the info just for the SFEXC field rather than list all fields.

wgrib2 -V GFSPRS.GrbF12.latlon | grep SFEXC -A6
717:1042392327:vt=2019082912:surface:12 hour fcst:SFEXC Exchange Coefficient [kg/m^2/s]:
    ndata=1038240:undef=0:mean=0.013828:min=0:max=0.187
    grid_template=0:winds(N/S):
        lat-lon grid:(1440 x 721) units 1e-06 input WE:NS output WE:SN res 48
        lat 90.000000 to -90.000000 by 0.250000
        lon 0.000000 to 359.750000 by 0.250000 #points=1038240

For more examples, you can refer to the wgrib2 site.