- 积分
- 36
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-4-10
- 最后登录
- 1970-1-1

|
GrADS
系统平台: |
linux |
问题截图: |
|
问题概况: |
想画个nc文件的surface pressure的图,画不出来。print PS变量数据都是101192左右,报错fatal:ContourPlotDraw: Workspace reallocation would exceed maximum size 100000000 |
我看过提问的智慧: |
看过 |
自己思考时长(天): |
1 |
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
;*******************************************************
; lcnative_2.ncl
;*******************************************************
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
;************************************************
; open file and read in data
;************************************************
f = addfile ("CoordinatesInfo.nc", "r")
nf = addfile ("nc.nc", "r")
;print(f)
t = nf->ps(0,0,:,:)
;print(t)
lat2d = f->lat
lon2d = f->lon
dimll = dimsizes(lat2d) ; get size of dimensions
;print(dimll)
nlat = dimll(0)
mlon = dimll(1)
;************************************************
; create plot
;************************************************
wks = gsn_open_wks("png","aaa_out") ; open a workstation
gsn_define_colormap(wks,"gui_default") ; choose colormap
;gsn_define_colormap(wks,"test111") ; select color map
res = True ; plot mods desired
res@tiMainString = "test" ;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(0,0)
res@mpLeftCornerLonF = lon2d(0,0)
res@mpRightCornerLatF = lat2d(nlat-1,mlon-1)
res@mpRightCornerLonF = lon2d(nlat-1,mlon-1)
;************************************************
; 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 = nf->Latin1(0)
res@mpLambertParallel2F = nf->Latin2(0)
res@mpLambertMeridianF = nf->LoV(0) ; ncl adds from grib file
res@pmTickMarkDisplayMode = "Always"
res@mpFillOn = True ; turn on map fill
res@mpOutlineDrawOrder = "PostDraw" ; draw continental outline last
res@mpOutlineBoundarySets = "AllBoundaries" ; all 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 on contour lines
res@cnLineLabelsOn = False ;turn on label lines
res@gsnSpreadColors = True ; use full range of colormap
res@gsnAddCyclic = False ; regional data
;res@tmXTLabelsOn = False
;res@tmYRLabelsOn = False
res@mpGridAndLimbOn = True ;turn on grid line
plot = gsn_csm_contour_map(wks,t,res)
end
|
|