Hello ncl-talk group,
I am currently working on an extensive script to generate plots for a
visual comparison of different climate datasets. The script is actually
finished now, but I get a rather strange error message with the plotting
routines gsn_csm_pres_hgt and partially also gsn_csm_contour (which I
actually dont like to use here; the data is level-time dimensioned):
fatal:_NclBuildArray: can not combine character or string types with
numeric types, can't continue
I am using ncl 6.1.0-beta in an up-to date Debian environment. Maybe
this is related to my netcdf file which is already an output of another
ncl-based processing step?! The script actually does work fine with
other input files which have different dimensions.
I appreciate any little help!
Here is my code (using the file test.nc in the attachment):
begin
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.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/shea_util.ncl"
file = addfile("test.nc","r")
var_plot = file->ylatlonmean_bias
type = "newpdf" ; available workstation types: x11, ncgm, ps,
eps, epsi, pdf, newps, newpdf, png
type@wkOrientation = "landscape"
fout = "test.pdf"
wks = gsn_open_wks(type, (/fout/))
gsn_define_colormap( wks, "BlWhRe" )
res = True
res@gsnMaximize = True
res@gsnPaperOrientation = "portrait"
res@gsnDraw = True
res@gsnFrame = False
res@gsnSpreadColors = True
res@lbOrientation = "vertical"
res@lbLabelFontHeightF = 0.015
res@cnFillOn = True
res@cnLineLabelsOn = True
res@lbLabelAutoStride = True
res@tmYRMode = "Automatic"
res@cnLinesOn = False
res@tiMainFontHeightF = .018
var_plot&lev@standard_name = "pressure_level"
var_plot&lev@long_name = "pressure_level"
var_plot&lev@units = "hPa"
contour = gsn_csm_pres_hgt( wks, var_plot(lev|:, time|:), res )
;contour = gsn_csm_contour( wks, var_plot(lev|:, time|:), res )
delete([/ contour, wks, res, fout, var_plot, file /])
end
-- Richard Wartenburger<richard.wartenburger@giub.unibe.ch> Climatology Group Institute of Geography& Oeschger Centre for Climate Change Research University of Bern Hallerstr. 12, CH-3012 Bern Fon: +41 31 631 8868 Fax: +41 31 631 8511 Web: www.geography.unibe.ch
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.1.8 : Wed Sep 26 2012 - 13:56:04 MDT