Dear All,
I have written a code to extract a region for particular latitude and
longitude and it gives me error in the end asking me what is x. Can you
guide me on this . Thank you
;*******************************************
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"
a =addfile("~/Documents/Snow_cover_IMS/nhsce_v01r01_19661004_20140602.nc
","r")
sce=a->snow_cover_extent(:,:,:)
lat=a->latitude
lon=a->longitude
;Attaching latitude and longitude to sce
sce@lat2d=lat
sce@lon2d=lon
printMinMax(lat, True)
printMinMax(lon, True)
latN = 60 ; Western Eurasia [*rough*]
latN = 40
lonW = 10
lonE = 30
ji = region_ind (lat,lon, latS, latN, lonW, lonE)
jStrt = ji(0) ; lat start
jLast = ji(1) ; lat last
iStrt = ji(2) ; lon start
iLast = ji(3) ; lon last
LAT2D = lat(jStrt:jLast,iStrt:iLast)
LON2D = lon(jStrt:jLast,iStrt:iLast)
printMinMax(LAT2D, True)
printMinMax(LON2D, True)
; read data just for the region of interest
x = sce->(jStrt:jLast,iStrt:iLast,:,:)
Received on Tue Jul 22 11:18:22 2014
This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:47 MDT