[Thread Prev][Thread Next][Index]

Re: [ferret_users] How to asign 1 to missing values (gaps) with exact mask



Hi,

I agree that your definition for the mask looks correct. What does a plot of "shade mask_var1" look like?

I don't know what might be causing what you are seeing. Is the variable var1 on exactly the same grid as rose from etopo5?  Even if both grids have the same resolution, maybe the grid cells are not quite defined the same way in both grids. Do you see NOTE's about "ambiguous coordinates" when Ferret draws the plot of rose*mask_var1? That would mean it was able to work with the two grids together in one _expression_, but that the coordinates were not the same in some way.

It would be a good idea to be sure that the grids are an exact match with a regridding operation:

   shade mask_var1[d=1, gxy=rose[d=2]]* rose[d=2]



On 9/22/2021 4:21 AM, Satyesh Ghetiya wrote:
Hi all,
  I want to assign value 1 to all missing values in variable var1. (left panel is var1) (also it is given that var1 is always more than 10 (always positive))
 I am aware that, for such mask, the syntax is 
 let mask_var1=if var1 gt 0 then 1/0 else 1
^ this will assign value 1 to all missing values (gaps) in var1.
 Now to visualise whether such a mask is proper or not, I have plotted the right side image which is rose*mask_var1 (rose being etopo5, a default dataset in ferret). So in the right panel, colour should come at the places where the left panel is white (gaps). But the colour is not coming in the right image corresponding to all white spaces of the left image. It only comes at the places where high gaps are there in the left image, small gaps are being kind of ignored. (gxy grids are the same in both the panels). Another instance is also given as the 2nd image.
What is the way to get EXACT such masks with exact gaps  ??

(I want 1 at the gaps, 1/0 elsewhere)

Thanks for the time,
G Satyesh,
India.

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

Privacy Policy | Disclaimer | Accessibility Statement