[Thread Prev][Thread Next][Index]

Re: [ferret_users] Re: Your Ferret email pot



Hi Fisseha,

It seems 2 Dsets have different grid size. You can try regriding one of the Dset to another.

Try this:
! suppose 1st and 2nd Dset loaded on ferret are global precipitation file and river basin file repectively
let mask =if var[d=2,l=1,gxy=precip[d=1]] eq 1 then 1        ! assuming variable in 2nd Dset is var and its value is 1 over the grid
let pre_masked=precip[d=1]*mask        ! this should give precip values only over the masked region and undefined else where.
!Now let's check if its OK
shade
pre_masked[l=10]
Let us know if this works.
 
Jagadish


From: FISSEHA G. BERHANE <fishcivilmu@xxxxxxxxx>
To: Ansley Manke <ansley.b.manke@xxxxxxxx>
Cc: ferret <ferret_users@xxxxxxxx>
Sent: Saturday, January 21, 2012 1:21 AM
Subject: [ferret_users] Re: Your Ferret email pot

Hello Ansley,

Thank you for your help. I am a beginner in ferret and I couldn't figure out how to mask it out. Can you help me? I have a global precipitation NetCDF data and I have also a NetCDF of a river basin. I wanted to have time series precipitation of the basin. I tried to make the precipitation data missing else where except in the basin. I created a global netcdf data with zero values by multiplying the precipitation data by zero, then made the river basin netcdf to have a value of 1. Then, I tried to add them up to get data  with values of zero and 1 to create mask  from it using those with value of 1 and then multiply the global precipitation data by the masking data. But I got this error message:

          "inconsistent sizes of data regions: X axis
          BL[D=1] has 263 points (I=000:262)
          _expression_ has 720 points (I=001:720)"


Do you have some idea to overcome this problem?
Thankfully,

Fisseha Berhane
PhD student
Johns Hopkins University
Baltimore, Maryland

--- On Fri, 1/20/12, Ansley Manke <ansley.b.manke@xxxxxxxx> wrote:

From: Ansley Manke <ansley.b.manke@xxxxxxxx>
Subject: Re: Your Ferret email pot
To: fishcivilmu@xxxxxxxxx
Date: Friday, January 20, 2012, 1:46 PM

(the subject line should have been Your Ferret email post!)

On 1/20/2012 9:40 AM, Ansley Manke wrote:
> Hi -
> I see that you posted a question to the Ferret Users List.  Your email address is not subscribed to the list. To have your question posted there, and to get everyone else's questions and answers sent to you, you need to subscribe.  Please follow the directions at the Email Users Group page,http://ferret.pmel.noaa.gov/Ferret/email-users-group  to subscribe.  Once you have done that and received mail back saying you are subscribed, then you can post messages to the list and everyone will get your question.
>
> A quick hint in the meantime, is that if you can describe the region with a mask, say 1 where you want data and the bad-flag elsewhere, then you can extract just that data; this is described in a section that's pointed to by the index entry "region, region(irregular)" in the index to the Users Guide:
>
> http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/XPRESSIONS#_VPINDEXENTRY_425
>
> There is also a function pt_in_poly, which you can look up in the Users Guide, and which might help in constructing this mask.
>
> But do ask on the Users List when you get subscribed.  People may have good examples, and if nothing else I'll re-post this answer so the information gets out to the user community.
>
> Ansley
>
>
> Hello dear Ferreters,
>
> Can some one help me how to extract NetCDF data by using an irrigular area =
> given by an other NetCDF, like extracting average precipitation time series=
> =A0 of a country using a NetCDF an administrative boundary of the country i=
> n NetCDF?
>
> Fish,
> Thank you,=20
>
>



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

Privacy Policy | Disclaimer | Accessibility Statement