[Thread Prev][Thread Next][Index]

[ferret_users] Re: Ferret - masking based on altitude

Did you see Joerg's answer in you other e-mail? If you manage to have both data sets on the same grid, this should be easy enough to go from there.

About the masking, you would need to do something like:
(assuming you have topography variable called "topo")

let mask1 = IF (topo GE 0 AND topo LT 100) THEN 1 else 1/0
let mask2 = IF (topo GE 100 AND topo LT 500) THEN 1 else 1/0

Then you need to create a new variable containing only the data in the level you want:
(assuming a variable called "rain")

let rain_100 = rain * mask1
let rain_500 = rain * mask2

Now all you need to do is compute your average anyway you want.

Let me know if you have more questions.

Best regards,

On 16 October 2015 at 05:38, simon EK <simonambat@xxxxxxxxx> wrote:
Dear Ferret users,

I have a daily rainfall dataset on .25x.25 grid and
I have a topography dataset with 1 minute resolution.

I would like to study the impact of altitude on rainfall.  Hence I would like to get spacial averages of rainfall over different altitude regions, say
0 to 100 meters
100 to 500 meters
500 to 1000 meters
and above 1000 meters.
I have seen certain ferret scripts  using masking, etc.

Can you pl. help me?


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

Privacy Policy | Disclaimer | Accessibility Statement