Dear NCL Users,
Here is some part of my script in which, I used * "where() function"* for
masking a global data to some region using another data variable which is
already masked (regional).
But I got some error as given below.
_______________________
------------------
-------------
--------------
regrid = True
regrid@lat = data&lat
regrid@lon = data&lon
prepdata = read_data(source,predef,regrid)
mask =prepdata(time|0,lat|:,lon|:)
mask@_FillValue = data@_FillValue
do l = 0, dimsize(5)-1
do k = 0, dimsize(4)-1
do j = 0, dimsize(3)-1
do i = 0, dimsize(2)-1
datamasked(lat|:,lon|:,season|i,component|j,ens|k,mdl|l) = \
where(mask .eq. mask@_FillValue,data@
_FillValue,data(lat|:,lon|:,season|i,component|j,ens|k,mdl|l))
end do
end do
end do
end do
ave = dim_avg_n_Wrap(datamasked(lat|:,lon|:,season|:,component|:),(/0,1/))
------------------
---------------------
--------------------
________________________
*fatal:wherefunc: dimension sizes of parameter 0 and parameter 1 do not
match
fatal:Execute: Error occurred at or near line 1893 in file
/home/gibies/ncl/mylib/lib_gibies.ncl
**I could not find the mistake.
**parameter 0*
mask .eq. mask@_FillValue
*parameter 1*
data@_FillValue
Can anybody suggest a solution for this problem ?
-- *Gibies George, CSIR-RF,* *Monsoon Seasonal Prediction Group, Climate and Global Modelling Division, Indian Institute of Tropical Meteorology, Dr. Homi Bhabha Road, NCL (P. O.), Pashan, Pune 411008, India.* *http://sites.google.com/site/gibiesge/* Please Think about the environment. Save paper; Save Trees; and don't print this e-mail unless it is necessary.
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Apr 29 07:15:26 2011
This archive was generated by hypermail 2.1.8 : Tue May 03 2011 - 14:47:34 MDT