-
Notifications
You must be signed in to change notification settings - Fork 79
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
Changes for the addition of a new dglc component #445
Conversation
Previously we hadn't been doing the mapping from MED -> GLC when CISM was running in NOEVOLVE mode. This was a problem because this downscaled SMB is one of the main benefits of running CISM in NOEVOLVE mode. Resolves ESCOMP#426. See that issue for details. One other change here is that I skip GLC -> MED in NOEVOLVE mode. I *think* that's a safe thing to do, but I'm not 100% sure of it.
When this was based on run_glc, NOEVOLVE cases were failing like this: 20240319 135112.648 ERROR PET0000 ESMF_ArrayGet.F90:1949 ESMF_ArrayGetFPtr Object being used before creation - Bad Object 20240319 135112.649 ERROR PET0000 ESMF_FieldGet.F90:2634 ESMF_FieldGetDataPtr Object being used before creation - Internal subroutine call returned Error 20240319 135112.649 ERROR PET0000 nuopc_shr_methods.F90:304 Object being used before creation - Passing error in return code 20240319 135112.649 ERROR PET0000 glc_import_export.F90:475 Object being used before creation - Passing error in return code 20240319 135112.649 ERROR PET0000 glc_comp_nuopc.F90:481 Object being used before creation - Passing error in return code 20240319 135112.649 ERROR PET0000 ESM0001:src/addon/NUOPC/src/NUOPC_Driver.F90:2901 Object being used before creation - Phase 'IPDv01p3' Initialize for modelComp 3: GLC did not return ESMF_SUCCESS 20240319 135112.649 ERROR PET0000 ESM0001:src/addon/NUOPC/src/NUOPC_Driver.F90:1985 Object being used before creation - Passing error in return code 20240319 135112.649 ERROR PET0000 ensemble:src/addon/NUOPC/src/NUOPC_Driver.F90:2901 Object being used before creation - Phase 'IPDv02p3' Initialize for modelComp 1: ESM0001 did not return ESMF_SUCCESS 20240319 135112.649 ERROR PET0000 ensemble:src/addon/NUOPC/src/NUOPC_Driver.F90:1990 Object being used before creation - Passing error in return code 20240319 135112.649 ERROR PET0000 ensemble:src/addon/NUOPC/src/NUOPC_Driver.F90:489 Object being used before creation - Passing error in return code 20240319 135112.649 ERROR PET0000 esmApp.F90:134 Object being used before creation - Passing error in return code 20240319 135112.649 INFO PET0000 Finalizing ESMF This fails in the InitializeRealize call to export_fields, and specifically in this: ! Set scalars in export state call State_SetScalar(dble(get_nx_tot(instance_index=ns)), flds_scalar_index_nx, & NStateExp(ns), flds_scalar_name, flds_scalar_num, rc) So it seems like we need to have GLC -> MED in the run sequence for initialization to work correctly.
… is relative to the mediator (as is the case with history and restart files)
… history file capability
@@ -170,7 +170,8 @@ subroutine med_phases_profile(gcomp, rc) | |||
call ESMF_TimeGet(nexttime, timestring=nexttimestr, rc=rc) | |||
if (med_utils_ChkErr(rc,__LINE__,u_FILE_u)) return | |||
! get current wall clock time | |||
call ESMF_TimeSet(wallclockTime, calkindflag=ESMF_CALKIND_GREGORIAN, rc=rc) | |||
! s=0 is to prevent an internal divide by 0 error in esmf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mvertens I think that a further optimization is possible here. Make wallclocktime a saved variable and move lines 174-175 to the first iteration only - line 120. I'm out today or I would try it myself.
@jedwards4b - thanks for bringing this up. I'm on travel until 4/8. I can look at this on 4/9. |
@jedwards4b - can we please merge this PR now and deal with the optimization later. We really need this in order for the dglc capability to work. I'm happy to work on the optimization issue as soon as possible. |
I actually have that change in another PR - no worries. |
Description of changes
Updates for adding a cdeps dglc component
Specific notes
Contributors other than yourself, if any: None
CMEPS Issues Fixed: None
Are changes expected to change answers? bfb
Any User Interface Changes: Only if are using the new dglc component, otherwise no.
Testing performed
The testing was done with the new dglc component on derecho.
The changes should not effect any other existing CESM configuration.
I can run a separate test suite if needed.