Project

General

Profile

remapping NOAA NDFD files

Added by Joseph S 12 months ago

Greetings everyone! In most situations, the remapping options in CDO are smooth and produce flawless results, but remapping the NOAA NDFD files produces odd results for me.

As a background, the griddes for the original file is:

gridID 1
gridtype = projection
gridsize = 2953665
xsize = 2145
ysize = 1377
xname = x
xunits = "m"
yname = y
yunits = "m"
xfirst = 0
xinc = 2539.703
yfirst = 0
yinc = 2539.703
grid_mapping = Lambert_Conformal
grid_mapping_name = lambert_conformal_conic
standard_parallel = 25.
longitude_of_central_meridian = 265.
latitude_of_projection_origin = 25.
earth_radius = 6367470.
false_easting = 2761586.78941561
false_northing = 263635.033951474
longitudeOfFirstGridPointInDegrees = 238.445999
latitudeOfFirstGridPointInDegrees = 20.191999

Its grid type is 'projection' and its grid mapping is Lambert_Conformal.

An example of the original input file, as viewed in the Unidata IDV software appears below:

The original file format is grib2 and it's located at the URL below:
https://app.box.com/s/8jq4xroygee828ahga06c6dinb8gd5co

I used CDO to remap the file using the command below:

cdo -sellonlatbox,-90,-86,29,32 -remapnn,global_0.1 -setmissval,0 -setvrange,0,10 YKUZ98_KWBN_202211101120 test5.grb2

The results of the remapped data appear diagonally-staired with large gaps, as shown below:

The griddes of the new output file is:

gridID 1
gridtype = lonlat
gridsize = 1200
xsize = 40
ysize = 30
xname = lon
xlongname = "longitude"
xunits = "degrees_east"
yname = lat
ylongname = "latitude"
yunits = "degrees_north"
xfirst = 270.05
xinc = 0.1
yfirst = 29.05
yinc = 0.1

The new output file is available here:
https://app.box.com/s/urgbt3ruxc0hjulwjt4lvy0sxtda4ooo

Can anyone kindly recommend the correct cdo command syntax to remap the NOAA NDFD files in cdo? My ultimate goal is to use the remapbil function to subset individual data points as I typically do with the ERA5 reanalyses (and numerous other datasets). Many thanks!!! :-)

Kind regards,
Joseph


Replies (3)

RE: remapping NOAA NDFD files - Added by Estanislao Gavilan 12 months ago

Hi Joseph,

I have tried to convert your grib file to netcdf, but the resulting file does not make sense to me. Can you convert it to netcdf? It will be easier for me to see if there is anything wrong.

Kind regards,

Estanislao

RE: remapping NOAA NDFD files - Added by Karin Meier-Fleischer 11 months ago

Hi Joseph,

there is something wrong how the GRIB file was written. I've tried to plot the original grib file with Python and it shows a 'mirrored' image.

On stackoverflow is a hint how you can solve the problem

... The WE|EW:SN need to be changed to WE:SN. ...

See https://stackoverflow.com/questions/69681494/ndfd-grib2-how-to-fix-mirrored-data-when-using-xarray

image.png (40.3 KB) image.png

RE: remapping NOAA NDFD files - Added by Joseph S 10 months ago

Karin and Estanislao,

Many thanks for your responses and attempts to help. Karin, I'm looking into your potential solution. Thank you!

Kind regards,
Joseph

    (1-3/3)