Re: message warning check_for_y_lat_coord

From: Noelia otero <noeli1680_at_nyahnyahspammersnyahnyah>
Date: Sat Jul 05 2014 - 09:25:17 MDT

Hi,

Thanks for your suggestions. Unfortunately I still have the same problem
 with the coordinates and the code is not working....I can't figure out
why.
I think that it might be a problem with the coordinates in the correl:

        a =
addfile("/home/nof/pruebas/ensem_means/pr_Amon_bcc-csm1-1_historical_ensmean_t42_westA_meanJAS.nc","r")
        b =
addfile("/home/nof/pruebas/WAMI_CEOF/WAMI_Amon_bcc-csm1-1_historical_ensmean.nc","r")


        pr =a->pr
        wami =b->WAMI(:,0,0,0)
        lat = a->lat
        lon = a->lon
        ;*****Transpose the dimension to get the correlations
        prT = transpose(pr)
        prT!0="lon" ; assign attributes
        prT!1="lat"
        prT!2="time"
        ;copy_VarCoords(prT,correl) ; copy attributes from temp to pcp

        correl=escorc(wami,prT(lon|:,lat|:,time|:))
        correl!0="lon"
        lon@long_name="longitude"
        lon@units="degrees_east"
        correl&lon=lon
        correl!1="lat"
        lat@long_name="latitude"
        lat@units="degrees_north"
        correl&lat=lat
        ;printVarSummary(correl)

When I do printVarSummary(correl) the values seem to me correct, but if I
do:
        printVarSummary(correl&lat)

;********
Variable: lat (coordinate)
Type: double
Total Size: 144 bytes
            18 values
Number of Dimensions: 1
Dimensions and sizes: [lat | 18]
Coordinates:
Number Of Attributes: 4
  axis : Y
  units : degrees_north
  long_name : latitude
  standard_name : latitude

Could it be the problem here? Any idea??
Thanks again,

Cheers,

Noelia



2014-07-04 8:22 GMT+02:00 Mahesh Varma <mkmvarma@gmail.com>:

> I think left most dimension of correl should be lat. Try correl(lat |:,
> lon|:) in the plotting statement.
> On Jul 3, 2014 11:08 PM, "Noelia otero" <noeli1680@gmail.com> wrote:
>
>> Hi,
>>
>> I am looking for some support to fix the next problem. I have already
>> read some posts concerning this message, but so far, I did not solve this
>> (I am start learning the language).
>>
>> after running the script, this is the message:
>>
>>
>> Variable: correl
>> Type: float
>> Total Size: 2016 bytes
>> 504 values
>> Number of Dimensions: 2
>> Dimensions and sizes: [lon | 18] x [lat | 28]
>> Coordinates:
>> lon: [37.67308962904533..-9.767145559195573]
>> lat: [-28.125..47.8125]
>> Number Of Attributes: 1
>> _FillValue : 1e+20
>> (0) check_for_y_lat_coord: Warning: Data either does not contain a valid
>> latitude coordinate array or doesn't contain one at all.
>> (0) A valid latitude coordinate array should have a 'units' 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'
>> (0) check_for_lon_coord: Warning: Data either does not contain a valid
>> longitude coordinate array or doesn't contain one at all.
>> (0) A valid longitude coordinate array should have a 'units' attribute
>> equal to one of the following values:
>> (0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east'
>> 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'
>>
>> And this is the code :
>>
>> ;*****************************************************************************
>> 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
>>
>> a =
>> addfile("/home/nof/pruebas/ensem_means/pr_Amon_bcc-csm1-1_historical_ensmean_t42_westA_meanJAS.nc","r")
>> b =
>> addfile("/home/nof/pruebas/WAMI_CEOF/WAMI_Amon_bcc-csm1-1_historical_ensmean.nc","r")
>>
>>
>> pr =a->pr
>> wami =b->WAMI(:,0,0,0)
>> lat = a->lat
>> lon = a->lon
>>
>> pr!0="time" ; assign attributes
>> pr!1="lon"
>> pr!2="lat"
>> wami!0="time"
>> ;pr&lat=lat
>> ;pr&lon=lon
>> prT = transpose(pr)
>> copy_VarCoords(pr,wami) ; copy attributes from temp to pcp
>> correl=escorc(wami,prT(lon|:,lat|:,time|:))
>> correl!1="lat"
>> correl!0="lon"
>> correl&lat=pr&lat
>> correl&lon=pr&lon
>> correl&lat@units = "degrees_north"
>> correl&lon@units = "degrees_east"
>> printVarSummary(correl)
>> wks = gsn_open_wks("x11","example")
>> plot = gsn_csm_contour_map_ce(wks,correl,False)
>>
>> end
>>
>> I don't understand the message very much,because looking into the
>> variables and dimensions, the names seem correct to me, so I don't know
>> where the problem is...what am I missing?
>> Thanks a lot in advance!
>>
>> Cheers,
>>
>> Noelia
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>

Received on Sat Jul 05 03:25:26 2014

This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:47 MDT