Re: To extract data for all the time series

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue Jun 04 2013 - 22:14:38 MDT

Change the 0 to :. That is array syntax.

newtemp=temp(:,nm(0,0):nm(1,0),nm(0,1):nm(1,1))

PLease read the NCL Mini-Language Manual or the Reference manual at:
    http://www.ncl.ucar.edu/Document/Manuals/

On 6/4/13 9:56 PM, Jaya Pudashine wrote:
> Dear all,
> Here I have wrote this script to extract data for the selected grid. But it
> can only extract for time=0, How can I extract for all time series and
> save that extracted data in csv/txt file format. Please help me in this
> matter.
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>
> dir="C:\cygwin\data\1996_2001.nc"
> a=addfile(dir,"r")
> lat2d=a->lat
> lon2d=a->lon
>
> lat=(/27.6207,27.7752/)
> lon=(/86.254,86.7605/)
>
> nm=getind_latlon2d(lat2d,lon2d,lat,lon)
>
> print(nm)
> temp=a->tasmin
> newtemp=temp(0,nm(0,0):nm(1,0),nm(0,1):nm(1,1))
> print(newtemp)
>
>
>
> _______________________________________________
> 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 Tue Jun 4 22:14:41 2013

This archive was generated by hypermail 2.1.8 : Tue Jun 11 2013 - 12:03:58 MDT