[Thread Prev][Thread Next][Index]

Re: [ferret_users] regarding masking of a particular section on a spatial plot



Thanks a lot Abhisek Sir for your quick help my problem has solved from your suggestion. Many Thanks.

regards, saurabh

On Mon, Jul 31, 2017 at 7:14 PM, Abhisek Chatterjee <chatterjeea.ocean@xxxxxxxxx> wrote:
Dear sourabh,

You may try as the following to create a mask


let mask = if x[gx=myvar] gt 0 and  x[gx=myvar] lt 60 and y[gy=myvar] gt 33 and y[gy=myvar] lt 65 then 0 else 1

! Now create a new variable 

let new_var=myvar*mask

Hope this will help you,

Regards,
Abhisek


On Mon, Jul 31, 2017 at 2:00 PM, saurabh rathore <rohitsrb2020@xxxxxxxxx> wrote:
Dear Ferreters,

Is there nay way to mask out the particular box of lat-lon in the data. As I want to mask the box of 0-60E and 35N-63N in the attached plot the data that I plotted is the ocean temperature which is a 4-d data in lat, lon, depth and time this is the plot for l=1,k=1. So I just want to mask that area in my data.

I tried like this

let mask_mar2=if var[x=0E:80E,y=33N:63N] eq var[x=0E:80E,y=33N:63N] then (0/0)
let var_mask=var*mask_mar2[gxy=var]

or I tried like this way also

let mask_mar2=if var[x=0E:80E,y=33N:63N] ne var[x=0E:80E,y=33N:63N] then 1
let var_mask=var*mask_mar2[gxy=var]

but in both the cases I am not successful to mask out this box. Please Help.

regards, saurabh

--


REGARDS

Saurabh Rathore
Research Scholar (PhD.)
Centre For Oceans, Rivers, Atmosphere & Land Science Technology
Indian Institute Of Technology, Kharagpur
contact :- 91- 8345984434




--


REGARDS

Saurabh Rathore
Research Scholar (PhD.)
Centre For Oceans, Rivers, Atmosphere & Land Science Technology
Indian Institute Of Technology, Kharagpur
contact :- 91- 8345984434

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

Privacy Policy | Disclaimer | Accessibility Statement