[Thread Prev][Thread Next][Index]

Re: [ferret_users] masking area



Hi Francois,
What is the error message you are seeing? The masking you describe can certainly be done. The topic to look at in the Users Guide is "conformability". As long as the X and Y axes are the same, then the XY grid will be promoted to an XYT grid by defining a variable with the multiplication.

If your grids do not match in X and Y, you could do a regridding in X and Y and then define the multiplication by the mask. Here are some commands outlining this. xy_var is in file xy_data.nc, xyt_var is in xyt_data.nc

yes? use xy_data.nc
yes? use xyt_data.nc

yes? let mask = xy_var[d=1,gxy=xyt_var]
yes? let masked_var = xyt_var * mask

If this is still not working out, please write back showing the error messages you are seeing.



DELCLAUX Francois wrote:
Hi Ferret users,
I would like to compute spatial and temporal average rainfall on a watershed.
The watershed is a (x,y) netcdf file (variable bv) (0 outside the basin, 1 inside the basin)
Rainfall field is a (x,y,t) netcdf file, (variable rain) with same spatial resolution as watershed.
So I have supposed that mutiplying rain by bv, I would get a rainfall field inside the wathershed.
But Ferret does not accept to multiply a (x,y) variable by a (x,y,t) variable.

In ferret documentation, masking areas are defined from 3d fields, so multiplication
are possible. But not in my case.

How can I do this quite simple operation ?

Thanks in advance.

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement