Re: can the brace generate domain you specified in non lat/lon projection grid?

From: <dyjbean_at_nyahnyahspammersnyahnyah>
Date: Mon Jan 13 2014 - 00:05:02 MST

thank you for you reply.
latitude and longitude of my data is as follows:

print(lat)


Variable: lat
Type: float
Total Size: 376 bytes
            94 values
Number of Dimensions: 1
Dimensions and sizes: [lat | 94]
Coordinates:
Number Of Attributes: 3
  long_name : latitude
  units : degrees_north
  mode : time-invariant
(0) -88.54195
(1) -86.65317
(2) -84.75323
(3) -82.85077
(4) -80.94736
(5) -79.04348
(6) -77.13935
(7) -75.23505
(8) -73.33066
(9) -71.42619
(10) -69.52166
(11) -67.6171
(12) -65.71251
(13) -63.8079
(14) -61.90326
(15) -59.99861
ncl 5> print(lon)


Variable: lon
Type: float
Total Size: 768 bytes
            192 values
Number of Dimensions: 1
Dimensions and sizes: [lon | 192]
Coordinates:
Number Of Attributes: 3
  long_name : longitude
  units : degrees_east
  mode : time-invariant
(0) 0
(1) 1.875
(2) 3.75
(3) 5.625
(4) 7.5
(5) 9.375
(6) 11.25
(7) 13.125
(8) 15
(9) 16.875
(10) 18.75
(11) 20.625
(12) 22.5
(13) 24.375
(14) 26.25
(15) 28.125

the lat coordinate is gauss grid , and the longitude grid is unformly increasing, they are 1-dimensional arrays.
my variable such as float TBOT ( time, lat, lon ) , 3-dimension.

in terms of your advices, i can extract some domain with TBOT(:,{xstart:xend}, {ystart,yend}) regardless of the lat/lon type

thanks



dyjbean@gmail.com

From: Dave Allured - NOAA Affiliate
Date: 2014-01-13 12:58
To: dyjbean@gmail.com
CC: ncl-talk
Subject: Re: [ncl-talk] can the brace generate domain you specified in non lat/lon projection grid?
What do your lat and lon coordinate variables look like? printVarSummary (lat) and printVarSummary (lon).


Yes you can use "coordinate subscripting" (curly braces) if the lat and lon coordinate variables are 1-dimensional, but not if they are 2-dimensional.


E.g. coordinate variable lat(lat) can be subset with coordinate subscripting {latstart:latend}. However, lat(x,y) can not be subset with coordinate subscripting, except var(:,{xstart:xend}, {ystart,yend}) is okay. But that may not be what you want, because x and y are often NOT latitude and longitude, but something else like index numbers, or meters on a UTM grid.


Published data sets on Gaussian grids are commonly made with 1-D coordinates. There are alternate subscripting methods for 2-D coordinate variables.



--Dave
(Please include user list in replies.)



On Sun, Jan 12, 2014 at 9:04 PM, dyjbean@gmail.com <dyjbean@gmail.com> wrote:

hi,
  if data projection is not usually regular lon/lat but gauss projection,and its dimensionality is
time*lat*lon, i want to specify some domain, can the notation in var(:,{latstart:latend},{lonstart:lonend})
show the correct area specified ?

thanks




dyjbean@gmail.com


_______________________________________________
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

bg.jpg bg_01-13-14-51-05_.jpg
Received on Mon Jan 13 00:06:30 2014

This archive was generated by hypermail 2.1.8 : Sun Jan 19 2014 - 21:56:35 MST