Project

General

Profile

problem with dividing a file with the gridarea

Added by Natalia L about 4 years ago

Hi,

I have a gridded netcdf file in lonlat projection (attached test.nc) with one band. I want to divide the band with the grid cell area (in m2). I do the following;

cdo gridarea test.nc gridarea_test.nc
cdo div test.nc gridarea_test.nc test_m2.nc

The file grid area_test.nc seems correct. However the final file test_m2.nc with the division it isn't correct. Do I use the correct command?

I used cdo v.1.9.2.

Thank you,

Nat


Replies (3)

RE: problem with dividing a file with the gridarea - Added by Natalia L about 4 years ago

Natalia L wrote:

Hi,

I have a gridded netcdf file in lonlat projection (attached test.nc) with one band. I want to divide the band with the grid cell area (in m2). I do the following;

cdo gridarea test.nc gridarea_test.nc
cdo div test.nc gridarea_test.nc test_m2.nc

The file grid area_test.nc seems correct. However the final file test_m2.nc with the division it isn't correct. Do I use the correct command?

I used cdo v.1.9.2.

Thank you,

Nat

edit: The problem is than in m2_test.nc file most values are zero (Nan)

RE: problem with dividing a file with the gridarea - Added by Ralf Mueller about 4 years ago

I think the problem is that your missval is ZERO. If you change it, the division does work. you can do this with

cdo -setmissval,9E-38 test.nc test_.nc

hth
ralf

RE: problem with dividing a file with the gridarea - Added by Natalia L about 4 years ago

Hi Ralf,
thank you. It seems it doesn't work again. Did you try to run the division with the attached test.nc file? Did you get the same spatial pattern on both files (test.nc, m2_test.nc)?

Best,
Natalia

    (1-3/3)