Project

General

Profile

Adjusting land-sea mask

Added by Anne Moree over 4 years ago

Hi,

I have a land-sea mask where land is set to FillVal=0 and sea is of value 1.
I want the land area to decrease in size by 1 gridcell everywhere. So, where ever value==1 within a 1-gridcell range of a zero cell, the value is set to 0. Is there a way to do so with CDO? Instead of using 1 gridcell, it would also be OK to use an actual distance. Or something like 'if a zero cell is next to a cell that is 1, make it 1 as well'.

Thanks for thinking along,

Best wishes,

Anne


Replies (3)

RE: Adjusting land-sea mask - Added by Ralf Mueller over 4 years ago

hi Anne!

please upload the mask file. I can think about something with the smooth-operator. you might have a loog on slide 15 of this for some illustration of it.

cheers
ralf

RE: Adjusting land-sea mask - Added by Anne Moree over 4 years ago

Dear Ralf,

Thank you for thinking along. Find attached the file.
I found out already though that cdo smooth,radius=1deg is doing perfectly what I would like to do (also attached)!
Thanks again,

Cheers,
Anne

woa13_mask_surface.nc (300 KB) woa13_mask_surface.nc pre-industrial land-sea mask based on WOA2013
woa13_mask_surface_small.nc (299 KB) woa13_mask_surface_small.nc smaller land using cdo smooth,1deg

RE: Adjusting land-sea mask - Added by Ralf Mueller over 4 years ago

alright - happy to help u

cheers

    (1-3/3)