Question about coordinates

From: Erik Noble <enoble_at_nyahnyahspammersnyahnyah>
Date: Thu, 04 Dec 2008 00:58:50 -0500

Dear NCL,
Could I please have help with getting over this hurdle? It is still tough to
comprhend.
I need help understanding the proper way to get read this variable with
specific coordinates. My simple goal is to have a rain variable at between
the coordinate range {5:15},{-10:10} so that I can have fun, plot it,
perhaps, make a time vs. longitude plot, etc... :-).

When I use this command on one file, it works:
f = addfile ("TRMM_HDF-Daily_precip.nc","r")
 r=f->precipitation
 rain = r(:,{5:15},{-10:10})

Yet when I do this for another file (a WRF file) I get the error
 a = addfile(³wrfout.nc²,²r²)
nc = a->RAINNC(:,{5:15},{-10:10})
fatal:Dimension (west_east) of file (wrfout_d01_2006-09-01_00:00:00) does
not have an associated coordinate variable
fatal:Execute: Error occurred at or near line 114

I donıt know how to read this using standard subscripting because I donıt
know the indices. I understand, using printVarSummary command, that its
coordinates are not 1D ³lat² and ³lons² but 3D XLAT and XLONG (indicated
below). But how can I call in the variable or at least get the variable
between the coordinates above? Do I have to specifically name the
coordinates?

Any advice will be appreciated and I will be forever grateful, mainly
because the misunderstanding of this concept has been the source of most of
mytalk questions.
Sincerely,
Erik

Ncl 131> nc = a->RAINNC
ncl 132> printVarSummary(nc)

Variable: nc
Type: float
Total Size: 1047200 bytes
            261800 values
Number of Dimensions: 3
Dimensions and sizes: [Time | 17] x [south_north | 110] x [west_east |
140]
Coordinates:
Number Of Attributes: 6
  FieldType : 104
  MemoryOrder : XY
  description : ACCUMULATED TOTAL GRID SCALE PRECIPITATION
  units : mm
  stagger :
  coordinates : XLONG XLAT

cl 141> xlat= a->XLAT
ncl 142> printVarSummary(xlat)

Variable: xlat
Type: float
Total Size: 1047200 bytes
            261800 values
Number of Dimensions: 3
Dimensions and sizes: [Time | 17] x [south_north | 110] x [west_east |
140]
Coordinates:
Number Of Attributes: 5
  FieldType : 104
  MemoryOrder : XY
  description : LATITUDE, SOUTH IS NEGATIVE
  units : degree_north
  stagger :

ncl 143> xlong = a->XLONG
ncl 144> printVarSummary(xlong)

Variable: xlong
Type: float
Total Size: 1047200 bytes
            261800 values
Number of Dimensions: 3
Dimensions and sizes: [Time | 17] x [south_north | 110] x [west_east |
140]
Coordinates:
Number Of Attributes: 5
  FieldType : 104
  MemoryOrder : XY
  description : LONGITUDE, WEST IS NEGATIVE
  units : degree_east
  stagger :
 

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Dec 03 2008 - 22:58:50 MST

This archive was generated by hypermail 2.2.0 : Thu Dec 11 2008 - 03:51:46 MST