Error when plotting contour without map

From: louis Vonder <appopson_at_nyahnyahspammersnyahnyah>
Date: Mon, 12 May 2008 09:07:35 +0000 (GMT)
Ncl Users,

I get the following errors when I am trying to make a contour plot without map.

Copyright (C) 1995-2007 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 5.0.0
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
avondou@berbench:/media/Shared/WA_meteosat/tout/all$
avondou@berbench:/media/Shared/WA_meteosat/tout/all$ ncl contour_shaded.ncl
 Copyright (C) 1995-2007 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 5.0.0
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
warning:ContourPlotInitialize: Y coordinates out of data range: defaulting
warning:ContourPlotInitialize: Zero Y coordinate span: defaulting:[errno=1104]
warning:ContourPlotInitialize: current transformation requires trYMinF to be within data coordinate range: resetting
warning:TransInitialize: min Y coordinate exceeds max: exchanging
warning:IrTransInitialize: trYCoordPoints contains invalid coordinate array: defaulting trYAxisType to LinearAxis
warning:ContourPlotSetValues: Y coordinates out of data range: defaulting
warning:ContourPlotSetValues: Zero Y coordinate span: defaulting:[errno=1104]
warning:ContourPlotSetValues: current transformation requires trYMinF to be within data coordinate range: resetting
fatal:TickMark:CheckIrregular: Both tmYRDataBottomF and tmYRDataTop are outside of the range of the values in tmYRCoordPoints, can not continue

fatal:TickMarkSetValues: A fatal error was detected while examining NhlIRREGULAR style values,cannot continue
fatal:PlotManagerSetValues: Error setting TickMark values
fatal:ContourPlotSetValues: error setting overlay object view
warning:ContourPlotSetValues: Y coordinates out of data range: defaulting
warning:ContourPlotSetValues: Zero Y coordinate span: defaulting:[errno=1104]
warning:ContourPlotSetValues: current transformation requires trYMinF to be within data coordinate range: resetting
warning:ContourPlotSetValues: Y coordinates out of data range: defaulting
warning:ContourPlotSetValues: Zero Y coordinate span: defaulting:[errno=1104]
warning:ContourPlotSetValues: current transformation requires trYMinF to be within data coordinate range: resetting
warning:ContourPlotSetValues: Y coordinates out of data range: defaulting
warning:ContourPlotSetValues: Zero Y coordinate span: defaulting:[errno=1104]
warning:ContourPlotSetValues: current transformation requires trYMinF to be within data coordinate range: resetting
fatal:TickMark:CheckIrregular: Both tmYRDataBottomF and tmYRDataTop are outside of the range of the values in tmYRCoordPoints, can not continue

fatal:TickMarkSetValues: A fatal error was detected while examining NhlIRREGULAR style values,cannot continue
fatal:ContourPlotSetValues: error setting overlay object view
avondou@berbench:/media/Shared/WA_meteosat/tout/all$
avondou@berbench:/media/Shared/WA_meteosat/tout/all$
avondou@berbench:/media/Shared/WA_meteosat/tout/all$
avondou@berbench:/media/Shared/WA_meteosat/tout/all$ ncl contour_shaded.ncl
 Copyright (C) 1995-2007 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 5.0.0
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
warning:ContourPlotInitialize: Y coordinates out of data range: defaulting
warning:ContourPlotInitialize: Zero Y coordinate span: defaulting:[errno=1104]
warning:ContourPlotInitialize: current transformation requires trYMinF to be within data coordinate range: resetting
warning:TransInitialize: min Y coordinate exceeds max: exchanging
warning:IrTransInitialize: trYCoordPoints contains invalid coordinate array: defaulting trYAxisType to LinearAxis
warning:ContourPlotSetValues: Y coordinates out of data range: defaulting
warning:ContourPlotSetValues: Zero Y coordinate span: defaulting:[errno=1104]
warning:ContourPlotSetValues: current transformation requires trYMinF to be within data coordinate range: resetting
fatal:TickMark:CheckIrregular: Both tmYRDataBottomF and tmYRDataTop are outside of the range of the values in tmYRCoordPoints, can not continue

fatal:TickMarkSetValues: A fatal error was detected while examining NhlIRREGULAR style values,cannot continue
fatal:PlotManagerSetValues: Error setting TickMark values
fatal:ContourPlotSetValues: error setting overlay object view
warning:ContourPlotSetValues: Y coordinates out of data range: defaulting
warning:ContourPlotSetValues: Zero Y coordinate span: defaulting:[errno=1104]
warning:ContourPlotSetValues: current transformation requires trYMinF to be within data coordinate range: resetting
warning:ContourPlotSetValues: Y coordinates out of data range: defaulting
warning:ContourPlotSetValues: Zero Y coordinate span: defaulting:[errno=1104]
warning:ContourPlotSetValues: current transformation requires trYMinF to be within data coordinate range: resetting
warning:ContourPlotSetValues: Y coordinates out of data range: defaulting
warning:ContourPlotSetValues: Zero Y coordinate span: defaulting:[errno=1104]
warning:ContourPlotSetValues: current transformation requires trYMinF to be within data coordinate range: resetting
fatal:TickMark:CheckIrregular: Both tmYRDataBottomF and tmYRDataTop are outside of the range of the values in tmYRCoordPoints, can not continue

