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

Correct ocean conservation check settings #6643

Merged
merged 7 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cime_config/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@
"SMS_D_Ld1.T62_oQU240wLI.GMPAS-IAF-PISMF.mpaso-impl_top_drag",
"SMS_D_Ld1.T62_oQU240.GMPAS-IAF.mpaso-harmonic_mean_drag",
"SMS_D_Ld1.T62_oQU240.GMPAS-IAF.mpaso-upwind_advection",
"ERS_Ld5_D.T62_oQU240.GMPAS-IAF.mpaso-conservation_check",
)
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1232,37 +1232,10 @@

<!-- AM_conservationCheck -->
<config_AM_conservationCheck_enable>.false.</config_AM_conservationCheck_enable>
<config_AM_conservationCheck_enable ocn_grid="SOwISC12to60E2r4">.true.</config_AM_conservationCheck_enable>
<config_AM_conservationCheck_enable ocn_grid="ECwISC30to60E2r1">.true.</config_AM_conservationCheck_enable>
<config_AM_conservationCheck_enable ocn_grid="IcoswISC30E3r5">.true.</config_AM_conservationCheck_enable>
<config_AM_conservationCheck_enable ocn_grid="IcosXISC30E3r7">.true.</config_AM_conservationCheck_enable>
<config_AM_conservationCheck_enable ocn_grid="FRISwISC08to60E3r1">.true.</config_AM_conservationCheck_enable>
<config_AM_conservationCheck_enable ocn_grid="FRISwISC04to60E3r1">.true.</config_AM_conservationCheck_enable>
<config_AM_conservationCheck_enable ocn_grid="FRISwISC02to60E3r1">.true.</config_AM_conservationCheck_enable>
<config_AM_conservationCheck_enable ocn_grid="FRISwISC01to60E3r1">.true.</config_AM_conservationCheck_enable>
<config_AM_conservationCheck_enable ocn_grid="RRSwISC6to18E3r5">.true.</config_AM_conservationCheck_enable>
<config_AM_conservationCheck_compute_interval>'dt'</config_AM_conservationCheck_compute_interval>
<config_AM_conservationCheck_output_stream>'conservationCheckOutput'</config_AM_conservationCheck_output_stream>
<config_AM_conservationCheck_compute_on_startup>.false.</config_AM_conservationCheck_compute_on_startup>
<config_AM_conservationCheck_compute_on_startup ocn_grid="SOwISC12to60E2r4">.true.</config_AM_conservationCheck_compute_on_startup>
<config_AM_conservationCheck_compute_on_startup ocn_grid="ECwISC30to60E2r1">.true.</config_AM_conservationCheck_compute_on_startup>
<config_AM_conservationCheck_compute_on_startup ocn_grid="IcoswISC30E3r5">.true.</config_AM_conservationCheck_compute_on_startup>
<config_AM_conservationCheck_compute_on_startup ocn_grid="IcosXISC30E3r7">.true.</config_AM_conservationCheck_compute_on_startup>
<config_AM_conservationCheck_compute_on_startup ocn_grid="FRISwISC08to60E3r1">.true.</config_AM_conservationCheck_compute_on_startup>
<config_AM_conservationCheck_compute_on_startup ocn_grid="FRISwISC04to60E3r1">.true.</config_AM_conservationCheck_compute_on_startup>
<config_AM_conservationCheck_compute_on_startup ocn_grid="FRISwISC02to60E3r1">.true.</config_AM_conservationCheck_compute_on_startup>
<config_AM_conservationCheck_compute_on_startup ocn_grid="FRISwISC01to60E3r1">.true.</config_AM_conservationCheck_compute_on_startup>
<config_AM_conservationCheck_compute_on_startup ocn_grid="RRSwISC6to18E3r5">.true.</config_AM_conservationCheck_compute_on_startup>
<config_AM_conservationCheck_write_on_startup>.false.</config_AM_conservationCheck_write_on_startup>
<config_AM_conservationCheck_write_on_startup ocn_grid="SOwISC12to60E2r4">.true.</config_AM_conservationCheck_write_on_startup>
<config_AM_conservationCheck_write_on_startup ocn_grid="ECwISC30to60E2r1">.true.</config_AM_conservationCheck_write_on_startup>
<config_AM_conservationCheck_write_on_startup ocn_grid="IcoswISC30E3r5">.true.</config_AM_conservationCheck_write_on_startup>
<config_AM_conservationCheck_write_on_startup ocn_grid="IcosXISC30E3r7">.true.</config_AM_conservationCheck_write_on_startup>
<config_AM_conservationCheck_write_on_startup ocn_grid="FRISwISC08to60E3r1">.true.</config_AM_conservationCheck_write_on_startup>
<config_AM_conservationCheck_write_on_startup ocn_grid="FRISwISC04to60E3r1">.true.</config_AM_conservationCheck_write_on_startup>
<config_AM_conservationCheck_write_on_startup ocn_grid="FRISwISC02to60E3r1">.true.</config_AM_conservationCheck_write_on_startup>
<config_AM_conservationCheck_write_on_startup ocn_grid="FRISwISC01to60E3r1">.true.</config_AM_conservationCheck_write_on_startup>
<config_AM_conservationCheck_write_on_startup ocn_grid="RRSwISC6to18E3r5">.true.</config_AM_conservationCheck_write_on_startup>
Comment on lines -1247 to -1265
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that we want all these changes based on my comment #6642 (comment)

