--- On Wed, 2/24/10, Kim <r4rid@yahoo.com> wrote:
From: Kim <r4rid@yahoo.com>
Subject: Re: fatal:XyPlotChanges: error setting overlay object view
To: "Mary Haley" <haley@ucar.edu>
Date: Wednesday, February 24, 2010, 6:00 PM
Dear Marry,
Please the required documents are attached herewith. If you don't mind you can download the required data at :
http://www.esrl.noaa.gov/psd/cgi-bin/db_search/DBListFiles.pl?did=59&tid=25708&vid=1474
thanks and kind regards,
kim
*******************
netcdf shtfl.sfc.gauss.2002 {
dimensions:
lon = 192 ;
lat = 94 ;
time = UNLIMITED ; // (365 currently)
variables:
float lat(lat) ;
lat:units = "degrees_north" ;
lat:actual_range = 88.542f, -88.542f ;
lat:long_name = "Latitude" ;
float lon(lon) ;
lon:units = "degrees_east" ;
lon:long_name = "Longitude" ;
lon:actual_range = 0.f, 358.125f ;
double time(time) ;
time:units = "hours since 1-1-1 00:00:0.0" ;
time:long_name = "Time" ;
time:actual_range = 17540448., 17549184. ;
time:delta_t = "0000-00-01 00:00:00" ;
time:avg_period = "0000-00-01 00:00:00" ;
short shtfl(time, lat, lon) ;
shtfl:long_name = "mean Daily Sensible Heat Net Flux at surface" ;
shtfl:valid_range = -2000.f, 7000.f ;
shtfl:actual_range = -607.f, 1289.f ;
shtfl:units = "W/m^2" ;
shtfl:add_offset = 30766.f ;
shtfl:scale_factor = 1.f ;
shtfl:missing_value = 32766s ;
shtfl:precision = 0s ;
shtfl:least_significant_digit = 0s ;
shtfl:GRIB_id = 122s ;
shtfl:GRIB_name = "SHTFL" ;
shtfl:var_desc = "Sensible Heat Net Flux\n",
"CU" ;
shtfl:dataset = "NCEP Reanalysis Daily Averages" ;
shtfl:level_desc = "Surface\n",
"0" ;
shtfl:statistic = "Mean\n",
"M" ;
shtfl:parent_stat = "Individual Obs\n",
"I" ;
// global attributes:
:Conventions = "COARDS" ;
:title = "mean daily NMC reanalysis (2002)" ;
:base_date = 2002s, 1s, 1s ;
:history = "created 03/08/18 by Hoop (netCDF2.3)" ;
:description = "Data is from NMC initialized reanalysis\n",
"(4x/day). It consists of T62 variables interpolated to\n",
"pressure surfaces from model (sigma) surfaces." ;
:platform = "Model" ;
*****************
PrintVarSummary
Variable: z
Type: float
Total Size: 8951808 bytes
2237952 values
Number of Dimensions: 3
Dimensions and sizes: [time | 124] x [lat | 94] x [lon | 192]
Coordinates:
time: [17543328..17546280]
lat: [88.542..-88.542]
lon: [ 0..358.125]
Number Of Attributes: 15
long_name : mean Daily Sensible Heat Net Flux at surface
valid_range : ( -2000, 7000 )
actual_range : ( -607, 1289 )
units : W/m^2
precision : 0
least_significant_digit : 0
GRIB_id : 122
GRIB_name : SHTFL
var_desc : Sensible Heat Net Flux
CU
dataset : NCEP Reanalysis Daily Averages
level_desc : Surface
0
statistic : Mean
M
parent_stat : Individual Obs
I
_FillValue : 32766
missing_value : 32766
Variable: z1
Type: float
Total Size: 8951808 bytes
2237952 values
Number of Dimensions: 3
Dimensions and sizes: [time | 124] x [lat | 94] x [lon | 192]
Coordinates:
time: [17552088..17555040]
lat: [88.542..-88.542]
lon: [ 0..358.125]
Number Of Attributes: 15
long_name : mean Daily Sensible Heat Net Flux at surface
valid_range : ( -900, 5650 )
actual_range : ( -747.8, 1240.9 )
units : W/m^2
precision : 1
least_significant_digit : 0
GRIB_id : 122
GRIB_name : SHTFL
var_desc : Sensible Heat Net Flux
CU
dataset : NCEP Reanalysis Daily Averages
level_desc : Surface
0
statistic : Mean
M
parent_stat : Individual Obs
I
_FillValue : 32766
missing_value : 32766
*****************************
Error
fatal:["MultiText.c":940]:[errno=12]
fatal:TickMarkSetValues: Could not set MultiText item values for bottom tick mark labels, cannot continue
fatal:TickMarkSetValues: A fatal error was detected while computing tick marks labels,cannot continue
fatal:PlotManagerSetValues: Error setting TickMark values
fatal:XyPlotChanges: error setting overlay object view
fatal:["MultiText.c":940]:[errno=12]
fatal:TickMarkSetValues: Could not set MultiText item values for bottom tick mark labels, cannot continue
fatal:TickMarkSetValues: A fatal error was detected while computing tick marks labels,cannot continue
fatal:XyPlotChanges: error setting overlay object view
fatal:["MultiText.c":940]:[errno=12]
fatal:TickMarkSetValues: Could not set MultiText item values for bottom tick mark labels, cannot continue
fatal:TickMarkSetValues: A fatal error was detected while computing tick marks labels,cannot continue
fatal:XyPlotChanges: error setting overlay object view
fatal:["MultiText.c":940]:[errno=12]
fatal:TickMarkSetValues: Could not set MultiText item values for bottom tick mark labels, cannot continue
fatal:TickMarkSetValues: A fatal error was detected while computing tick marks labels,cannot continue
fatal:PlotManagerSetValues: Error setting TickMark values
fatal:XyPlotChanges: error setting overlay object view
--- On Wed, 2/24/10, Mary Haley <haley@ucar.edu> wrote:
From: Mary Haley <haley@ucar.edu>
Subject: Re: fatal:XyPlotChanges: error setting overlay object view
To: "Kim" <r4rid@yahoo.com>
Cc: ncl-talk@ucar.edu
Date: Wednesday, February 24, 2010, 7:15 AM
Can you provide your script and data? The ftp instructions are at:
http://www.ncl.ucar.edu/report_bug.shtml
Thanks,
--Mary
On Feb 24, 2010, at 5:06 AM, Kim wrote:
Dear Mary, thanks you so much spenting more time on my problem, but unfortunately it does not working in the light of your suggested methods.
thanks again
kim
--- On Tue, 2/23/10, Mary Haley <haley@ucar.edu> wrote:
From: Mary Haley <haley@ucar.edu>
Subject: Re: fatal:XyPlotChanges: error setting overlay object view
To: "Kim" <r4rid@yahoo.com>
Cc: ncl-talk@ucar.edu
Date: Tuesday, February 23, 2010, 7:23 AM
I'm not sure if this will work, but instead of setting trXMinF and trXMaxF explicitly,
try to index your time array for whichever values you want to actually plot.
For example, if you wanted to start at time "19900101" and end at "20001231", then
you would do something like this:
yrs = floattoint(utc(:,0))
ibeg = where(yrs.eq.1990.and.mons.eq.1.and.days.eq.1)
iend = where(yrs.eq.2000.and.mons.eq.12.and.days.eq.31)
Then:
plotA = gsn_csm_xy(wks, time(ibeg:iend), zRegion(ibeg:iend), res)
. . .
plotB = gsn_csm_xy(wks, time(ibeg_iend), z1Region(ibeg:iend), res)
The other possibility is to use ut_calendar with an option of -2 to convert your time to YYYYMMDD, and then plot against these new values instead of your original time values.
For example:
new_time = ut_calendar(time, -2)
. . .
tm_major_values = new_time(day_1)
Change these to the appropriate YYYYMMDD format:
res@trXMinF = 17552088 ; set minimum X-axis value
res@trXMaxF = 17555040 ; set maximum X-axis value
and then:
plotA = gsn_csm_xy(wks, new_time, zRegion, res)
. . .
plotB = gsn_csm_xy(wks, new_time, z1Region, res)
Without knowing what your original time values look like, I'm not sure what's the best method.
--Mary
On Feb 22, 2010, at 8:02 PM, Kim wrote:
Dear Mary,
Please have a look on my code is given below. If I don't set trXMinF and trXMaxF it is working but the figure is not correct the lines start away from the y-axis. Please your help in this regard will be appreciable.
thanks again,
kim
*******************
--------------------------------------
--------------------------------------
f = addfile("shtfl.sfc.gauss.2003.nc","r")
f1 = addfile("shtfl.sfc.gauss.2002.nc","r")
z = short2flt(f->shtfl(120:243,:,:))
z1= short2flt(f1->shtfl(120:243,:,:))
printVarSummary(z)
printVarSummary(z1)
time = z&time
time = z1&time
utc = ut_calendar(time,0) ; yr, mo, dy, hr, mn, sc
mons = floattoint(utc(:, 1)) ; Values from 1 to 12
days = floattoint(utc(:, 2)) ; Values from 1 to 31
day_1 = ind (days.eq.1)
mon_1 = mons(day_1)
smonths = (/"","J", "F", "M", "A", "MAY", "JUN",\
"JUL", "AUG", "SEP", "OCT", "N", "D"/)
tm_major_values = time(day_1)
tm_major_labels = smonths(mon_1)
zRegion = wgt_areaave_Wrap(z(:,{15:40},{50:100}),1.0,1.0,0)
z1Region = wgt_areaave_Wrap(z1(:,{15:40},{50:100}),1.0,1.0,0)
; printVarSummary(z1Region)
; printMinMax(z1Region, True)
;**********************************
wks = gsn_open_wks ("x11","sh")
res = True
res@gsnDraw = False
res@gsnFrame = False
res@tmLabelAutoStride = True
res@xyLineColors =(/"red"/)
res@xyLineThicknesses = 2.0
res@tiMainString = "”
res@tmXBMode = "Explicit" ; Define own tick mark labels.
res@tmXBValues = tm_major_values
res@tmXBLabels = tm_major_labels
res@tmXTOn = False ; Turn off tickmarks and labels
res@tmYROn = False
res@trXMinF = 17552088 ; set minimum X-axis value
res@trXMaxF = 17555040 ; set maximum X-axis value
res@tiYAxisString = "SHFL(W/m^2)"
res@vpHeightF= 0.4
res@vpWidthF = 0.8
plotA = gsn_csm_xy(wks, time,zRegion,res)
;**************************************
res@xyLineColors = (/"blue"/)
res@trXMinF = 17543328 ; set minimum X-axis value
res@trXMaxF = 17546280 ; set maximum X-axis value
plotB = gsn_csm_xy(wks, time,z1Region,res)
overlay(plotA, plotB)
draw(plotA)
frame(wks)
end
--- On Mon, 2/22/10, Mary Haley <haley@ucar.edu> wrote:
From: Mary Haley <haley@ucar.edu>
Subject: Re: fatal:XyPlotChanges: error setting overlay object view
To: "Kim" <r4rid@yahoo.com>
Cc: ncl-talk@ucar.edu
Date: Monday, February 22, 2010, 5:55 AM
Dear Kim,
How are you doing the overlay, and when are you setting trXMinF and trXMaxF? It would help if I could see a script.
--Mary
On Feb 21, 2010, at 9:57 PM, Kim wrote:
Dear NCL users
I’m trying to xy-plotA & plotB. Individually and also when I overlay (plotA, plotB) without trXMinF and trXMax resources it is working properly. When I set trXMinF and trXMax during their overlaying it does not work. If I not set these recourses then the lines are not starting at the initial point. Is there any resource or function available in NCL.
Thanks
kim
**************
fatal:["MultiText.c":940]:[errno=12]
fatal:TickMarkSetValues: Could not set MultiText item values for bottom tick mark labels, cannot continue
fatal:TickMarkSetValues: A fatal error was detected while computing tick marks labels,cannot continue
fatal:PlotManagerSetValues: Error setting TickMark values
fatal:XyPlotChanges: error setting overlay object view
fatal:["MultiText.c":940]:[errno=12]
fatal:TickMarkSetValues: Could not set MultiText item values for bottom tick mark labels, cannot continue
fatal:TickMarkSetValues: A fatal error was detected while computing tick marks labels,cannot continue
fatal:XyPlotChanges: error setting overlay object view
fatal:["MultiText.c":940]:[errno=12]
fatal:TickMarkSetValues: Could not set MultiText item values for bottom tick mark labels, cannot continue
fatal:TickMarkSetValues: A fatal error was detected while computing tick marks labels,cannot continue
fatal:XyPlotChanges: error setting overlay object view
fatal:["MultiText.c":940]:[errno=12]
fatal:TickMarkSetValues: Could not set MultiText item values for bottom tick mark labels, cannot continue
fatal:TickMarkSetValues: A fatal error was detected while computing tick marks labels,cannot continue
fatal:PlotManagerSetValues: Error setting TickMark values
fatal:XyPlotChanges: error setting overlay object view
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
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 : Thu Feb 25 2010 - 09:38:32 MST