Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem in model grids under ESMF 7.0.0 #15

Closed
uturuncoglu opened this issue Apr 23, 2016 · 7 comments
Closed

Problem in model grids under ESMF 7.0.0 #15

uturuncoglu opened this issue Apr 23, 2016 · 7 comments
Assignees
Labels

Comments

@uturuncoglu
Copy link
Owner

The model gives following error message after upgrading the code from ESMF 7.0.0_beta_38 to ESMF 7.0.0.

20160130 211836.877 ERROR PET95 ~~~~~~~~~~~~~~~~~~~~ Degenerate Element Detected ~~~~~~~~~~~~~~~~~~~~
20160130 211836.877 ERROR PET95 degenerate elem. id=149839
20160130 211836.877 ERROR PET95
20160130 211836.877 ERROR PET95 degenerate elem. coords (lon [-180 to 180], lat [-90 to 90]) (x,y,z)
20160130 211836.877 ERROR PET95 -----------------------------------------------------------------
20160130 211836.878 ERROR PET95 0 (31.097986, 44.492306) (0.610826, 0.368445, 0.700813)
20160130 211836.878 ERROR PET95 1 (31.180412, 44.485279) (0.610369, 0.369368, 0.700726)
20160130 211836.878 ERROR PET95 2 (31.180412, 44.485279) (0.610369, 0.369368, 0.700726)
20160130 211836.878 ERROR PET95 3 (31.097986, 44.492306) (0.610826, 0.368445, 0.700813)
20160130 211836.878 ERROR PET95 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20160130 211836.878 ERROR PET95 ESMCI_Mesh_Regrid_Glue.C:155 c_esmc_regrid_create() Invalid argument - - Src contains a cell that has corners close enough that the cell collapses to a line or point
20160130 211836.896 ERROR PET95 ESMCI_Mesh_Regrid_Glue.C:460 c_esmc_regrid_create() Invalid argument - Internal subroutine call returned Error
20160130 211836.896 ERROR PET95 /home/netapp/clima-users/users/uturunco/progs/esmf-7.0.0/src/Infrastructure/Mesh/src/ESMCI_MeshCap.C:514 MeshCap::regrid_create() Invalid argument - Internal subroutine call returned Error
20160130 211836.896 ERROR PET95 ESMF_Regrid.F90:342 ESMF_RegridStore Invalid argument - Internal subroutine call returned Error
20160130 211836.896 ERROR PET95 ESMF_FieldRegrid.F90:1163 ESMF_FieldRegridStoreNX Invalid argument - Internal subroutine call returned Error
20160130 211836.896 ERROR PET95 mod_esmf_cpl.F90:344 Invalid argument - Passing error in return code
20160130 211836.896 ERROR PET95 OCN-TO-ATM:src/addon/NUOPC/src/NUOPC_Connector.F90:1882 Invalid argument - Passing error in return code
20160130 211836.896 ERROR PET95 regesm:src/addon/NUOPC/src/NUOPC_Driver.F90:1301 Invalid argument - Phase 7 Initialize for connectorComp 2 -> 1: OCN-TO-ATM did not return ESMF_SUCCESS
20160130 211836.896 ERROR PET95 regesm:src/addon/NUOPC/src/NUOPC_Driver.F90:879 Invalid argument - Passing error in return code
20160130 211836.896 ERROR PET95 regesm.F90:107 Invalid argument - Passing error in return code

@uturuncoglu
Copy link
Owner Author

A support ticket "[3613884] interpolation problem in ESMF 7.0.0" is created in ESMF support. The initial response is

I think that the problem is with our degenerate cell detection. We added this capability a couple of releases ago, but it didn’t get turned on for non-conservative regridding (e.g. bilinear). We fixed that and turned it on for 7.0.0. This error is probably because you had a degenerate cell (one which collapses to a line). If you’re ok with that, then you can pass the flag: ignoreDegenerate=.true. into ESMF_FieldRegridStore() this’ll ignore the degenerate cells and not return an error (this was basically what was happening before this release). Sorry for the inconvenience.

@uturuncoglu
Copy link
Owner Author

uturuncoglu commented Apr 23, 2016

After setting ignoreDegenerate=.true. into all ESMF_FieldRegridStore() calls. The messages are dissepeared. See the following comment from ESMF support for more details