<config_AM_conservationCheck_write_to_logfile>.true.</config_AM_conservationCheck_write_to_logfile>
<config_AM_conservationCheck_restart_stream>'conservationCheckRestart'</config_AM_conservationCheck_restart_stream>

Expand Down
2 changes: 1 addition & 1 deletion components/mpas-ocean/cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ def buildnml(case, caseroot, compname):
lines.append(' filename_interval="00-01-00_00:00:00"')
lines.append(' reference_time="01-01-01_00:00:00"')
lines.append(' output_interval="00-00-01_00:00:00"')
lines.append(' clobber_mode="truncate"')
lines.append(' clobber_mode="append"')
lines.append(' packages="conservationCheckAMPKG">')
lines.append('')
lines.append('<var name="xtime"/>')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
This testdef is used to test the conservation check analysis member, which
wasintroduced in MPAS-Ocean PR #4521 and has been made a stealth feature in
#6643. This test turns on the consevation check analysis member by setting:

config_AM_conservationCheck_enable = .true.

However, it shoudl be noted that MPAS-Ocean history files are not currently
included in E3SM testing so non-BFB results will not be detected unless one
manually changes to 'compname="mpaso" exclude_testing="false"' in the file
cime_config/config_archive.xml.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one quick comment -- even changing exclude_testing won't check any of the mpaso history files. Plus there's a minor misspelling: "shoudl"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonbob, okay, I understood that it would but I must be mistaken. I have removed this text and fixed the typo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xylar -- it should, but in practice none of the history files matches the file check in env_archive.xml. I did play around with it, and it works if we modify that file with this:

    <comp_archive_spec compclass="ocn" compname="mpaso">
      <rest_file_extension>rst</rest_file_extension>
      <rest_file_extension>rst.am.timeSeriesStatsMonthly</rest_file_extension>
      <hist_file_extension>hist.am.conservationCheck\..*\.nc$</hist_file_extension>
      <rest_history_varname>unset</rest_history_varname>

where I added the conservationCheck line -- or actually replaced a line that had no effect. Now it actually does use the conservationCheck am for the test: this from TestStatus.log:

    ERS_Ld5_D.T62_oQU240.GMPAS-IAF.chrysalis_intel.mpaso-conservation_check.20240925_131015_n3zwao.mpaso.hist.am.conservationCheck.0001-01-01.nc.base matched ERS_Ld5_D.T62_oQU240.GMPAS-IAF.chrysalis_intel.mpaso-conservation_check.20240925_131015_n3zwao.mpaso.hist.am.conservationCheck.0001-01-01.nc.rest
....
tail -n20 /lcrc/group/e3sm/ac.jwolfe/scratch/chrys/ERS_Ld5_D.T62_oQU240.GMPAS-IAF.chrysalis_intel.mpaso-conservation_check.20240925_131015_n3zwao/run/ERS_Ld5_D.T62_oQU240.GMPAS-IAF.chrysalis_intel.mpaso-conservation_check.20240925_131015_n3zwao.mpaso.hist.am.conservationCheck.0001-01-01.nc.base.cprnc.out

                   1   0.000000000000000E+00   0.000000000000000E+00
                   1   0.000000000000000E+00   0.000000000000000E+00
                   1  (     1) (     1)
          avg abs field values:    0.000000000000000E+00
                                   0.000000000000000E+00
************************************************************************************************************************************

SUMMARY of cprnc:
 A total number of    290 fields were compared
          of which      0 had non-zero differences
               and      0 had differences in fill patterns
               and      0 had different dimension sizes
               and      0 had different data types
 A total number of      5 fields could not be analyzed
 A total number of      0 time-varying fields on file 1 were not found on file 2.
 A total number of      0 time-constant fields on file 1 were not found on file 2.
 A total number of      0 time-varying fields on file 2 were not found on file 1.
 A total number of      0 time-constant fields on file 2 were not found on file 1.
  diff_test: the two files seem to be IDENTICAL

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, clearly a bigger can of worms that remains beyond the scope of this PR. Thanks for being more thorough than I was and for keeping things honest.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
config_AM_conservationCheck_enable = .true.