[ncl-talk] Can ESMF_regrid be used for output Gaussian grid?

Rashed Mahmood rashidcomsis at gmail.com
Tue Feb 28 18:45:34 MST 2017


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
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170228/c1ab7e69/attachment.html 


More information about the ncl-talk mailing list