[ncl-talk] Displaying Lat in NARR Pres Hgt plot
cfdierking at alaska.edu
cfdierking at alaska.edu
Thu Aug 28 16:55:14 MDT 2014
Below is a simple script for plotting a cross-section from a NARR grib file.
It runs fine, but the result always plots the index number of the grid on the
X-scale. What would I need to do to plot latitude on the X-scale?
;***********************
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"
;===========================
begin
fnm = "merged_AWIP32.2013082200.3D.grb" ; filename
f = addfile (fnm , "r") ; add file
u = f->U_GRD_221_ISBL ; get u for January
lat2d = f->gridlat_221
u at lat2d = lat2d
wks = gsn_open_wks ("ps", "h_lat" ) ; open workstation
; ===========================
; Create a default plot
; ===========================
printVarSummary(u)
plot = gsn_csm_pres_hgt(wks, u(:,100,:), False )
end
;*****************************
;*****************************
Here is the output of the "printVarSummary" for the variable "u"...
Variable: u
Type: float
Total Size: 11214068 bytes
2803517 values
Number of Dimensions: 3
Dimensions and sizes: [lv_ISBL0 | 29] x [gridx_221 | 277] x [gridy_221 |
349]
Coordinates:
lv_ISBL0: [100..1000]
Number Of Attributes: 15
lat2d : <ARRAY of 96673 elements>
sub_center : The North American Regional Reanalysis (NARR) Project
center : US National Weather Service - NCEP (WMC)
long_name : u-component of wind
units : m/s
_FillValue : 1e+20
coordinates : gridlat_221 gridlon_221
level_indicator : 100
grid_number : 221
parameter_table_version : 131
parameter_number : 33
model : North American Regional Reanalysis (NARR)
forecast_time : 0
forecast_time_units : hours
initial_time : 08/22/2013 (00:00)
More information about the ncl-talk
mailing list