If you are "new to NCL usage", please read the Mini-Language manual
http://www.ncl.ucar.edu/Document/Manuals/
==================================================================
Have no knowledge of "HIRAM Model" structure
Guessing from the grid dimensions the data are on a rectilinear grid.
As noted in a previous response, you should associate coordinate
info with the PRC variable. If it is not available, you can
generate via:
http://www.ncl.ucar.edu/Document/Functions/Contributed/latGlobeFo.shtml
http://www.ncl.ucar.edu/Document/Functions/Contributed/lonGlobeFo.shtml
http://www.ncl.ucar.edu/Document/Functions/Contributed/lonGlobeF.shtml
===================================================================
nlat = 720
lat = latGlobeFo(nlat, "lat", "latitude", "degrees_north") ; S->N
; (0) -89.875
; (1) -89.625
; (2) -89.375
; [SNIP]
; (717) 89.375
; (718) 89.625
; (719) 89.875
If you want N->S
lat = lat(::-1) ; NCL syntax
; (0) 89.875
; (1) 89.625
; (2) 89.375
SNIP
; (717) -89.375
; (718) -89.625
; (719) -89.875
=======================
mlon = 1152
; offset grid
lon = lonGlobeFo(mlon, "lon", "longitude", "degrees_east")
; (0) 0.15625
; (1) 0.46875
; (2) 0.78125
[SNIP]
; (1148) 358.9062
; (1149) 359.2188
; (1150) 359.5312
; (1151) 359.8438
or
; non-offset grid
lon = lonGlobeF (mlon, "lon", "longitude", "degrees_east")
; (0) 0
; (1) 0.3125
; (2) 0.625
[SNIP]
; (1148) 358.75
; (1149) 359.0625
; (1150) 359.375
; (1151) 359.6875
Also for starting at or ofset from the date line
lon = lonFlip(lon)
lon = where(lon.ge.180, lon-360, lon)
printVarSummary(lon)
===================================
re: PRC [360] x [720] x [1152]
0 1 2 <== dimension #
PRC!0 = "time" ; name dimensions
PRC!1 = "lat"
PRC!2 = "lon"
;;PRC&time = time
PRC&lat = lat
PRC&lon = lon
printVarSummary(PRC)
On 4/3/14, 2:13 PM, David Brown wrote:
> You are not giving enough information for anyone to diagnose your problem.
>
> But if you compare the output of the gpcp_1.ncl example and your output the first evidence of a problem is in the printing of the PRC variable:
> The example using the downloadable data the prints:
>
> Variable: PRC
> Type: float
> Total Size: 15925248 bytes
> 3981312 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 384] x [lat | 72] x [lon | 144]
> Coordinates:
> time: [ 15..11672]
> lat: [-88.75..88.75]
> lon: [1.25..358.75]
> Number Of Attributes: 4
> missing_value : -99999
> _FillValue : -99999
> units : mm/day
> long_name : precipitation
>
> whereas with your data it is printing:
>
>> Variable: PRC
>> Type: float
>> Total Size: 1194393600 bytes
>> 298598400 values
>> Number of Dimensions: 3
>> Dimensions and sizes: [360] x [720] x [1152]
>> Coordinates:
>> warning:Dimension (1) has not been defined
>> warning:Dimension (2) has not been defined
>
> That indicates that the dimensions and coordinates have not been associated with this variable as the example script expects, leading to a series of errors.
> You may indeed have the correct latitude information somewhere but it is not associated with variable. That means your input file is different in some important way
> from the example input file. It is not hard to create coordinate variables for your data manually but you need to figure out what your data actually does look like.
> I suggest running ncl_filedump on your data file and examining the contents. Also please look at the mini-language manual and the Graphics manual available at this page:
> http://www.ncl.ucar.edu/Document/Manuals/
>
> Hope this helps
> -dave
>
>
>
>
>
> On Apr 3, 2014, at 12:55 PM, Star Physicist <couragetoknowgc@hotmail.com> wrote:
>
>>
>>
>> From: couragetoknowgc@hotmail.com
>> To: ncl-talk@ucar.edu
>> Subject: Anual Mean Precip
>> Date: Thu, 3 Apr 2014 17:21:39 +0000
>>
>> Hi NCL users,
>>
>>
>> I am new to NCL usage. I am trying to display climatology map from my HIRAM Model Precipitation data uding following script.
>>
>> gpcp_1.ncl: Overall GPCP climatology derived from the monthly product. Although I get climatology but it is not giving me areal average (one value) displayed at the top of the example display given at the following:
>>
>> http://www.ncl.ucar.edu/Applications/Images/gpcp_1_lg.png
>>
>> image
>>
>>
>>
>> View on www.ncl.ucar.edu
>>
>> Preview by Yahoo
>>
>>
>> But it is giving me an error regarding latitude of my data although my data has proper latitude information. The error is as follows:
>>
>> ******************************
>>
>> ncl Precip_Tseries.ncl 78125, 346.09375, 346.40625, 346.71875,
>> Copyright (C) 1995-2011 - All Rights Reserved
>> University Corporation for Atmospheric Research
>> NCAR Command Language Version 6.0.0
>> The use of this software is governed by a License Agreement.
>> See http://www.ncl.ucar.edu/ for more details.
>>
>> Variable: PRC
>> Type: float
>> Total Size: 1194393600 bytes
>> 298598400 values
>> Number of Dimensions: 3
>> Dimensions and sizes: [360] x [720] x [1152]
>> Coordinates:
>> warning:Dimension (1) has not been defined
>> warning:Dimension (2) has not been defined
>>
>> Variable: prc_clm
>> Type: float
>> Total Size: 39813120 bytes
>> 9953280 values
>> Number of Dimensions: 3
>> Dimensions and sizes: [month | 12] x [720] x [1152]
>> Coordinates:
>> month: [0..11]
>> Number Of Attributes: 2
>> time_op_ncl : Climatology: 30 years
>> info : function clmMonLLT: contributed.ncl
>> fatal:Variable (lat) is undefined
>> fatal:Execute: Error occurred at or near line 41 in file Precip_Tseries.ncl
>>
>> fatal:Variable (clat) is undefined
>> fatal:Execute: Error occurred at or near line 42 in file Precip_Tseries.ncl
>>
>> fatal:Variable (prcAvg) is undefined
>> fatal:Execute: Error occurred at or near line 82 in file Precip_Tseries.ncl
>>
>> (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'
>> yes? sp vi Precip_Tseries.ncl
>>
>> *****************************
>>
>>
>> Thanks,
>>
>>
>> Dogar
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Apr 03 15:05:46 2014
This archive was generated by hypermail 2.1.8 : Tue Apr 15 2014 - 10:45:19 MDT