[Thread Prev][Thread Next][Index]

Re: [ferret_users] filling the gap with a given single value



Hi Steeven,

One way to do this would be to define a land/ocean mask using the etopo files that come with ferret. E.g.

use etopo40
let isOcean = if rose[d=1] le 0 then 1

You could then combine this with your own calculation below just to get the ocean region you want. I would use “shade” to fill in the missing data here.

Hope this helps,

Paul




On 3 Feb 2015, at 09:11, Steeven Paul Yerraguntla <steevenpaul@xxxxxxxxx> wrote:

Dear ferret users,
            I calculated Heat content ratio(HCR) between top 50 meters heat content(HC50) and HC above 20 degrees isotherm (HC_D20).  HCR is infinity ( when HC_D20 is zero or not available ie,. 20 deg isotherm reaches surface) which causes big white patches in the fill plot. I want to fill those white patche (data gap) with a value 1 without filling other missing data in coastal regions. MISSING funtion is useful but it is filling other missing data also (for example land region). Please let me know how can i make a logic to achieve it. Ferret script lines which i used for plotting are as follows. Please see attached example figure.
        use temp.cdf
        let d20 = temp[z=@loc:20]
        let mask_d20 = IF z[g=temp] LT d20 THEN 1
        let temp_d20 = mask_d20*temp
        let HCR= HC50/HC_D20
        fill/l=1/levels=(-inf)(0.2,1,0.1)(inf) HCR

<HCR.gif>


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

Privacy Policy | Disclaimer | Accessibility Statement