[Thread Prev][Thread Next][Index]

[ferret_users] Re: Mask Greenland out of Dataset



I was able to do this by integrating and subtracting the area over Greenland

 let swe_cesm_masked = swe[x=@din,y=0:90@din] - swe[x=65w:15w@din,y=60n:85n@din]
save/file=swe_cesm_masked.nc swe_cesm_masked

But it would be nice to have a more exact mask for exactly the region that covers greenland and not the box I created.

Thank you!




On Sun, Jun 2, 2013 at 1:36 PM, Matthew Cooper <mguycooper@xxxxxxxxx> wrote:
Hi all,

I would like to mask out Greenland from climate model output of N.Hemisphere snow cover. Variable is called swe and l=5 is a March so max snow cover this month. I've tried the following to remove Greenland from the dataset:

yes? let swe_cesm_masked = if(swe[y gt 60n and y lt 85n and x gt 65w and x lt 15w]) gt 0 then swe[y gt 60n and y lt 85n and x gt 65w and x lt 15w] eq 0 else swe 

But I get swe=0 everywhere, not just in the specified region. I also tried to use a set region command:

set region/x=65w:15w/y=60n:85n
sha swe[l=5]
let green_mask_cesm = if swe[l=5] gt 0 then 0 else swe

Then i tried to multiply the green_mask_cesm by the original dataset to set all greenland values to 0 but again I get 0 everywhere on the globe. 

also tried setting the region and then specifying greenland limits:

set region/x=65w:15w/y=60n:85n
sha swe[l=5]
let green_msk_cesm = if swe[l=5, y gt 60n and y lt 85n and x gt 65w and x lt 15w] gt 0 then swe[y gt 60n and y lt 85n and x gt 65w and x lt 15w] eq 0 else swe
sha swe[l=5]*green_msk_cesm[l=5]

but it seems that no matter what I try I get 0 everywhere. 

Thank you for any suggestions.

Matt
--
Matt Cooper
M.S. candidate, Water Resources Science
College of Earth, Ocean and Atmospheric Sciences
Oregon State University




--
Matt Cooper
M.S. candidate, Water Resources Science
College of Earth, Ocean and Atmospheric Sciences
Oregon State University


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement