[ncl-talk] rcm2rgrid issue

Dennis Shea shea at ucar.edu
Wed Jun 24 08:57:06 MDT 2020


Perhaps, you could ftp the two netcdf file "temp_seltime.nc" and "
EIN5.soilT.0-7cm.JJASmean.1982-2016.remap.nc"

ftp ftp.cgd.ucar.edu
anonymous
cd incoming
put temp_seltime.nc
put  EIN5.soilT.0-7cm.JJASmean.1982-2016.remap.nc
quit

If the EINS file is large, sInce NCL needs only rom the latitude and
longitude variables from the EINS file, you could use (say) the netCDF
'ncks' operator

%> ncks -v latitude,longitude EIN5.soilT.0-7cm.JJASmean.1982-2016.remap.nc
EINS_latlon.nc

and ftp that file


On Tue, Jun 23, 2020 at 3:30 PM Rashed Mahmood <rashidcomsis at gmail.com>
wrote:

> did you check what the min/max of your data values are?
>
> printMinMax(xgrid,0)
>
> What does printVarSummary(xgrid) tell?
>
> Without data file(s) there is not much people can do to help. You could
> also try using ESMF regridding:
> http://www.ncl.ucar.edu/Applications/ESMF.shtml
>
>
>
>
> On Tue, Jun 23, 2020 at 9:18 PM Dr. Suman Maity via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> Hi Dennis
>> Thank you for your suggestions. As you mentioned, I modified my script as
>> beow:
>> begin
>>   a = addfile("EIN5.soilT.0-7cm.JJASmean.1982-2016.remap.nc","r")
>>   soil = a->stl1
>>   soil = soil(:,::-1,:)
>>   b = addfile("temp_seltime.nc","r")
>>   t = rm_single_dims(b->TSOI(:,0,:,:))
>>   lat2d = b->lat
>>   lon2d = b->lon
>>   xgrd  = rcm2rgrid_Wrap(lat2d,lon2d,t,soil&latitude,soil&longitude,0)
>>
>>   wks  = gsn_open_wks ("x11", "plot")
>>   sres                      = True
>>   sres at gsnAddCyclic         = False
>>   sres at mpMinLatF            = 5
>>   sres at mpMaxLatF            = 40
>>   sres at mpMinLonF            = 65
>>   sres at mpMaxLonF            = 100
>>   sres at cnFillOn = True
>>   sres at mpFillOn = False
>>   sres at cnLevelSelectionMode = "ManualLevels"
>>   sres at cnMinLevelValF = 280.
>>   sres at cnMaxLevelValF = 320.
>>   sres at cnLevelSpacingF = 10
>>   plot = gsn_csm_contour_map(wks,xgrd,sres)
>> end
>> But unfortunately, all the efforts goes to vain and the plot remains same
>> as observed earlier. Is there any other issue? Please comment.
>> Thanking you,
>>
>> Best
>> Suman
>> ++++++++++++++++++++++++++++++++++++++++++
>> Dr. Suman Maity
>> Research Associate
>> School of Atmospheric Science
>> Sun Yat-sen University, Zhuhai campus,Tangjiawan Town
>> Zhuhai, Guangdong, Postcode-519082,China.
>> Phone:+86-13543861045 (China), +91-9732636778 (India)
>> skype: reach2suman
>> https://www.researchgate.net/profile/Suman_Maity
>> ++++++++++++++++++++++++++++++++++++++++++
>>
>>
>> On Tue, Jun 23, 2020 at 11:02 PM Dennis Shea <shea at ucar.edu> wrote:
>>
>>>
>>> *http://www.ncl.ucar.edu/Document/Functions/Contributed/rcm2rgrid_Wrap.shtml*
>>> <http://www.ncl.ucar.edu/Document/Functions/Contributed/rcm2rgrid_Wrap.shtml>
>>>
>>> and *rcm2rgrid*
>>> <http://www.ncl.ucar.edu/Document/Functions/Built-in/rcm2rgrid.shtml>
>>> require that the destination (rectilinear) grid have the coordinates
>>> (lat[*] and lon[*])  in *ascending order*.
>>>
>>> You rectilinear grid looks like it is in descending order:  *latitude:
>>> [49.5..-19.5]*
>>>
>>> *f = addfile("EIN5.soilT.0-7cm.JJASmean.1982-2016.remap.nc
>>> <http://EIN5.soilT.0-7cm.JJASmean.1982-2016.remap.nc>","r")*
>>> *x = f->SOIL*
>>> *printVarSummary(x)*
>>>
>>> *print("========")*
>>>
>>>
>>> *x = x(::-1,:)    *
>>> *printVarSummary(x)*
>>> *print("========")*
>>>
>>>   xgrd  = *rcm2rgrid*(lat2d,lon2d,*x,x&lat,x&lon*,0)
>>>
>>>
>>> On Tue, Jun 23, 2020 at 9:32 AM Dr. Suman Maity via ncl-talk <
>>> ncl-talk at mailman.ucar.edu> wrote:
>>>
>>>> Hi Barry
>>>> Thanks for your prompt reply. As you mentioned, here are the details:
>>>>  See http://www.ncl.ucar.edu/ for more details.
>>>> (0) ============Before Interpolation===========
>>>> Variable: t
>>>> Type: float
>>>> Total Size: 265960 bytes
>>>>             66490 values
>>>> Number of Dimensions: 2
>>>> Dimensions and sizes: [218] x [305]
>>>> Coordinates:
>>>> Number Of Attributes: 6
>>>>   _FillValue : 1e+36
>>>>   time : 287808
>>>>   levgrnd : 0.007100635417193535
>>>>   long_name : soil temperature (vegetated landunits only)
>>>>   units : K
>>>>   cell_method : time: mean
>>>> (0) ============After Interpolation===========
>>>> Variable: xgrd
>>>> Type: float
>>>> Total Size: 52080 bytes
>>>>             13020 values
>>>> Number of Dimensions: 2
>>>> Dimensions and sizes: [latitude | 93] x [longitude | 140]
>>>> Coordinates:
>>>>             latitude: [49.5..-19.5]
>>>>             longitude: [20.25..124.5]
>>>> Number Of Attributes: 7
>>>>   _FillValue : 1e+36
>>>>   time : 287808
>>>>   levgrnd : 0.007100635417193535
>>>>   long_name : soil temperature (vegetated landunits only)
>>>>   units : K
>>>>   cell_method : time: mean
>>>>   ncl : rcm2rgrid used for interpolation
>>>> [suman at localhost ght]$
>>>> Please reply if you need further information. I am unable to share the
>>>> data as ncl community allow only 2 MB.
>>>> Thanking you once again.
>>>>
>>>> Best
>>>> Suman
>>>> ++++++++++++++++++++++++++++++++++++++++++
>>>> Dr. Suman Maity
>>>> Research Associate
>>>> School of Atmospheric Science
>>>> Sun Yat-sen University, Zhuhai campus,Tangjiawan Town
>>>> Zhuhai, Guangdong, Postcode-519082,China.
>>>> Phone:+86-13543861045 (China), +91-9732636778 (India)
>>>> skype: reach2suman
>>>> https://www.researchgate.net/profile/Suman_Maity
>>>> ++++++++++++++++++++++++++++++++++++++++++
>>>>
>>>>
>>>> On Tue, Jun 23, 2020 at 8:48 PM Barry Lynn <barry.h.lynn at gmail.com>
>>>> wrote:
>>>>
>>>>> Hello Dr. Suman Maity:
>>>>>
>>>>> It would be helpful if you could attach printouts from your
>>>>> interpolation, as well as printVarSummary output of variables you are using
>>>>> and/or calculating during the interpolation.
>>>>>
>>>>> Barry
>>>>>
>>>>> On Tue, Jun 23, 2020 at 5:58 PM Dr. Suman Maity via ncl-talk <
>>>>> ncl-talk at mailman.ucar.edu> wrote:
>>>>>
>>>>>> Dear All
>>>>>> I am facing an issue from "rcm2rgrid" which is mentioned below:
>>>>>> I have two netcdf file "temp_seltime.nc" and "
>>>>>> EIN5.soilT.0-7cm.JJASmean.1982-2016.remap.nc" and I want to
>>>>>> interpolate "temp_seltime.nc" to the lon/lat of "
>>>>>> EIN5.soilT.0-7cm.JJASmean.1982-2016.remap.nc" for evaluation. Now "
>>>>>> temp_seltime.nc" is an curviliear data with lat and lon information
>>>>>> in 2D and the lat2D and lon2D contains some missing points. On the
>>>>>> otherhand, "EIN5.soilT.0-7cm.JJASmean.1982-2016.remap.nc" is a
>>>>>> normal netdf file (rectilinear grid).  Although interpolation doesn't
>>>>>> through any error but the resultant plot is blank. I couldn't understand
>>>>>> where I did the mistake? Please scripts and plots as attached.
>>>>>> Any sort of suggestion/comments are highly appreciable.
>>>>>> Best
>>>>>> Suman
>>>>>> ++++++++++++++++++++++++++++++++++++++++++
>>>>>> Dr. Suman Maity
>>>>>> Research Associate
>>>>>> School of Atmospheric Science
>>>>>> Sun Yat-sen University, Zhuhai campus,Tangjiawan Town
>>>>>> Zhuhai, Guangdong, Postcode-519082,China.
>>>>>> Phone:+86-13543861045 (China), +91-9732636778 (India)
>>>>>> skype: reach2suman
>>>>>> https://www.researchgate.net/profile/Suman_Maity
>>>>>> ++++++++++++++++++++++++++++++++++++++++++
>>>>>> _______________________________________________
>>>>>> ncl-talk mailing list
>>>>>> ncl-talk at mailman.ucar.edu
>>>>>> List instructions, subscriber options, unsubscribe:
>>>>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Barry H. Lynn, Ph.D
>>>>> Senior Associate Scientist, Lecturer,
>>>>> The Institute of the Earth Science,
>>>>> The Hebrew University of Jerusalem,
>>>>> Givat Ram, Jerusalem 91904, Israel
>>>>> Tel: 972 547 231 170
>>>>> Fax: (972)-25662581
>>>>>
>>>>> C.E.O, Weather It Is, LTD
>>>>> Weather and Climate Focus
>>>>> http://weather-it-is.com
>>>>> Jerusalem, Israel
>>>>> Local: 02 930 9525
>>>>> Cell: 054 7 231 170
>>>>> Int-IS: x972 2 930 9525
>>>>>
>>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk at mailman.ucar.edu
>>>> List instructions, subscriber options, unsubscribe:
>>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200624/23dc34ae/attachment.html>


More information about the ncl-talk mailing list