[ncl-talk] check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.

zilore mumba zmumba at yahoo.com
Sat Apr 6 23:35:39 MDT 2019


Hello,This is a repeat of the post I made yesterday 06 April 2019. To make my problem clear, I get the error below.  From output of "printVarSummary(p)" given after the error message below, I have never seen coordinates given in the way they are given in this file.
check_for_y_lat_coord: Warning: Data either does not contain(0)    a valid latitude coordinate array or doesn't contain one at all.
(0)    A valid latitude coordinate array should have a 'units'
(0)    attribute equal to one of the following values: 
(0)        'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'

Variable: p
Type: float
Total Size: 155976 bytes
            38994 values
Number of Dimensions: 2
Dimensions and sizes:    [y | 201] x [x | 194]

I would appreciate if someone can assist me modify my script below so that I can plot the data for the first time step. Part of output from ncdump is also given after the script.
I will appreciate any help.


begin  
  f = addfile("~/CORDEX/DATA/pr_AFR-44_MPI-M-MPI-ESM-LR_historical_r1i1p1_MPI-CSC-REMO2009_v1_day_1971-2000.nc","r")

;        p=f->pr(y|:,x|:,time|:)   ;With this command the system hangs
        p=f->pr(0,:,:)               ; This command gives the error indicated above

  printVarSummary(p)
  wks = gsn_open_wks("png", "Simple_Contour_Map")

  res =  True

  res at gsnAddCyclic = False

  res at cnInfoLabelOn = False

  res at gsnRightString = ""
  res at gsnLeftString  = ""

  res at tiMainString= "Sea Level Pressure"   ; draw a title

  res at tiMainString = "Regional Map Plot"

  res at mpDataBaseVersion          = "MediumRes"   ; use finer database
  res at mpDataSetName                = "Earth..4"
  res at mpOutlineBoundarySets     = "AllBoundaries"
  
  res at mpOutlineOn               = True  res at mpNationalLineThicknessF  = 1.5          ; turn on country boundaries

  plot= gsn_csm_contour_map(wks, p, res)            ; create the plot

 end
Part Output of ncdump -c filename
dimensions:
    time = UNLIMITED ; // (10958 currently)
    bnds = 2 ;
    x = 194 ;
    y = 201 ;
    vertices = 4 ;
variables:
    double time(time) ;
        time:standard_name = "time" ;
        time:long_name = "time" ;
        time:bounds = "time_bnds" ;
        time:units = "days since 1949-12-01 00:00:00" ;
        time:calendar = "proleptic_gregorian" ;
        time:axis = "T" ;
    double time_bnds(time, bnds) ;
    float lon(y, x) ;
        lon:standard_name = "longitude" ;
        lon:long_name = "longitude coordinate" ;
        lon:units = "degrees_east" ;
        lon:_CoordinateAxisType = "Lon" ;
        lon:bounds = "lon_bnds" ;
    float lon_bnds(y, x, vertices) ;
    float lat(y, x) ;
        lat:standard_name = "latitude" ;
        lat:long_name = "latitude coordinate" ;
        lat:units = "degrees_north" ;
        lat:_CoordinateAxisType = "Lat" ;
        lat:bounds = "lat_bnds" ;
    float lat_bnds(y, x, vertices) ;
    float pr(time, y, x) ;









-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190407/c40ac562/attachment.html>


More information about the ncl-talk mailing list