Skip to content

Comments

Add a debug B compset test with the standard configuration, and tests with aoflux_grid = agrid and ogrid#330

Merged
fischer-ncar merged 3 commits intoESCOMP:cesm3.0-alphabranchfrom
billsacks:add_aoflux_tests
Apr 11, 2025
Merged

Add a debug B compset test with the standard configuration, and tests with aoflux_grid = agrid and ogrid#330
fischer-ncar merged 3 commits intoESCOMP:cesm3.0-alphabranchfrom
billsacks:add_aoflux_tests

Conversation

@billsacks
Copy link
Member

Description of changes

My main motivation was adding tests with aoflux_grid = agrid and aoflux_grid = ogrid so that we continue to test those options now that the default is xgrid. However, in adding these, I noticed that we didn't have any debug B compset tests in the prealpha or prebeta test suites, so I also added one of those.

Specific notes

Contributors other than yourself, if any: none

Fixes: none

User interface changes?: No

Testing performed (automated tests and/or manual tests): Ran the new tests and verified that they pass

More detailed notes

My original plan was to do 7-hour ERS_D tests for these three configurations (standard configuration with xgrid; ogrid; agrid) (note that I introduced a new testmod to support these short tests: see an earlier commit in the history of this branch), but this caused problems in MOM:

  1. There was an issue in mom_cap.F90 due to do_advance being false but write_restart_eor being true in the first timestep of the initial run. It seems like an error that write_restart_eor was true in the first timestep, but I worked around it by moving the call ESMF_GridCompGetInternalState(gcomp, ocean_internalstate, rc) and ocean_state => ocean_internalstate%ptr%ocean_state_type_ptr to outside the do_advance conditional so that ocean_state would be associated in the restart code.
  2. After that change, COMPARE_base_rest failed for some MOM files, I think because the latest MOM files in this short run were from the initial time and these differed in some fields between the initial and restart runs.

@alperaltuntas - it seems like it might be worth resolving these issues at some point so that we can run shorter tests with MOM, but it doesn't feel urgent.

I decided to keep an ERS_D test of the standard configuration, lengthening it to 3 days to get around the MOM issues with shorter tests. It felt unnecessary to have an ERS test of agrid / ogrid, because my sense is that these different aoflux calculations don't seem to do anything with restart files (so there is no additional code coverage from having restart as opposed to smoke tests of those options, given that we have a restart test of the default xgrid option), so I introduced 1-day SMS tests of those. (However, I did run ERS_D_Ld3.ne30pg3_t232.BLT1850.derecho_intel.allactive-aoflux_ogrid and ERS_D_Ld3.ne30pg3_t232.BLT1850.derecho_intel.allactive-aoflux_agrid and verified that they currently pass.)

I spot-checked a few aoflux variables in the cpl hist file in the above two tests (agrid/ogrid) vs the original (xgrid); they look roughly similar in all 3 cases but not identical, as expected. I didn't do a careful investigation of this, though.

@mvertens and @jedwards4b - keeping you in the loop with these added tests. (Mariana, we exchanged some emails about this a few months ago but I'm just getting around to it now.)

Add a short debug B compset test with the standard configuration, along
with companion tests covering aoflux_grid=ogrid and aoflux_grid=agrid
rather than the now-default aoflux_grid=xgrid.
Trying to use ATM_NCPL leads to:
ERROR: assume that rof_cpl_time is always greater than or equal to ocn_cpl_time
It didn't work to do 7-hour ERS tests: this led to failures in the
comparisons of some MOM output files. (I didn't look into this
carefully, but at a glance, it looks like it was comparing the file from
the initial time, I guess because that was the only one available.)

I want a debug ERS test of the standard configuration, so I'm keeping
that but lengthening it to 3 days. For the agrid and ogrid, it doesn't
seem worth the compute time to make these ERS tests, because I'm not
sure that there is any different restart-related code covered for these
compared with the standard configuration; so I'm changing those to 1-day
SMS tests. (It would probably work to make them less than a day, but
making them 1 day lets us output component history files and avoid
changing coupling frequencies for any components.)
@fischer-ncar fischer-ncar merged commit 0a50f32 into ESCOMP:cesm3.0-alphabranch Apr 11, 2025
37 checks passed
@billsacks billsacks deleted the add_aoflux_tests branch April 15, 2025 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants