Project

General

Profile

Mapping emissions of scandinavia

Added by Yousef Albuhaisi over 4 years ago

Dear All,

I am an extremely fresh user of CDO ( which I found so helpful) who is asking for help!

I am modelling CH4 emissions of Scandinavia, however, I have difficulties in getting my each cell emission value divided by its cell area.

my targeted area is within lon lat box 2,42,55,72 and I want to calculate my emissions over land area only.

Looking Forward.


Replies (13)

RE: Mapping emissions of scandinavia - Added by Ralf Mueller over 4 years ago

hi Yousef!

your input is a regular lonlat grid, so CDO can compute the area of each gridcell (operator: gridarea). In order to perform a division by it you might chain both streams like:

cdo -div <your input file> -gridarea <your input file> <your output file>

hth
ralf

RE: Mapping emissions of scandinavia - Added by Yousef Albuhaisi over 4 years ago

Hi Ralf,

It worked !! Thank you. one more question;

I want to know my total grid area(land only), and to have my emissions only on the land surface, not in all the lon lat box.

Thanks in advance.

Yousef

RE: Mapping emissions of scandinavia - Added by Ralf Mueller over 4 years ago

total sum would be

cdo -fldsum -gridarea <ifile>
for land-only I have to know, how to tell water from land.

RE: Mapping emissions of scandinavia - Added by Ralf Mueller over 4 years ago

basically you set the cells you want to ignore to missing_value and fldsum will ignore them

RE: Mapping emissions of scandinavia - Added by Yousef Albuhaisi over 4 years ago

I did the following,
I want to mask out see values, I created land-sea mask

cdo -f nc2 setctomiss,0 -gtc,0 -sellonlatbox,2,42,55,72 -remapcon,r3600x1800 -topo seamask.nc

cdo ifthen seamask.nc methane.nc methane_masked.nc

then;
cdo -div methane_masked.nc -gridarea methane_masked.nc methane_new.nc

but;
cdo -fldsum -gridarea methane_new.nc , gives an error! ( cdo fldsum (Abort): Too few streams specified! Operator needs 1 input and 1 output streams.)

RE: Mapping emissions of scandinavia - Added by Ralf Mueller over 4 years ago

cdo -fldsum -gridarea methane_new.nc 
you need to specify an output file. the rest looks fine to me

RE: Mapping emissions of scandinavia - Added by Yousef Albuhaisi over 4 years ago

Hi,

Thanks again.

A question about the area. The seamask.nc has an area of 3.7e+12 m2 which is the total area of the all target grid box. However, what I want is the area of the girds on lands which I could not have it yet :-( I don't know what problem I did.

RE: Mapping emissions of scandinavia - Added by Ralf Mueller over 4 years ago

could u upload the file?

RE: Mapping emissions of scandinavia - Added by Ralf Mueller over 4 years ago

I meant the seamask.nc file, sorry

RE: Mapping emissions of scandinavia - Added by Yousef Albuhaisi over 4 years ago

when I do ncview seamask.nc, it says all values are identical.

RE: Mapping emissions of scandinavia - Added by Ralf Mueller over 4 years ago

Yousef Albuhaisi wrote:

when I do ncview seamask.nc, it says all values are identical.

this is because it correctly ignors all missing values at sea points. land points are all 1

    (1-13/13)