Re: coordinates units

From: Mateus da Silva Teixeira <mtex2k3_at_nyahnyahspammersnyahnyah>
Date: Wed, 10 Jan 2007 15:15:26 -0200

Thank you Dennis,

I confused the fastest dimension differences between C and Fortran.

Dennis Shea escreveu:
> [1] As per the documentation, gsn_csm_contour_map_ce
> the variable to be plotted to have the rightmost dimensions
> (lat,lon) ... not (lon,lat).
>
> Try: plot = gsn_csm_contour_map_ce(xwks,prec(lat|:,lon|:),False)
>
> [2] My experience with GPCP is that the fortran code they
> provide has something like
>
> real prec(360,180)
>
> In fortran the leftmost subscript varies fastest. NCL
> which is written in C has the rightmost dimension
> varying fastest. I speculate the following is what you need.
>
> prec=fbindirread("gpcp_1dd_p1d.200001",1,(/180,360/),"float")
> prec!0="lat"
> prec!1="lon"
>
> printVarSummary(prec)
> printMinMax(prec, True)
>
> plot = gsn_csm_contour_map_ce(xwks,prec,False)
>
> Good luck
> D
>
>> Dear NCL users,
>>
>> With the following script
>>
>> 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"
>>
>> begin
>> setfileoption("bin","ReadByteOrder","BigEndian")
>> prec=fbindirread("gpcp_1dd_p1d.200001",1,(/360,180/),"float")
>>
>> lat=latGlobeFo(180,"lat","latitude","degrees_north")
>> lat=lat(::-1)
>> lon=lonGlobeFo(360,"lon","longitude","degrees_east")
>>
>> prec!0="lon"
>> prec!1="lat"
>> prec&lon=lon
>> prec&lat=lat
>>
>> prec@_FillValue=-99999.
>> prec_at_long_name="GPCP 1DD Data"
>> prec_at_units="mm/day"
>>
>> xwks = gsn_open_wks("pdf","mapa")
>> plot = gsn_csm_contour_map_ce(xwks,prec,False)
>> end
>>
>> NCL gives me the following error messages:
>>
>> (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'
>>
>> I tried to put the lat and lon units by hand and with the latGlobeFo()
>> and lonGlobeFo(), but the messages were the same.
>> Can anyone help me?
>>
>> Thanks
>> Mateus
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
>
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jan 10 2007 - 10:15:26 MST

This archive was generated by hypermail 2.2.0 : Thu Jan 11 2007 - 10:16:54 MST