[ncl-talk] ESMF_Regrid conserve method: issue with concave cells

Mary Haley haley at ucar.edu
Fri Nov 2 09:09:20 MDT 2018


Hi Michelle,

I've been looking into this, trying to use a POP grid that I already had,
but it would be better if I could have access to your files.  Is there a
way you can provide them? You can email me offline about this.

The "conserve" method does depend on the grid corners. NCL will calculate
these using a simplistic method, but this method may not always work for
more complex grids. In that case, it works better if you provide the
corners yourself.

The issue comes in at the poles, where it gets tricky to calculate corners
for a point that is on or near one of the poles.

--Mary






On Tue, Oct 30, 2018 at 1:27 PM, Michele Petrini - CITG <
M.Petrini at tudelft.nl> wrote:

> Dear helpdesk,
>
> I am trying to remap between two global grids (POP and CLM grids within
> CESM) using ESMF_regrid. When I use the bilinear method everything is fine,
> but when I set the interpolation method to ‘conserve’ I get the following
> error
>
> 20181030 115834.017 ERROR            PET0 ~~~~~~~~~~~~~~~~~~~~ Concave
> Element Detected ~~~~~~~~~~~~~~~~~~~~
> 20181030 115834.017 ERROR            PET0   concave elem. id=87076
> 20181030 115834.017 ERROR            PET0
> 20181030 115834.017 ERROR            PET0   concave elem. coords (lon
> [-180 to 180], lat [-90 to 90]) (x,y,z)
> 20181030 115834.017 ERROR            PET0   ------------------------------
> -----------------------------------
> 20181030 115834.017 ERROR            PET0     0  (-0.810791,  26.868742)
> (0.891955, -0.012623, 0.451948)
> 20181030 115834.017 ERROR            PET0     1  (-179.690491,
> 26.890459)  (-0.891860, -0.004818, 0.452286)
> 20181030 115834.017 ERROR            PET0     2  (-179.702637,
> 27.371189)  (-0.888035, -0.004609, 0.459753)
> 20181030 115834.017 ERROR            PET0     3  (-0.822662,  27.348597)
> (0.888136, -0.012753, 0.459403)
> 20181030 115834.017 ERROR            PET0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 20181030 115834.018 ERROR            PET0 ESMCI_Regrid_F.C:149
> c_esmc_regrid_create() Invalid argument - Src contains a concave cell
> 20181030 115834.019 ERROR            PET0 ESMCI_Regrid_F.C:434
> c_esmc_regrid_create() Invalid argument Internal subroutine call returned
> Error
> 20181030 115834.019 ERROR            PET0 ESMF_Regrid.F90:321
> ESMF_RegridStore Invalid argument - Internal subroutine call returned Error
> 20181030 115834.019 ERROR            PET0 ESMF_FieldRegrid.F90:1008
> ESMF_FieldRegridStoreNX Invalid argument - Internal subroutine call
> returned Error
> 20181030 115834.019 ERROR            PET0 ESMF_RegridWeightGen.F90:1152
> ESMF_RegridWeightGenFile Invalid argument - Internal subroutine call
> returned Error
> 20181030 115931.854 INFO             PET0 Running with ESMF Version
> 6.3.0rp1
> 20181030 115931.888 INFO             PET0 Running with ESMF Version
> 6.3.0rp1
> 20181030 115931.946 INFO             PET0 Running with ESMF Version
> 6.3.0rp1
> 20181030 115933.251 ERROR            PET0 ~~~~~~~~~~~~~~~~~~~~ Concave
> Element Detected ~~~~~~~~~~~~~~~~~~~~
> 20181030 115933.251 ERROR            PET0   concave elem. id=87076
> 20181030 115933.251 ERROR            PET0
> 20181030 115933.251 ERROR            PET0   concave elem. coords (lon
> [-180 to 180], lat [-90 to 90]) (x,y,z)
> 20181030 115933.251 ERROR            PET0   ------------------------------
> -----------------------------------
> 20181030 115933.251 ERROR            PET0     0  (-0.810791,  26.868742)
> (0.891955, -0.012623, 0.451948)
> 20181030 115933.251 ERROR            PET0     1  (-179.690491,
> 26.890459)  (-0.891860, -0.004818, 0.452286)
> 20181030 115933.251 ERROR            PET0     2  (-179.702637,
> 27.371189)  (-0.888035, -0.004609, 0.459753)
> 20181030 115933.251 ERROR            PET0     3  (-0.822662,  27.348597)
> (0.888136, -0.012753, 0.459403)
> 20181030 115933.251 ERROR            PET0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 20181030 115933.251 ERROR            PET0 ESMCI_Regrid_F.C:149
> c_esmc_regrid_create() Invalid argument - Src contains a concave cell
> 20181030 115933.251 ERROR            PET0 ESMCI_Regrid_F.C:434
> c_esmc_regrid_create() Invalid argument Internal subroutine call returned
> Error
> 20181030 115933.251 ERROR            PET0 ESMF_Regrid.F90:321
> ESMF_RegridStore Invalid argument - Internal subroutine call returned Error
> 20181030 115933.251 ERROR            PET0 ESMF_FieldRegrid.F90:1008
> ESMF_FieldRegridStoreNX Invalid argument - Internal subroutine call
> returned Error
> 20181030 115933.253 ERROR            PET0 ESMF_RegridWeightGen.F90:1152
> ESMF_RegridWeightGenFile Invalid argument - Internal subroutine call
> returned Error
> 20181030 120325.539 INFO             PET0 Running with ESMF Version
> 6.3.0rp1
> 20181030 120325.574 INFO             PET0 Running with ESMF Version
> 6.3.0rp1
> 20181030 120325.626 INFO             PET0 Running with ESMF Version
> 6.3.0rp1
>
> Below the messages during runtime (I am using the debug flag)
>
> (0) Longitude (T grid) (degrees_east) : min=0.0159107   max=359.995
> (0) Latitude (T grid) (degrees_north) : min=-79.22   max=89.6524
> (0) longitude (degrees east) : min=0   max=358.7499999999999
> (0) latitude (degrees north) : min=-90   max=90
> (0) get_src_grid_info: source lat dims = (384,320)
> (0) get_src_grid_info: source lon dims = (384,320)
> (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: -79.22/89.6524
> (0)     min/max original lon: 0.0159107/359.995
> (0) calc_SCRIP_corners_noboundaries
> (0)     min/max Extlat2d: -79.7543/89.6524
> (0)     min/max Extlon2d: 0.0159107/359.995
> (0) calc_SCRIP_corners_noboundaries
> (0)     min/max ExtGridCenter_lat: -79.4871/89.6421
> (0)     min/max ExtGridCenter_lon: 0.606546/359.423
> (0) =====> CPU Elapsed Time: curvilinear_to_SCRIP: 0.112 seconds <=====
> (0) get_dst_grid_info: destination lat dims = (192,288)
> (0) get_dst_grid_info: destination lon dims = (192,288)
> (0) curvilinear_to_SCRIP: calculating grid corners...
> (0) curvilinear_to_SCRIP: one or more lat values are at the
> (0)       poles, so calculating grid corners using
> (0)       calc_SCRIP_corners_boundaries...
> (0) calc_SCRIP_corners_boundaries
> (0)     min/max original lat: -90/90
> (0)     min/max original lon: 0/358.7499999999999
> (0) calc_SCRIP_corners_boundaries
> (0)     min/max grid_corner_lat2d: -90/90
> (0)     min/max grid_corner_lon2d: 0/358.7499999999999
> (0) calc_SCRIP_corners_boundaries
> (0)     min/max grid_corner_lat: -90/90
> (0)     min/max grid_corner_lon: 0/358.7499999999999
> (0) =====> CPU Elapsed Time: curvilinear_to_SCRIP: 1.708 seconds <=====
> (0) ESMF_regrid_gen_weights: number of processors used: 1
> (0) --------------------------------------------------
> (0) ESMF_regrid_gen_weights: the following command is about to be
> executed on the system:
> (0) 'ESMF_RegridWeightGen --source source_grid_file.nc --destination
> destination_grid_file.nc --weight weights_file.nc --method conserve -i
> --norm_type fracarea'
> (0) --------------------------------------------------
> (0) ESMF_regrid_gen_weights: output from 'ESMF_RegridWeightGen':
> (0)       Starting weight generation with these inputs:
> (1)         Source File: source_grid_file.nc
> (2)         Destination File: destination_grid_file.nc
> (3)         Weight File: weights_file.nc
> (4)         Source File is in SCRIP format
> (5)         Source Grid is a global grid
> (6)         Source Grid is a logically rectangular grid
> (7)         Destination File is in SCRIP format
> (8)         Destination Grid is a global grid
> (9)         Destination Grid is a logically rectangular grid
> (10)         Regrid Method: conserve
> (11)         Pole option: NONE
> (12)         Ignore unmapped destination points
> (13)         Norm Type: fracarea
> (14)
> (15)       ERROR: Problem on processor            0
> (16)       . Please see the PET*.RegridWeightGen.Log files for a
> traceback.
> (0) --------------------------------------------------
> (0) ESMF_regrid_gen_weights: 'ESMF_RegridWeightGen' was not successful.
>
> Reading previous questions answer, as far as I understand this can be
> solved by playing with lat/lon corners - but I am not sure if this applies
> to this case, too - and the explicit solution was communicated offline, so
> I am not sure how to proceed.
>
> Also, I see that by updating ESMF to version 7.0.1 this problem should not
> occur anymore - but I am running the ncl script on Cheyenne cluster, and i
> am not sure how to updated ESMF via module load.
>
> thanks for you help!
> Michele
>
> ******************************************************************
> Michele Petrini, PhD
>
> Department of Geoscience and Remote Sensing, TUDelft
> Delft, The Netherlands
>
> M.Petrini at tudelft.nl
> +39 3398367372
> michele.petrins (Skype alias)
>
>
>
>
> _______________________________________________
> 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/20181102/27df7c5b/attachment.html>


More information about the ncl-talk mailing list