[ncl-talk] error ESMF_regrid

Mary Haley haley at ucar.edu
Mon May 15 21:42:30 MDT 2017


​Hi Vanúcia,

​
Just an FYI about what's going on here:

With the destination grid, if you provide one-dimensional arrays for lat
and lon that are both the same length (let's called the length DLEN), the
regridding code has no idea if your intention is to regrid the data to a
rectilinear grid that is DLEN x DLEN, or to an unstructured set of random
points of length DLEN.  This is why you
​ are​
get the warning:

 get_dst_grid_info: Error: the lat/lon arrays are both 1D and the same
length.
   This could be a rectilinear or unstructured grid. Please set 'grid_type'


Since you
​said you wanted
 to regrid to a 1 degree grid, you did the right thing by setting:

Opt at DstGridType = "rectilinear"


​I should point out, however, that if you want to regrid to a 1 degree
grid, you could have also just set:

Opt at DstGridType = "1deg"


and then you don't need to set:

Opt at DstGridLat     = latDst
Opt at DstGridLon     = lonDst


​How​ever, setting DstGridLat and DstGridLon yourself should be okay.

I'm not sure what you mean by "the out_file It's a mess, with the
curvilinear grid."
​  I am downloading the files you provided and will take a look.

--Mary


On Mon, May 15, 2017 at 7:35 PM, Vanúcia Schumacher <
vanucia-schumacher at hotmail.com> wrote:

> Hi
>
>
> I sent via ftp site the complete script, and
>
> the 2_file and 3_file used. Sorry, but I can't to reduze the size of the
> 1_file (shf_asr-2000-classic.nc) to send via ftp, but I attached in this
> e-mail (https://1drv.ms/f/s!AhH-sSGcLfkLj0WsaPkz5a_nbuo4)
> [image: imageData708542]
> <https://1drv.ms/f/s!AhH-sSGcLfkLj0WsaPkz5a_nbuo4>
> help <https://1drv.ms/f/s!AhH-sSGcLfkLj0WsaPkz5a_nbuo4>
> Compartilhado via OneDrive
>
>
> I include the line Opt at DstGridType = "rectilinear" and  the script works,
> but the out_file It's a mess, with the curvilinear grid.
>
> I would like to regress the file_1 (shf_asr-2000-classic.nc) to
> resolution of 1ºx1º with the grid rectilinear. I can not do this correctly.
>
>
> The names of the files:
>
>
> file_1 used: shf_asr-2000-classic.nc
>
>
> file_2: asr15km.static.2d.2007070100.nc
>
> file_3: shf_era-1x1.nc
>
>
> Thanks
> ------------------------------
> *De:* Kevin Hallock <hallock at ucar.edu>
> *Enviado:* segunda-feira, 15 de maio de 2017 21:53:51
> *Para:* Vanúcia Schumacher
> *Cc:* ncl-talk at ucar.edu
> *Assunto:* Re: [ncl-talk] error ESMF_regrid
>
> Hi,
>
> Could you please provide the complete script you are trying to run?
>
> Thanks,
> Kevin
>
> On May 15, 2017, at 10:57 AM, Vanúcia Schumacher <
> vanucia-schumacher at hotmail.com> wrote:
>
> Hi NCL users,
>
> I am trying to interpolate a data to a resolution of 1x1, but it is
> returning the following error:
>
> Thank you any collaboration
>
> (0) get_src_grid_info: source lat dims = (120,120)
> (0) get_src_grid_info: source lon dims = (120,120)
> (0) get_src_grid_info: source grid type is 'curvilinear'
> (0) curvilinear_to_SCRIP: calculating grid corners...
> (0) curvilinear_to_SCRIP: no lat values are at the poles, so
> (0)       calculating grid corners using
> (0)       calc_SCRIP_corners_noboundaries...
> (0) calc_SCRIP_corners_noboundaries
> (0)     min/max original lat: 24.6335/89.8972
> (0)     min/max original lon: -179.998/179.975
> (0) calc_SCRIP_corners_noboundaries
> (0)     min/max Extlat2d: 23.76/89.8972
> (0)     min/max Extlon2d: -179.998/179.975
> (0) calc_SCRIP_corners_noboundaries
> (0)     min/max ExtGridCenter_lat: 24.1982/89.2938
> (0)     min/max ExtGridCenter_lon: -179.399/179.417
> (0) get_dst_grid_info: destination lat dims = (360)
> (0) get_dst_grid_info: destination lon dims = (360)
> (0) get_dst_grid_info: Error: the lat/lon arrays are both 1D and the same
> length.
> (0)   This could be a rectilinear or unstructured grid. Please set
> 'grid_type'
> (0)   to 'rectilinear' or 'unstructured'.
>
>
> Variable: varSrc0
> Type: float
> Total Size: 323481600 bytes
>             80870400 values
> Number of Dimensions: 3
> Dimensions and sizes:  [Time | 156] x [XLAT | 720] x [XLONG | 720]
> Coordinates:
>             Time: [868188..981394.5]
> Number Of Attributes: 6
>   FieldType : 104
>   MemoryOrder :  XY
>   description :  LATENT HEAT FLUX AT THE SURFACE
>   units : W m-2
>   stagger :
>   coordinates :  XLONG XLAT
>
> Opt                = True
> Opt at SrcGridLat     = latSrc
> Opt at SrcGridLon     = lonSrc
> Opt at DstGridLat     = latDst
> Opt at DstGridLon     = lonDst
> Opt at SrcRegional    = True ; because the source grid (ASR)  is a regional
> grid
> Opt at DstRegional    = False ; if regriddin to global; set to True if
> smoothing ASR
> Opt at InterpMethod   = "bilinear" ; this is the default method
> Opt at NoPETLog       = True
> Opt at RemoveSrcFile  = True
> Opt at RemoveDstFile  = True
> Opt at RemoveWgtFile  = True
> Opt at Debug          = True ; set this to False to make it less verbose
> Opt at CopyVarCoords  = True ; if True, the lat-lon data will be attached as
> Opt at ForceOverwrite = True
>
>
> ; Regridding function
>
> varDst0 = ESMF_regrid(varSrc0,Opt)
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> _______________________________________________
> 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/20170515/c08663dd/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OutlookEmoji-imageData708542.png
Type: image/png
Size: 1785 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170515/c08663dd/attachment.png 


More information about the ncl-talk mailing list