Project

General

Profile

Calculate the total grid cell area

Added by YUU YAN almost 5 years ago

Hi,

I want to calculate the ice extent based on the cal_area.nc file (attached), specifically, all grid cells with a concentration (variable siconc in nc file) greater than 0.15 are selected and then multiplied by the grid cell area and summed together.

Can anyone kindly tell me how to do this using CDO (siconc>0.15 & * grid cell)?

Thanks,

Yu


Replies (2)

RE: Calculate the total grid cell area - Added by Ralf Mueller almost 5 years ago

hi!

you input is on a curvilinear grid. CDO cannot automaticalle figure out the area of each cell. you can

  • (A) provide the area as a separate variable
  • (B) provide the bounds of the cells, so that CDO can compute the area

the command looks like

cdo -fldsum -mul gridarea.nc -setrtomiss,0,0.15 call_area.nc ice_extent.nc
if gridarea.nc holds the field with the grid area. or you use the expr operators like this:
cdo -fldsum -expr,'iceCov = (siconc > 0.5) ? siconc*cell_area : 0' -merge cal_area.nc gridarea.nc ice_ext.nc

hth
ralf

RE: Calculate the total grid cell area - Added by YUU YAN almost 5 years ago

Hi ralf,

Thanks so much! I created one grid area file as your suggestions, and it works.

Cheers,

Yu

    (1-2/2)