[ncl-talk] Problems with ESMF regridding
Barry Lynn
barry.h.lynn at gmail.com
Tue Aug 29 06:33:46 MDT 2023
Hi:
Perhaps this will help?
precip_o = a_r->A_PCP_GDS5_SFC_acc1h
dims_p = dimsizes(precip_o)
print(dims_p)
latitude := a_r->g5_lat_0
longitude := a_r->g5_lon_1
system("rm -f destination_grid_bulk_precip_file.nc ")
system("rm -f source_grid_bulk_precip_file.nc")
; If you are regridding to an unstructured grid, set:
;https://www.ncl.ucar.edu/Applications/Scripts/ESMF_regrid_21.ncl
Opt = True
; Opt at DstGridType = "unstructured"
; Opt at DstGridType = "curvilinear"
; Opt at InterpMethod = "bilinear" ;;---Change (maybe)
; Opt at InterpMethod = "conserve" ;;---Change (maybe)
Opt at InterpMethod = "patch" ;;---Change (maybe)
Opt at WgtFileName = "wrfout_temp_curv.nc"
Opt at SrcGridLat := latitude
Opt at SrcGridLon := longitude
Opt at SrcRegional = True ;;--Change (maybe)
;SrcFileName is just the name you want to give the intermediate NetCDF file
that gets created in order
;to describe your source grid to the ESMF_RegridWeightGen program. If you
don't set this, the
;intermediate file will be called "source_grid_bulk_precip_file.nc".
;I suggest not setting this at all, or, if you do set it, call it something
like "WRF_SCRIP_file.nc".
; Opt at SrcInputFileName = src_file ; optional, but good idea
; Opt at SrcInputFileName = a ; optional, but good idea
Opt at DstGridLat = xlat2d(:,:) ; destination grid
Opt at DstGridLon = xlon2d(:,:)
Opt at DstRegional = True ;;--Change (maybe)
Opt at ForceOverwrite = True
Opt at PrintTimings = False
Opt at Debug = True
grid = ESMF_regrid(precip_o,Opt) ; Do the regridding
printMinMax(grid,False)
printVarSummary(grid)
On Tue, Aug 29, 2023 at 2:11 PM Barry Lynn <barry.h.lynn at gmail.com> wrote:
> Hi:
>
> Are you regridding to a global grid?
>
> On Tue, Aug 29, 2023 at 12:29 PM G.Monte--- via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> Dears all,
>>
>> I have a problem with the regridding process; when I run the code whit the
>> ESMF_regrid function, I get the following error in the screenshot:
>>
>> Regrid Method: bilinear
>> Pole option: ALL
>> Ignore unmapped destination points
>> Ignore degenerate cells in the input grids
>> Line Type: cartesian
>> Norm Type: dstarea
>> Extrap. Method: none
>>
>> ERROR: Problem on processor 0 . Please see the
>> PET*.RegridWeightGen.Log files for a traceback.
>> --------------------------------------------------
>> ESMF_regrid_gen_weights: 'ESMF_RegridWeightGen' was not successful.
>>
>> ESMF_RegridWeightGenFile Library needed by ESMF not present - Internal
>> subroutine call returned Error (in the log file)
>>
>> I also looked for this library and I found it, at least I suppose so. How
>> can I solve this problem?
>>
>> Thanks in advance,
>> Giulio Monte
>>
>> _______________________________________________
>> 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 Scientist, Lecturer,
> The Institute of Earth Sciences,
> The Hebrew University of Jerusalem,
> Givat Ram, Jerusalem 91904, Israel
> Tel: 972 547 231 170
> Fax: (972)-25662581
>
> Weather It Is, LTD
> Weather and Climate Focus
> https://weather-it-is.com <http://weather-it-is.com>
> Jerusalem, Israel
> Local: 02 930 9525
> Cell: 054 7 231 170
> Int-IS: x972 2 930 9525
>
>
--
Barry H. Lynn, Ph.D
Senior Scientist, Lecturer,
The Institute of Earth Sciences,
The Hebrew University of Jerusalem,
Givat Ram, Jerusalem 91904, Israel
Tel: 972 547 231 170
Fax: (972)-25662581
Weather It Is, LTD
Weather and Climate Focus
https://weather-it-is.com <http://weather-it-is.com>
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20230829/81180fdb/attachment.htm>
More information about the ncl-talk
mailing list