Hi,
I am trying to apply the NCL's "dim_avg_n_Wrap" function on a data
set that contain data points beyond my are of interest.
; bounds over data present (Input Data)
MinLat = 32.06
MaxLat = 54.12
MinLon = -98.22
MaxLon = -62.84
; my are of interest
MinLat = 36.06
MaxLat = 49.44
MinLon = -92.64
MaxLon = -67.35
I can use the following code to take average across all lat/lon
=============================================================
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
;************************************************
; Read the file
;************************************************
f = addfile("/brosto2/s3/kamal/DAYMET/prcp.sontario.2002.nc","r")
x = f->prcp(0:30,{36.06:49.44},{-92.64:-67.35-67.35}) ; read first 31
time steps
Rainfall = dim_avg_n_Wrap(x,(/1,2/))
end
==========================================================
But I am getting the following error message:
fatal:Subscript out of range, error in subscript #2
fatal:Execute: Error occurred at or near line 19 in file
Prcp_Jan_multi_time_labels_3.ncl
===========================================================
Where the line 19 is:
x = f->prcp(0:30,{36.06:49.44},{-92.64:-67.35})
I have figure out that the problem is the declaration of longitude
value. Could anyone please help me how can I define the longitude
values.
Thanks
Kamal
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Apr 2 12:17:40 2013
This archive was generated by hypermail 2.1.8 : Tue Apr 02 2013 - 21:23:48 MDT