报错:
fatal:Could not open ($NCARG_ROOT/lib/ncarg/nclscript/csm/gsn_code.ncl)
fatal:error at line 1 in file test3.ncl
fatal:syntax error: line -1 before or near
fatal:error in statement
脚本:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
f = addfile("gmf.639.2013091500144.grb2 ","r")
vpt =f->TMP_PO_L100_GLLO
lat2d = f->lat_0
lon2d = f->lon_0
wks = gsn_open_wks(x11,pltName)
gsn_define_colormap(wks,"amwg")
res = true
res@tiMainString = "Native Lambert Conformal"
;************************************************
; lambert conformal projections are limited using
; the corners method rather than the latlon method
; seen for cylindrical equidistant projections
;************************************************
res@mpLimitMode = "Corners" ; choose range of map
res@mpLeftCornerLatF = lat2d@corners(0)
res@mpLeftCornerLonF = lon2d@corners(0)
res@mpRightCornerLatF = lat2d@corners(2)
res@mpRightCornerLonF = lon2d@corners(2)
;************************************************
; native lambert grids read in from grib files are
; different than those read in from netCDF files.
; NCL automatically looks for the parallel and
; meridian information on the grib file and attaches
; this information as attributes to the lat2d array.
;************************************************
res@mpProjection = "LambertConformal"
res@mpLambertParallel1F = lat2d@mpLambertParallel1F
res@mpLambertParallel2F = lat2d@mpLambertParallel2F
res@mpLambertMeridianF = lat2d@Lov ; ncl adds from grib file
res@pmTickMarkDisplayMode = "Always"
res@mpFillOn = False ; turn off map fill
res@mpOutlineDrawOrder = "PostDraw" ; draw continental outline last
res@mpOutlineBoundarySets = "GeophysicalAndUSStates" ; state boundaries
;****************************************************************************
; usually, when data is placed onto a map, it is TRANSFORMED to the specified
; projection. Since this model is already on a native lambert conformal grid,
; we want to turn OFF the tranformation.
;****************************************************************************
res@tfDoNDCOverlay = True
;****************************************************************************
res@cnFillOn = True ; color plot desired
res@cnLinesOn = False ; turn off contour lines
res@gsnSpreadColors = True ; use full range of colormap
res@gsnAddCyclic = False ; regional data