You likely have a cell that’s collapsed to a line or point (a degenerate cell) in your source grid someplace. Before this release, with bilinear regridding, those cells were being ignored by default. However, they we’re being ignored with conservative regridding and instead an error was returned. To make things consistent between those two methods, we changed the default for bilinear. It’s not necessarily bad to have a degenerate cell, and ignoring it is a reasonable way to handle them since they have 0-size no points should be mapped to them anyways. However, they can indicate unexpected problems with a grid, for example, we had a user who had their grid specified as larger than the actual coordinates they had, so they had a whole row of degenerate cells along one side. We made the error return the default, so users would see problems like this. I would say if it says you have degenerate cells and you don’t expect them, it’s not a bad idea to spend a little time looking at them to make sure that nothing unexpected is going on. If it seems reasonable that they should be in your grid, then don’t worry about it because they shouldn't cause problems in the regrinding.

@uturuncoglu
Copy link
Owner Author

uturuncoglu commented Apr 23, 2016

After extensive check, it seems that there is a minor problem in the grid definition of the ocean model component (ROMS). It seems that stagger locations (cross, dot, u and v points) are not defined correctly and the grid points in the boundary tiles are not filled with data. The issue is fixed by modifying staggerEdgeLWidth and staggerEdgeUWidth for stagger locations.

The corrected grid can be seen from following ParaView screenshot,

fixed_grid

@uturuncoglu
Copy link
Owner Author

uturuncoglu commented Apr 23, 2016

When ignoreDegenerate=.true. flag is removed from the all ESMF_FieldRegridStore() calls, ESMF still complains about the degenerate elem. coords. So, i am keeping this issue open but there is no problem in the interpolation between model components. The additional query is started with ESMF support.

@uturuncoglu
Copy link
Owner Author

uturuncoglu commented Aug 12, 2016

Still there is a problem in the grid definition. This is appeared in high resolution Black Sea model and there is a vertical empty stripe in the RHO, PSI and V points. I think, i need to revisit the staggerEdgeLWidth and staggerEdgeUWidth definitions for ROMS ocean model component.

grid_rho_r809

@tomakkermans
Copy link

Hello, i still have a similar issue using ESMF version 7.0.1; so i suppose the bug is not fixed in the meantime? my output in the log:

20170928 140324.942 INFO PET0 Running with ESMF Version 7.0.1
20170928 140510.118 ERROR PET0 ~~~~~~~~~~~~~~~~~~~~ Degenerate Element Detected ~~~~~~~~~~~~~~~~~~~~
20170928 140511.542 ERROR PET0 degenerate elem. id=1449497
20170928 140511.640 ERROR PET0
20170928 140511.640 ERROR PET0 degenerate elem. coords (lon [-180 to 180], lat [-90 to 90]) (x,y,z)
20170928 140511.640 ERROR PET0 -----------------------------------------------------------------
20170928 140511.725 ERROR PET0 0 (81.000000, 81.000000) (0.024472, 0.154508, 0.987688)
20170928 140511.725 ERROR PET0 1 (81.000000, 81.000000) (0.024472, 0.154508, 0.987688)
20170928 140511.725 ERROR PET0 2 (81.000000, 81.000000) (0.024472, 0.154508, 0.987688)
20170928 140511.725 ERROR PET0 3 (81.000000, 81.000000) (0.024472, 0.154508, 0.987688)
20170928 140511.725 ERROR PET0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20170928 140511.782 ERROR PET0 ESMCI_Mesh_Regrid_Glue.C:155 c_esmc_regrid_create() Invalid argument - - Src contains a cell that has corners close enough that the cell collapses to a line or point
20170928 140512.037 ERROR PET0 ESMCI_Mesh_Regrid_Glue.C:460 c_esmc_regrid_create() Invalid argument - Internal subroutine call returned Error
20170928 140512.040 ERROR PET0 /home/tomakker/compile/esmf/src/Infrastructure/Mesh/src/ESMCI_MeshCap.C:514 MeshCap::regrid_create() Invalid argument - Internal subroutine call returned Error
20170928 140512.043 ERROR PET0 ESMF_Regrid.F90:342 ESMF_RegridStore Invalid argument - Internal subroutine call returned Error
20170928 140512.047 ERROR PET0 ESMF_FieldRegrid.F90:1133 ESMF_FieldRegridStoreNX Invalid argument - Internal subroutine call returned Error
20170928 140512.268 ERROR PET0 ESMF_RegridWeightGen.F90:1303 ESMF_RegridWeightGenFile Invalid argument - Internal subroutine call returned Error

As input, i use a netcdf file with curvilinear grid (AVHRR radiances on swath pixels), with separate 2D fields for lon and lat.

thanks for helping me out!

Tom

@uturuncoglu
Copy link
Owner Author

Can you try with ESMF 7.1.0b31? You could download it using following command,

git archive --remote=git://git.code.sf.net/p/esmf/esmf --format=tar --prefix=esmf/ ESMF_7_1_0_beta_snapshot_31 | tar xf -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants