Project

General

Profile

Trying to convert non-normal, generic grid to a 1o x 1o lat/lon grid

Added by Tyler Herrington over 7 years ago

Hello,

I received a Rutgers Snow Lab netCDF containing monthly averaged snow cover values with a generic grid (dim = 7921, nx=89, ny=89) that I am trying to convert to a regular grid, however remapbil doesn't work (as lat/long are not coordinate values - merely just a variable), so I am unsure of what to use in order to convert the file to a regular grid?

I saw one community post discuss the use of genbil as a possible solution, but I believe that genbil requires lat/long to be coordinate variables?

Thank You,

Tyler Herrington

RutgersSnow.mon.mean.nc (53.9 MB) RutgersSnow.mon.mean.nc Monthly Mean snow cover values (non-normal, generic grid)

Replies (2)

RE: Trying to convert non-normal, generic grid to a 1o x 1o lat/lon grid - Added by Uwe Schulzweida over 7 years ago

You have to add a coordinates attribute to all data arrays. Use the NCO tool ncatted for this task. Here is an example:

ncatted -a coordinates,landmask,c,c,"lat lon" RutgersSnow.mon.mean.nc
ncatted -a coordinates,gridarea,c,c,"lat lon" RutgersSnow.mon.mean.nc
ncatted -a coordinates,snowcover,c,c,"lat lon" RutgersSnow.mon.mean.nc
ncatted -a coordinates,areacoverage,c,c,"lat lon" RutgersSnow.mon.mean.nc
Cheers,
Uwe

RE: Trying to convert non-normal, generic grid to a 1o x 1o lat/lon grid - Added by Tyler Herrington over 7 years ago

Hi Uwe - thank you for the suggestion.

I will give that a go.

Cheers,

Tyler

    (1-2/2)