ESCOMP / ESCOMP/CMEPS

Trying to get mesh out of `cpl_scalars` field

Open
#398 6 comments 0 reactions 1 assignee Claimed by @uturuncoglu View on GitHub
bug
Dominant language
Fortran
Stars
35
Forks
106
Avg merge
6d 5h
Merged PRs (30d)
4

Description

It seems that following if statement is not working properly and tries to get mesh out of `cpl_scalars`.

https://github.com/ESCOMP/CMEPS/blob/98dcf46c8886104b95cddfd5b02588b3dd9f6722/mediator/med_methods_mod.F90#L390

Just before the if statement the code tries to remove the `cpl_scalars` from the field list but it is still in the FB and if it is the first field then CMEPS fails with following error (I put couple of more print statement to be sure) because it uses `cpl_scalars`.

```
20230731 224553.040 INFO PET00 (med_methods_FB_init):FB FBImpatm_wav fieldNameList from STflds
20230731 224553.040 INFO PET00 (med_methods_FB_init):Sa_u10m
20230731 224553.040 INFO PET00 (med_methods_FB_init):Sa_v10m
20230731 224553.040 INFO PET00 (med_methods_FB_init):cpl_scalars
20230731 224553.040 INFO PET00 (med_methods_FB_init):cpl_scalars removed ...
20230731 224553.040 INFO PET00 (med_methods_FB_init):Sa_u10mloop again
20230731 224553.040 INFO PET00 (med_methods_FB_init):Sa_v10mloop again
20230731 224553.040 INFO PET00 (med_methods_FB_init):cpl_scalars mesh from STgeom
20230731 224553.040 ERROR PET00 ESMF_GeomBase.F90:997 ESMF_GeomBaseGet Value unrecognized or out of range - Grid not geometry type
20230731 224553.040 ERROR PET00 ESMF_FieldGet.F90:487 ESMF_FieldGetDefault Value unrecognized or out of range - Internal subroutine call returned Error
20230731 224553.040 ERROR PET00 med_methods_mod.F90:431 Value unrecognized or out of range - Passing error in return code
20230731 224553.040 ERROR PET00 med.F90:1744 Value unrecognized or out of range - Passing error in return code
20230731 224553.040 ERROR PET00 MED:src/addon/NUOPC/src/NUOPC_ModelBase.F90:1639 Value unrecognized or out of range - Passing error in return code
20230731 224553.040 ERROR PET00 UFS Driver Grid Comp:src/addon/NUOPC/src/NUOPC_Driver.F90:2577 Value unrecognized or out of range - Phase 'IPDv03p7' Initialize for modelComp 1: MED did not return ESMF_SUCCESS
20230731 224553.040 ERROR PET00 UFS Driver Grid Comp:src/addon/NUOPC/src/NUOPC_Driver.F90:2408 Value unrecognized or out of range - Passing error in return code
20230731 224553.040 ERROR PET00 UFS Driver Grid Comp:src/addon/NUOPC/src/NUOPC_Driver.F90:2192 Value unrecognized or out of range - Passing error in return code
20230731 224553.040 ERROR PET00 UFS Driver Grid Comp:src/addon/NUOPC/src/NUOPC_Driver.F90:463 Value unrecognized or out of range - Passing error in return code
20230731 224553.040 ERROR PET00 UFS.F90:386 Value unrecognized or out of range - Aborting UFS
```

Anyway, I think assuming first field is not `cpl_scalars` is not a generic solution and it could fail in some cases. Anyway, I'll try to fix it in CMEPS side as a part of the work in Coastal App side if you agree that this is an issue.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.