Re: Problem to identify the grid for the study area and extract data from RCM

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Jun 03 2013 - 14:53:06 MDT

Since you have a curvilinear grid, you can't use coordinate subscripting here.

The "getind_latlon2d" function might work for you:

http://www.ncl.ucar.edu/Document/Functions/Contributed/getind_latlon2d.shtml

UNTESTED:

lats = (/27.1508,28.1067/)
lons = (/86.4339,86.0478/)
nm = getind_latlon2d(f->lat,f->lon,lats,lons)
newtemp = temp(0,nm(0,0):nm(1,0),nm(0,1):nm(1,1))

--Mary

On Jun 1, 2013, at 4:18 AM, Jaya Pudashine wrote:

> Dear All,
> I have got RCM data from Cordex with the following attributes
>
> 5 Variables : lat, lon, tasmin, time, height
> file global attributes:
> Conventions : CF-1.4
> contact : sms416@kongju.ac.kr
> creation_date : '2012-09-15 T02:44:17Z'
> experiment_id : historical
> experiment : Projection run with RCP historical
> driving_experiment : HadGEM2-AO, projection, r1i1p1
> driving_model_id : HadGEM2-AO
> driving_model_ensemble_member : r1i1p1
> driving_experiment_name : projection
> frequency : day
> institution_id : KNU
> institution : Kongju National University, Gongju, South Korea
> model_id : RegCM4
> model : Regional Climate Model, ICTP
> RCM_version_id : v4
> RCM_version : version 4.0
> project_id : CORDEX
>
> dimensions:
> ncl_scalar = 1
> south_north = 195
> west_east = 241
> time = 1800 // unlimited
> variables:
> double lat ( south_north, west_east )
> units : degrees_north
> long_name : latitude coordinate
> standard_name : latitude
> description : Latitude, South is negative
>
> double lon ( south_north, west_east )
> units : degrees_east
> long_name : longitude coordinate
> standard_name : longitude
> description : Longitude, West is negative
>
>
> I have used ncl to plot that RCM on the native grid
>
> ncl 0> f=addfile("1996_2001.nc","r")
> ncl 1> temp=f->tasmin
> ncl 2> newtemp=temp(0,:,:)
> ncl 3> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> ncl 4> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> ncl 5> lat=f->lat
> ncl 6> lon=f->lon
> ncl 7> newtemp@lat2d=lat
> ncl 8> newtemp@lon2d=lon
> ncl 9> wks=gsn_open_wks("x11","res")
> ncl 10> plot=gsn_csm_contour_map(wks,newtemp,False)
>
> I have attached that plot herewith.
>
> Now my problem is , I need to extract data only for study area. My study area ranges from 270903 N to 280624 N and 862602E to 86252 E. This RCM data has a resolution of 5KM. How I can identify those grids only covering my study area and extract data for only those grids for the whole period. Please help me in this matter.
>
>
>
>
>
> <Capture.JPG><myproblem.pdf>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jun 3 14:53:17 2013

This archive was generated by hypermail 2.1.8 : Tue Jun 04 2013 - 09:50:17 MDT