I am attempting to run a script using the NARR Dataset. The script runs
fine until I add in commands to zoom into Mississippi. The error message
reads:
(0) check_for_y_lat_coord: Warning: Data either does not contain a valid
latitude coordinate array or doesn't contain one at all.
(0) A valid latitude coordinate array should have a 'units' attribute
equal to one of the following values:
(0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north'
'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
(0) check_for_lon_coord: Warning: Data either does not contain a valid
longitude coordinate array or doesn't contain one at all.
(0) A valid longitude coordinate array should have a 'units' attribute
equal to one of the following values:
(0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east'
'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'
How can I fix this?
This is the full script:
;***************************************************************************
; narr_ncl_template.ncl
;
; Read NARR NCDC-NOMADS data
;
; Brittany Hailey 02/11/2013
; - Plotting NARR data
;
; Executea: ncl narr_ncl_template.ncl
;***************************************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
;*******************************************
; Open file and read in data
;*******************************************
dir = "/narrr-data/data/" ; input
directory
f = addfile (dir + "narr-a_221_20011231_0000_000.grb", "r")
;print(f)
;*******************************************
; Read variables and assign names
;*******************************************
latitude = f->gridlat_221
longitude = f->gridlon_221
dimlc = dimsizes(latitude)
nlat = dimlc(0)
mlon = dimlc(1)
u_wind = f->U_GRD_221_ISBL ; (lev,lat,lon)
u-windnclmponent
;*************create plots*******************
wks = gsn_open_wks ("ps", "narr_dft") ; Create output filename
and type
gsn_define_colormap (wks,"gui_default") ; choose color map
res = True ; plot mods desired for
original grid
;************************************************************
; Define NARR Map
;
res@mpLimitMode = "Corners" ; choose range of map
res@mpLeftCornerLatF = 30
res@mpLeftCornerLonF = -92
res@mpRightCornerLatF = 35
res@mpRightCornerLonF = -86
res@tfDoNDCOverlay = False
res@mpProjection = "LambertConformal"
res@mpLambertParallel1F = 50
res@mpLambertParallel2F = 50
res@mpLambertMeridianF = 253
; Define how map is to be displayed [gridlines, boundaries,
res@pmTickMarkDisplayMode = "Always"
res@mpFillOn = False ; turn off map fill
res@mpDataBaseVersion = "MediumRes" ; Allow plotting of counties
res@mpOutlineDrawOrder = "PostDraw" ; draw continental outline
last
res@mpProvincialLineColor = "Blue" ; Border color
res@mpProvincialLineThicknessF = 5 ; Border line thickness
; res@mpOutlineBoundarySets = "AllBoundaries" ; state/county boundaries
res@mpOutlineBoundarySets = "GeophysicalAndUSStates" ; state boundaries
; END NARR MAP
;**********************************************************************
res@cnFillOn = True ; color fill
res@cnLinesOn = False ; no contour lines
res@gsnSpreadColors = True ; use total colormap
res@gsnSpreadColorStart = 4
res@gsnSpreadColorEnd = -1
res@mpGridAndLimbOn = True
res@pmTickMarkDisplayMode = "Always" ; turn on tickmarks
res@tmXTOn = False
res@gsnAddCyclic = False ; regional data
res@gsnCenterString = "U-wind@"+u_wind&lv_ISBL2(8) + " hPa"
; draw center subtitle
res@gsnLeftString = "U Component Wind" ; draw
left subtitle
plot = gsn_csm_contour_map(wks,u_wind(10,:,:),res) ; Draw
original grid on map
end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Feb 13 13:19:22 2013
This archive was generated by hypermail 2.1.8 : Thu Feb 21 2013 - 11:26:43 MST