[Thread Prev][Thread Next][Index]
Re: [ferret_users] masking area
Hi Ansley,
In general, if the mask file doesnot have a time axis, there
should not be any problem while applying the mask/making the plot after
that. Since Francois faced some error messgae, i assumed that there is
a time axis for the mask file (at least with one time point). That is why
i explained about the messages in my earlier mail.
The other possibility for an error in masking is the incosistency of
X-Y grid as you mentioned earlier.
Thanks & Regards,
Jaison
On Tue, 22 Aug 2006, Ansley Manke wrote:
> Hi Jaison and Francois,
> I don't think there need be any messages about Ambiguous coordinates on
> the T axis. Here is an example, creating a MASK variable from one of the
> ETOPO datasets making sure it's on the same grid as the data variable,
> which is just a data set having a time axis accessed by an OPeNDAP
> address. The first part of this is just creating an example mask.
>
> ! Look at the data variable and grid
>
> yes? USE
> "http://ferret.pmel.noaa.gov/NVODS-FDS/LAS/COADS_2-degree_Standard/air1672"
> yes? SHOW DATA
> currently SET data sets:
> 1>
> http://ferret.pmel.noaa.gov/NVODS-FDS/LAS/COADS_2-degree_Standard/air1672
> (default)
> name title I J K L
> AIR Air Temperature Monthly 1st Sext 1:180 1:90 ...
> 1:2472
>
> ! Create a mask on the same XY grid
>
> yes? USE etopo60
> yes? LET mask = IF rose[GXY=air[d=1]] GT (-3000) THEN 1
> yes? SAVE/CLOBBER/FILE=mask.nc mask
> LISTing to file mask.nc
>
> yes? CANCEL DATA/ALL
> yes? CANCEL VAR/ALL
>
> ! Now use the same data and the mask we just made
>
> yes? USE
> "http://ferret.pmel.noaa.gov/NVODS-FDS/LAS/COADS_2-degree_Standard/air1672"
> yes? USE mask.nc
>
> yes? LET masked_air = mask[D=2] * air[D=1]
> yes? SET VIEW ul
>
> yes? SHADE/T=1-jan-1990 masked_air; GO land
>
>
> ! show the original data and the mask...
>
> yes? SET VIEW ll
> yes? SHADE/T=1-jan-1990 air[D=1]; GO land
> yes? SET VIEW lr
> yes? SHADE mask[D=2]; GO land
>
>
>
> Jaison Kurian wrote:
> > Hi,
> > If the mask variable "bv" is not having "any" time points, there
> > should not be any problem while multiplying "bv" with "rain". In this
> > case the show data command for "bv" should show empty Z and T axes as
> > follows:
> >
> > name title I J K L
> > BV Basin Mask 1:180 1:90 ... ...
> >
> > Suppose you have one time point for the variable bv, for L=1, there
> > will be a warning message as follows :
> >
> > "*** NOTE: Ambiguous coordinates on T axis: RAIN[D=1]*BV[D=2]"
> >
> > This can be ignored. But from the second time point onwards the
> > "rain*bw" will start complining as :
> >
> > **ERROR: illegal limits: BV is not in the range L=2
> > Axis extremes are L=1
> >
> > In this case you have to specify L=1 while multipling with rain
> > ..like
> >
> > let rain_basin = rain[d=1] * bv[d=2,l=1]
> >
> > This will fix the problem.
> >
> > If these tips doesnot help you, please send me the output of
> > "show data" command for those two datasets along with the error
> > messages (& multiplication line from the Ferret script).
> >
> > Regards,
> >
> > Jaison
> >
> >
> > On Tue, 22 Aug 2006, 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