[Thread Prev][Thread Next][Index]

Re: [ferret_users] extract values



I have done that in defining reg1 and reg2;
For example, reg1 corresponds to rectangular region bounded by 80-85 E and 22-25 N
you can define such rectangular boxes for each of your rectangula subregions.

However, if your region has irregular shape (i.e. can't be divided into rectangular boxes) then you need a shape file (or coordinate of the boundary) from which you can creat a NetCDF file and then use pt_in_poly function if ferret to creat the mask
 
Jagadish
On Monday, May 19, 2014 10:42 AM, Nitin Patil <nitinpatil85@xxxxxxxxx> wrote:


thanks for your quick reply but where to specify my irregular shape lat lon notation which i have to extract..

--
Regards,
Nitin Patil


On Mon, May 19, 2014 at 3:01 PM, jagadish karmacharya <j_karmacharya@xxxxxxxxx> wrote:
Hi Nitin,

Basically you need to define a mask over your area of interest. Since you area is made up of rectangular subregions and you know their coordinate this should be easy.

Here is an example:

load you data

! define your sub regions
let REG1 = if X[GX=PRECIP] GT 80 AND X[GX=PRECIP] LT 85 AND Y[GY=PRECIP] GT 22 AND Y[GY=PRECIP] LT 25 then 1         ! where precip is a variable in file you loaded
let REG2 = "X[GX=PRECIP] GT 83 AND X[GX=PRECIP] LT 88 and Y[GY=PRECIP] GT 25 AND Y[GY=PRECIP] LT 28" then 1
let mask= if ($reg1) or ($reg2) then 1

shade mask                                         ! plot the mask
shade precip[l=1,d=1]*mask                  ! masked precip
let pr_masked=precip[d=1]*mask
list pr_masked[x=@ave, y=@ave]          ! masked area average precip

Hope this helps
 
Jagadish
On Monday, May 19, 2014 6:39 AM, Nitin Patil <nitinpatil85@xxxxxxxxx> wrote:


Dear ferret users,

I want to extract the two regions ascii value from the netcdf. Please find the attached plot for the regions (I know the lat and lon of the selected regions).
Does anyone knows how to do this extraction in ferret.

--
Regards,
Nitin Patil






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

Privacy Policy | Disclaimer | Accessibility Statement