[ncl-talk] Can ESMF_regrid be used for output Gaussian grid?
Dennis Shea
shea at ucar.edu
Tue Feb 28 22:37:59 MST 2017
No.
[1]
Look at your source variable. The 'cod' variable contains the cyclic points
Variable: cod
Dimensions and sizes: [lat | 45] x [lon | 361]
Coordinates:
lat: [ 45.. 89]
lon: [-180.. 180] <==== Cyclic point
====
The cyclic point should be avoided.
cod = ifil->cod(:,{-180:179})
printVarSummary(cod)
printMinMax(cod,0)
Variable: cod
Dimensions and sizes: [lat | 45] x [lon | 360]
Coordinates:
lat: [ 45.. 89]
lon: [-180.. 179] <==== No Cyclic point
++++++++++++++++++++++++++++++++++++++++
[2]
Again, look at your data ... the 'cod' variable contains missing values.
These must be flagged.
nmsg = num(ismissing(cod))
print("nmsg="+nmsg)
print("---------------")
...
if (nmsg.gt.0) then
opt at SrcMask2D = where(.not.ismissing(cod),1,0)
end if
++++++++++++++++++++++++++++++++++++++
See attached
Variable: cod_conserve
Type: float
Total Size: 8192 bytes
2048 values
Number of Dimensions: 2
Dimensions and sizes: [lat | 16] x [lon | 128]
Coordinates:
lat: [46.04472732543945..87.86380004882812]
lon: [-180..177.1875]
Number Of Attributes: 3
_FillValue : -999
remap : remapped via ESMF_regrid_with_weights: Bilinear
missing_value : -999
(0) min=0.274607 max=1.91372
On Tue, Feb 28, 2017 at 6:45 PM, Rashed Mahmood <rashidcomsis at gmail.com>
wrote:
> Sorry please ignore previous message; I think It can be done using ESMF
> regrid by using:
> Opt at DstGridLon = LONT
> Opt at DstGridLat = TLAT ;(Gaussian lats)
> Opt at DstRegional = True
>
> On Tue, Feb 28, 2017 at 5:26 PM, Rashed Mahmood <rashidcomsis at gmail.com>
> wrote:
>
>> Hi everyone,
>>
>> My data is 1*1 degree resolution which is Not global (latitute span:
>> 45N-89N) and I want to convert it into a Gaussian grid as below. I thought
>> ESMF_regrid would be easy But I am not sure what to specify for attribute
>> "Opt at DstGridType = "??????" for a Gaussian destination grid?
>>
>> So I tried using area_conserve_remap as in following simple code:
>>
>> begin
>> ifil = addfile("test_file.nc","r")
>> cod = ifil->cod
>> printVarSummary(cod)
>>
>> NLATT = 64
>> MLONT = 2*NLATT
>> LATT = latGau(NLATT, "lat", "latitude" , "degrees_north")
>> LONT = fspan(-180,180,128)
>> TLAT = LATT({45:90})
>>
>> opt = True
>> opt at NLATi = 178
>> opt at NALTo = NLATT
>> gcod = area_conserve_remap_Wrap (cod&lon, cod&lat, cod ,LONT,
>> TLAT, opt)
>>
>> end
>>
>>
>> However, I am getting error as below, which I understand is due not
>> global lats but not sure how to fix it? The sample data file attached.
>>
>> Copyright (C) 1995-2015 - All Rights Reserved
>> University Corporation for Atmospheric Research
>> NCAR Command Language Version 6.3.0
>> The use of this software is governed by a License Agreement.
>> See http://www.ncl.ucar.edu/ for more details.
>>
>> Variable: cod
>> Type: float
>> Total Size: 64980 bytes
>> 16245 values
>> Number of Dimensions: 2
>> Dimensions and sizes: [lat | 45] x [lon | 361]
>> Coordinates:
>> lat: [ 45.. 89]
>> lon: [-180.. 180]
>> Number Of Attributes: 3
>> _FillValue : -999
>> remap : remapped via ESMF_regrid_with_weights: Bilinear
>> missing_value : -999
>> Error in "cremapbin":
>> Could not map global lat array into grid array
>> Abort (core dumped)
>>
>> any thoughts?
>>
>>
>>
>> Thank you,
>> Rashed
>>
>>
>>
>>
>>
>>
>
> _______________________________________________
> 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/20170228/f55aa4e1/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rashad_mahmood.ncl
Type: text/x-ncl
Size: 1700 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170228/f55aa4e1/attachment.bin
More information about the ncl-talk
mailing list