Hi NCL
I am simply trying to plot Reanalysis data over a certain regaion. I
am having trouble reading in the data.
I keep getting the error :
fatal:Subscript out of range, error in subscript #0
Why am I getting this error?
If my data file is described as follows:
netcdf met_em.d01.2005-08-28_12:00:00 {
dimensions:
Time = UNLIMITED ; // (1 currently)
DateStrLen = 19 ;
west_east = 149 ;
south_north = 89 ;
num_metgrid_levels = 27 ;
num_sm_levels = 4 ;
num_st_levels = 4 ;
south_north_stag = 90 ;
west_east_stag = 150 ;
z-dimension0012 = 12 ;
z-dimension0016 = 16 ;
z-dimension0024 = 24 ;
float SKINTEMP(Time, south_north, west_east) ;
SKINTEMP:FieldType = 104 ;
SKINTEMP:MemoryOrder = "XY " ;
SKINTEMP:units = "K" ;
SKINTEMP:description = "Skin temperature (can use for
SST also)" ;
SKINTEMP:stagger = "M" ;
float PSFC(Time, south_north, west_east) ;
PSFC:FieldType = 104 ;
PSFC:MemoryOrder = "XY " ;
PSFC:units = "Pa" ;
PSFC:description = "Surface Pressure" ;
PSFC:stagger = "M" ;
and my NCL code up to the point where I read in the data is as
follows, why the error?
;----------------------------------------------------------------------------
; Begin plotting code
;----------------------------------------------------------------------------
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/shea_util.ncl"
;************************************************
begin
;************************************************
; read in netCDF file
;************************************************
a = addfile("/ptmp/noble/WPS/met_em.d01.2005-08-28_12:00:00.nc","r")
;************************************************
; read in variables
;************************************************
slp= a->PMSL(1,:,:)
st = a->SKINTEMP(1,:,:)
st =(st-273)*(9/5)+32 ;SkinTemp in F
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Mar 10 2007 - 15:30:21 MST
This archive was generated by hypermail 2.2.0 : Mon Mar 12 2007 - 11:26:34 MDT