Re: fatal:XyPlotChanges: error setting overlay object view

From: Kim <r4rid_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 25 2010 - 02:10:13 MST

Dear Mary, thanks alot for your valuable guidance.
regards,
kim

--- 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, 8:59 PM

Dear Kim,

Thanks for providing your script and data.

I think there's an error in your code.  You are setting:

   res@trXMinF = 17543328        ; set minimum X-axis value
   res@trXMaxF = 17546280      ;

But the actual min/max of your X array, "time", is an order magnitude less than these values:

(0) min/max time:
(0) 1782336
(0) 1785288

This will not work, because you are effectively selecting an X axis range that doesn't contain any of your time values.

If you are trying to set the X axis so it starts exactly where you have the beginning and ending major tick marks, then try this:

   res@trXMinF = min(tm_major_values)  
   res@trXMaxF = max(tm_major_values)

which in your case is the same as this:

   res@trXMinF = min(time)  
   res@trXMaxF = max(time)

--Mary

On Feb 24, 2010, at 7:02 PM, Kim wrote:

--- 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.

 

 

 
   
  

 

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

<lhf8.ncl>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Feb 25 02:10:20 2010

This archive was generated by hypermail 2.1.8 : Thu Feb 25 2010 - 09:38:32 MST