[ncl-talk] Regridding reananlysis 2 data error (NetCDF sub sectional data)
Dennis Shea
shea at ucar.edu
Wed Apr 27 16:34:53 MDT 2016
PLEASE read the documentation of the functions you are using.
On Wed, Apr 27, 2016 at 1:53 PM, Saurabh Singh <saurabhsingh123op at gmail.com>
wrote:
> Dear mam the code gives following error
>
> ncl 43> rtrmm = rcm2rgrid_Wrap(u11,opt)
> fatal:syntax error: function rcm2rgrid_Wrap expects 6 arguments, got 2
> fatal:error at line 43
>
> On Thu, Apr 28, 2016 at 3:42 AM, Mary Haley <haley at ucar.edu> wrote:
>
>> The error is telling you exactly what the problem is.
>>
>> This function rcm2rgrid expects the first two arguments to be 2D lat/lon
>> arrays, because this routine is regridding from a curvilinear grid to a
>> rectilinear grid. Curvilinear grids are represented by 2D lat/lon arrays.
>> You are giving it 1D lat/lon arrays, which represent a rectilinear grid.
>>
>> You may want to use ESMF_regrid:
>>
>> UNTESTED:
>>
>> opt = True
>> opt at SrcGridLat = lat2d ; this variable should be renamed since it's
>> not 2D
>> opt at SrcGridLon = lon2d ; ditto
>> opt at SrcRegional = False ; set to False if your source grid is
>> regional
>>
>> opt at DstGridLat = lat
>> opt at DstGridLon = lon
>> opt at DstRegional = False ; ditto
>> opt at SrcMask@d = where(.not.ismissing(var),1,0) ; only necessary if
>> u11 contains missing values
>> rtrmm = rcm2rgrid_Wrap(u11,opt)
>>
>> --Mary
>>
>>
>>
>> On Wed, Apr 27, 2016 at 12:30 PM, Saurabh Singh <
>> saurabhsingh123op at gmail.com> wrote:
>>
>>> Dear sir I am trying to interpolate Reanalysis-II data to TRMM data in
>>> order to find correlation;
>>>
>>> NCL Version 6.3.0
>>> OS: UBUNTU 15.10
>>>
>>> ncl_filedum uwnd.nc
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *float lat ( lat ) units : degrees_north
>>> actual_range : ( 14.2855, -14.2855 ) long_name :
>>> Latitude standard_name : latitude axis : Y
>>> coordinate_defines : point*
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> * float lon ( lon ) units : degrees_east
>>> long_name : Longitude actual_range : ( 90, 123.75 )
>>> standard_name : longitude axis : X
>>> coordinate_defines : point*
>>>
>>>
>>>
>>>
>>>
>>>
>>> * double time ( time ) units : hours since 1800-1-1
>>> 00:00:0.0 long_name : Time actual_range : ( 1753152,
>>> 1823256 ) delta_t : 0000-00-01 00:00:00 standard_name
>>> : time*
>>>
>>>
>>> Thereafter I use the following code :
>>>
>>> a=addfile("/home/cee2/SV10.nc","r")
>>>
>>> y=a->lat
>>> u10=a<-uwnd
>>> u11=u10(:,0,:,:)
>>> lat2d=a->lat
>>> lon2d=a->lon
>>>
>>> ; Global TRMM grid .... Change for the Reanalysis region
>>> nlat = 400
>>> mlon = 1440
>>> lat = ispan(0,nlat-1,1)*0.25 - 49.875
>>> lon = ispan(0,mlon-1,1)*0.25 - 179.875
>>>
>>>
>>> lat!0 = "lat"
>>> lat at units = "degrees_north"
>>>
>>> ; lon = fspan(-179.875, 179.875, nlon-1)
>>> lon!0 = "lon"
>>> lon at units = "degrees_east"
>>>
>>> ; regrid (bilinear)
>>> wks = gsn_open_wks("png","resize")
>>> rtrmm = rcm2rgrid_Wrap(lat2d,lon2d,u11,lat,lon,0)
>>>
>>> *However I get the following error :*
>>>
>>>
>>> *fatal:Number of dimensions in parameter (0) of (rcm2rgrid_Wrap) is (1),
>>> (2) dimensions were expectedfatal:["Execute.c":8573]:Execute: Error
>>> occurred at or near line 24*
>>>
>>> --
>>> With regards
>>> Saurabh Kumar singh
>>>
>>> *P** : * *Please consider the environment before printing this e-mail*
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>
>
> --
> With regards
> Saurabh Kumar singh
>
> *P** : * *Please consider the environment before printing this e-mail*
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160427/2849474c/attachment.html
More information about the ncl-talk
mailing list