Regarding masking of ocean values
Added by Poulomi Ganguli almost 12 years ago
Hi,
For my analysis (in gridded precipitation data), I need to mask the ocean values using land mask ocean, which gives zero values at ocean. But in many months precipitation values are zeros. So, in order to distinguish from ocean values, I need to mask the ocean values using -999 (some flag), while keeping precipitation values as zeros. How I can achieve that..., any help will be appreciable...
Replies (3)
RE: Regarding masking of ocean values - Added by Ralf Mueller almost 12 years ago
Do you have a variable, that describes the land-sea-mask?
RE: Regarding masking of ocean values - Added by Poulomi Ganguli almost 12 years ago
The value of the variables are zero for ocean and 1 for land, 2 for lake. I want to mask the ocean value with -999 in my netCDF land-sea-mask. The file land-sea-mask is of 1 deg. resolution, which I am converting to 2 deg. before applying multiply operation to precipitation data.
RE: Regarding masking of ocean values - Added by Ralf Mueller almost 12 years ago
you can create missing values with division:
cdo div data.nc lsm.nc masked_data.nc
the default missing value is -9e33 (see here). you can set to other values with setmiss operators .