[Thread Prev][Thread Next][Index]

[ferret_users] Mask Greenland out of Dataset



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


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

Privacy Policy | Disclaimer | Accessibility Statement