fatal:TickMarkSetValues: A fatal error was detected while examining NhlIRREGULAR style values,cannot continue
fatal:ContourPlotSetValues: error setting overlay object view

Here script I am using to create Netcdf data


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"

begin


xtemp = fspan(193, 283, 10)
ntemp = dimsizes(xtemp)

xtime = fspan(1, 48, 48)
ntime = dimsizes(xtime)


  xtemp@units   = "K"
  xtemp@long_name = "Temperature"
  xtime@units   = "LST"
  xtime@long_name = "Time"

 
 
  fili = systemfunc("ls  XYZ_Area_025_R1")
  nfil = dimsizes( fili )

    do n = 0, nfil - 1
       name  = stringtocharacter(fili(n))
      ; name1  = name(0:18)
    ;   name2 = chartostring(name1)

       dummy_data = asciiread(fili(n), (/ntemp, ntime/), "float")
 
; Set up coordinate arrays so we can overlay on map.
  dummy_data!0   = "temperature"
  dummy_data!1   = "time"
  dummy_data&temperature = xtemp
  dummy_data&time = xtime
  dummy_data@units = "%"
  dummy_data@_FillValue    = -9999.
  dummy_data@missing_value = dummy_data@_FillValue
   dummy_data@long_name = "Fractional coverage"

        diro = "./"                     ; Output directory
        filo =   name+".nc"             ; Output file
    system("/bin/rm -f " + diro + filo)    ; remove if exists
    fout  = addfile (diro + filo, "c")  ; open output file


 ;===================================================================
    ; explicitly declare file definition mode. Improve efficiency.
    ;===================================================================
        setfileoption(fout, "DefineMode", True)

  ;===================================================================
    ; create global attributes of the file
    ;===================================================================
        fAtt               = True            ; assign file attributes
    fAtt@title         = "NCL Efficient Approach to netCDF Creation" 
    fAtt@source_file   =  "original-file.nc"
    fAtt@Conventions   = "None"  
    fAtt@creation_date = systemfunc ("date")       
    fileattdef(fout, fAtt)            ; copy file attributes   
    ;===================================================================
    ; predefine the coordinate variables and their dimensionality
    ; note: to get an UNLIMITED record dimension, we set the dimensionality
    ; to -1 and set the unlimited array to True.
    ;===================================================================
        dimNames = (/"temperature", "time"/) 
    dimSizes = (/ntemp,  ntime/)
    dimUnlim = (/False, False/)  
    filedimdef(fout, dimNames, dimSizes, dimUnlim)


    
       filevardef(fout, "temperature", typeof(xtemp), "temperature")                         
       filevardef(fout, "time", typeof(xtime), "time")                         
       filevardef(fout, "FC", typeof(dummy_data), (/"temperature", "time"/)) 


       filevarattdef(fout, "temperature", xtemp)           ; copy lat attributes
       filevarattdef(fout, "time", xtime)                       ; copy lon attributes
       filevarattdef(fout, "FC", dummy_data)                ; copy TOPOG attributes

        setfileoption(fout, "DefineMode", False)


       fout->temeparture    = (/xtemp/)
       fout->time    = (/xtime/)
       fout->FC     = (/dummy_data/)


delete(dummy_data)
delete(fout)


   end do
 

end


This is the script for the plot (derived from www.ncl.ucar.edu/Applications/Scripts/conwomap_1.ncl)

;================================================;
;  conwomap_1.ncl
;================================================;
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"  
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"  
; ================================================;
begin
;=================================================;
; open file and read in data
;=================================================;
  f    = addfile("XYZ_Area_025_R3.nc","r")
  u  = f->FC              
;=================================================;
; PLOT 2
;=================================================;
  wks  = gsn_open_wks("ps","conwomap")     ; open a ps file
  plot = gsn_csm_contour(wks, u, False)      ; contour the variable

; note that the default plot draw here still uses the long_name and
; units of the variable as labels.

; In this file, the coordinate variables of the data are listed as
; lat and long, but they are really just index points, which makes this
; data suitable for plotting without a map.
  end

And attached file which I am using to create netcdf file


Thanks for help




__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités
http://mail.yahoo.fr Yahoo! Mail

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Mon May 12 2008 - 03:07:35 MDT

This archive was generated by hypermail 2.2.0 : Mon May 19 2008 - 08:42:48 MDT