Simple line plot -need help

From: Madeleine Patterson <madeleine.patterson77_at_nyahnyahspammersnyahnyah>
Date: Tue Jan 25 2011 - 10:14:45 MST

Hi,

I am trying to plot weighted global area averaged soil temperature over time
(10 layers of soil temps) over 30 years of monthly values.

However I am getting a long list of TsoiAve_clat = 1e+36 at different
coords when I run the script and a bunch of warnings and error messages at
the end

(0) gsn_csm_xy: Fatal: X and Y must have the same dimensions sizes, or
one must be one-dimensional and both have the same rightmost dimension.

warning:["CoordArrays.c":591]:No Valid values in Array, unable to compute
Min or Max
warning:LegendInitialize: lgItemTypes exceeds maximum number of elements,
256: ignoring
warning:LegendInitialize: lgDashIndexes exceeds maximum number of elements,
256: ignoring
warning:LegendInitialize: lgMarkerIndexes exceeds maximum number of
elements, 256: ignoring
warning:LegendInitialize: lgLineLabelStrings exceeds maximum number of
elements, 256: ignoring
warning:LegendInitialize: lgLineColors exceeds maximum number of elements,
256: ignoring
warning:LegendInitialize: lgMarkerColors exceeds maximum number of elements,
256: ignoring
warning:LegendInitialize: lgLineDashSegLens exceeds maximum number of
elements, 256: ignoring
warning:LegendInitialize: lgLineThicknesses exceeds maximum number of
elements, 256: ignoring
warning:LegendInitialize: lgMarkerThicknesses exceeds maximum number of
elements, 256: ignoring
warning:LegendInitialize: lgLineLabelFontHeights exceeds maximum number of
elements, 256: ignoring
warning:LegendInitialize: lgMarkerSizes exceeds maximum number of elements,
256: ignoring
warning:LegendInitialize: lgLabelStrings exceeds maximum number of elements,
256: ignoring
warning:LegendInitialize: lgLineLabelFontColors exceeds maximum number of
elements, 256: ignoring
warning:LegendInitialize: lgItemTypes exceeds maximum number of elements,
256: ignoring
warning:LegendInitialize: lgDashIndexes exceeds maximum number of elements,
256: ignoring
warning:LegendInitialize: lgMarkerIndexes exceeds maximum number of
elements, 256: ignoring
warning:LegendInitialize: lgLineLabelStrings exceeds maximum number of
elements, 256: ignoring
warning:LegendInitialize: lgLineColors exceeds maximum number of elements,
256: ignoring
warning:LegendInitialize: lgMarkerColors exceeds maximum number of elements,
256: ignoring
warning:LegendInitialize: lgLineDashSegLens exceeds maximum number of
elements, 256: ignoring
warning:LegendInitialize: lgLineThicknesses exceeds maximum number of
elements, 256: ignoring
warning:LegendInitialize: lgMarkerThicknesses exceeds maximum number of
elements, 256: ignoring
warning:LegendInitialize: lgLineLabelFontHeights exceeds maximum number of
elements, 256: ignoring
warning:LegendInitialize: lgMarkerSizes exceeds maximum number of elements,
256: ignoring
warning:LegendInitialize: lgLabelStrings exceeds maximum number of elements,
256: ignoring
warning:LegendInitialize: lgLineLabelFontColors exceeds maximum number of
elements, 256: ignoring
warning:LegendSetValues: lgItemTypes exceeds maximum number of elements,
2::56: ignoring
warning:LegendSetValues: lgDashIndexes exceeds maximum number of elements,
256: ignoring
warning:LegendSetValues: lgMarkerIndexes exceeds maximum number of elements,
256: ignoring
warning:LegendSetValues: lgLineLabelStrings exceeds maximum number of
elements, 256: ignoring
warning:LegendSetValues: lgLineColors exceeds maximum number of elements,
256: ignoring
warning:LegendSetValues: lgMarkerColors exceeds maximum number of elements,
256: ignoring
warning:LegendSetValues: lgLineDashSegLens exceeds maximum number of
elements, 256: ignoring
warning:LegendSetValues: lgLineThicknesses exceeds maximum number of
elements, 256: ignoring
warning:LegendSetValues: lgMarkerThicknesses exceeds maximum number of
elements, 256: ignoring
warning:LegendSetValues: lgLineLabelFontHeights exceeds maximum number of
elements, 256: ignoring
warning:LegendSetValues: lgMarkerSizes exceeds maximum number of elements,
256: ignoring
warning:LegendSetValues: lgLabelStrings exceeds maximum number of elements,
256: ignoring
warning:LegendSetValues: lgLineLabelFontColors exceeds maximum number of
elements, 256: ignoring
warning:LegendSetValues: lgItemTypes exceeds maximum number of elements,
256: ignoring
warning:LegendSetValues: lgDashIndexes exceeds maximum number of elements,
256: ignoring

My various print commands reveal that tsoi_all has 4 dims and TsoiAvg has 2,
and I'm not really sure why this would be (or if its the cause of my
problem).

Can anyone point to where my script goes wrong?

Thanks

Maddy

*************************************

My script:

begin

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"

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"

setfileoption("nc","SuppressClose",False)

all_files = systemfunc("ls model-output2000.*")

fall = addfiles(all_files,"r")
ListSetType(fall,"cat")
tsoi_all = fall[:]->TSOI
printVarSummary(tsoi_all)

lon = fall[1] ->lon
lat = fall[1] ->lat

rad = 4.0*atan(1.0)/180.0

; use the cosine of the latitudes to calc weighted global avg

clat = cos(lat*rad)

TsoiAve_clat = wgt_areaave(tsoi_all, clat, 1.0, 1)

print(" TsoiAve_clat = " + TsoiAve_clat)

TsoiAvg= TsoiAve_clat

printVarSummary(TsoiAvg)

time=fall[:]->time

wks = gsn_open_wks("pdf","tsoi'")
wks1= gsn_open_wks("x11","tsoi") ;open two types of workstations

res=True
res@tiMainString = "Soil Temperature (1970-2000)"

plot = gsn_csm_xy(wks1,time,TsoiAvg,res)

end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jan 25 10:14:54 2011

This archive was generated by hypermail 2.1.8 : Tue Jan 25 2011 - 14:22:15 MST