Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
10 changes: 6 additions & 4 deletions .github/workflows/srt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

name: scripts regression tests

# Controls when the action will run. Only runs when manually triggered. (See
# https://github.com/escomp/cmeps/issues/646 for discussion regarding why we don't run
# this automatically.)
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down
8 changes: 0 additions & 8 deletions cesm/driver/esm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,6 @@ subroutine InitAttributes(driver, rc)
use shr_wv_sat_mod , only : shr_wv_sat_make_tables, ShrWVSatTableSpec
use shr_wv_sat_mod , only : shr_wv_sat_get_scheme_idx, shr_wv_sat_valid_idx
use glc_elevclass_mod, only : glc_elevclass_init
use shr_wtracers_mod , only : shr_wtracers_init
!use shr_scam_mod , only : shr_scam_checkSurface

! input/output variables
Expand Down Expand Up @@ -545,13 +544,6 @@ subroutine InitAttributes(driver, rc)
call shr_wv_sat_make_tables(liquid_spec, ice_spec, mixed_spec)
end if

!----------------------------------------------------------
! Initialize water tracer info
!----------------------------------------------------------

call shr_wtracers_init(driver, maintask, rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return

end subroutine InitAttributes

!================================================================================
Expand Down
19 changes: 2 additions & 17 deletions cesm/share_wrappers/wtracers_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,15 @@ module wtracers_mod
! This module wraps shr_wtracers_mod from the CESM_share repository to avoid direct
! dependencies on this share code from CMEPS.
!
! It is acceptable for CESM-specific CMEPS code (e.g., in the cesm directory) to call
! directly into shr_wtracers_mod, but CMEPS code shared between CESM and other modeling
! systems (e.g., UFS) should go through this module.
!
! See also the version of wtracers_mod in the ufs directory for when we do not have
! access to the CESM_share library.
!-----------------------------------------------------------------------------

use shr_wtracers_mod, only : wtracers_present => shr_wtracers_present
use shr_wtracers_mod, only : wtracers_get_num_tracers => shr_wtracers_get_num_tracers
use shr_wtracers_mod, only : wtracers_is_wtracer_field => shr_wtracers_is_wtracer_field
use shr_wtracers_mod, only : wtracers_get_bulk_fieldname => shr_wtracers_get_bulk_fieldname
use shr_wtracers_mod, only : wtracers_check_tracer_ratios => shr_wtracers_check_tracer_ratios
use shr_wtracers_mod, only : WTRACERS_SUFFIX
use shr_wtracers_mod, only : wtracers_is_wtracer_field => shr_wtracers_is_wtracer_field

implicit none
private

public :: wtracers_present ! return true if there are water tracers in this simulation
public :: wtracers_get_num_tracers ! get number of water tracers in this simulation
public :: wtracers_is_wtracer_field ! return true if the given field name is a water tracer field
public :: wtracers_get_bulk_fieldname ! return the name of the equivalent bulk field corresponding to a water tracer field
public :: wtracers_check_tracer_ratios ! check tracer ratios against expectations

public :: WTRACERS_SUFFIX ! suffix for water tracer field names
public :: wtracers_is_wtracer_field ! return true if the given field name is a water tracer field

end module wtracers_mod
4 changes: 2 additions & 2 deletions cime_config/buildexe
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ def _main_func():
skip_mediator = False

if ocn_model == 'mom':
gmake_args += " USE_FMS=TRUE"
gmake_args += "USE_FMS=TRUE"

if link_libs is not None:
gmake_args += ' USER_SLIBS="{}"'.format(link_libs)
gmake_args += 'USER_SLIBS="{}"'.format(link_libs)

comp_classes = case.get_values("COMP_CLASSES")
for comp in comp_classes:
Expand Down
43 changes: 0 additions & 43 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,6 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
nmlgen.set_value("esp_cpl_dt", value=esp_time)
# End if pause is active

# --------------------------------
# Overwrite: set water tracers
# --------------------------------
_add_water_tracers(case.get_value("WATER_TRACERS"), nmlgen)

# --------------------------------
# Specify input data list file
# --------------------------------
Expand Down Expand Up @@ -558,44 +553,6 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
nmlgen.write_output_file(drv_flds_in)


###############################################################################
def _add_water_tracers(water_tracers_xml, nmlgen):
###############################################################################

if not water_tracers_xml.strip():
water_tracers = []
else:
water_tracers = water_tracers_xml.split(":")
tracer_names = []
tracer_species = []
tracer_initial_ratios = []

for tracer in water_tracers:
# Each item in the list consists of a name and then, optionally, a '%' followed by
# the isotope species for this tracer. For standard water tracers (i.e., tracers
# of bulk water), the list item will only contain the name (without a '%').
expect(
tracer.count("%") <= 1,
f"Invalid WATER_TRACERS element, '{tracer}': Each element of WATER_TRACERS must contain at most 1 '%' separator",
)
parts = tracer.split("%")
tracer_names.append(parts[0])
if len(parts) > 1:
tracer_species.append(parts[1])
# We could check the validity of the species name here (confirming that it's
# one of the handled species), but that would lead to this allowed list being
# replicated in multiple places (here as well as in the Fortran), which would
# make it more difficult to add new species later. So we're deferring this
# check to runtime.
else:
tracer_species.append("-")
tracer_initial_ratios.append("1.0")

nmlgen.add_default("water_tracer_names", ":".join(tracer_names))
nmlgen.add_default("water_tracer_species", ":".join(tracer_species))
nmlgen.add_default("water_tracer_initial_ratios", ":".join(tracer_initial_ratios))


###############################################################################
def _create_runseq(case, coupling_times, valid_comps):
###############################################################################
Expand Down
27 changes: 1 addition & 26 deletions cime_config/config_component_cesm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@
</entry>

<!-- ===================================================================== -->
<!-- controls over various other options -->
<!-- averaged history frequencies -->
<!-- ===================================================================== -->

<entry id="BUDGETS">
Expand Down Expand Up @@ -581,30 +581,5 @@
<desc>Freezing point calculation for salt water.</desc>
</entry>

<entry id="WATER_TRACERS">
<type>char</type>
<default_value></default_value>
<group>run_coupling</group>
<file>env_run.xml</file>
<desc>
Colon-delimited list of water tracers enabled in this run.

Each item in the list consists of a name and then, optionally, a '%' followed by the
isotope species for this tracer. For standard water tracers (i.e., tracers of bulk
water), the list item will only contain the name (without a '%'). The name can be
anything; if an isotope species is specified, it must match one of the implemented
water isotopes: H218O, H217O or HDO. By convention, a tracer that is the full
quantity of a given isotope will have a name that is identical to the species (e.g.,
H218O:H218O).

For example, this list could be:
MyRegularTracer:HDO%HDO:H218O%H218O:SomeOtherTracer:MyHdoTracer%HDO:YetAnotherTracer

This specifies three standard (bulk water) tracers (MyRegularTracer, SomeOtherTracer
and YetAnotherTracer), two isotopes (HDO and H218O), and a tracer that is a subset
of HDO (MyHdoTracer). (Note that the ordering in the list is not important.)
</desc>
</entry>


</entry_id>
77 changes: 13 additions & 64 deletions cime_config/namelist_definition_drv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,7 @@
</desc>
<values>
<value>on</value>
<value COMP_LND="xlnd">off</value>
</values>
</entry>
<entry id="remove_negative_runoff_lnd">
Expand Down Expand Up @@ -2181,10 +2182,6 @@
<desc>Number of time samples per file.</desc>
<values>
<value>30</value>
<!-- Generate daily WW3 hist files for ERS/ERI tests to prevent mismatched filenames
and contents between initial and restart runs.-->
<value TESTCASE='ERS'>1</value>
<value TESTCASE='ERI'>1</value>
</values>
</entry>

Expand Down Expand Up @@ -2536,6 +2533,18 @@
</values>
</entry>

<entry id="flds_wiso" modify_via_xml="FLDS_WISO">
<type>logical</type>
<category>flds</category>
<group>ALLCOMP_attributes</group>
<desc>
Pass water isotopes between components
</desc>
<values>
<value>.false.</value>
</values>
</entry>

<entry id="flds_r2l_stream_channel_depths">
<type>logical</type>
<category>flds</category>
Expand Down Expand Up @@ -2586,66 +2595,6 @@
</values>
</entry>

<entry id="water_tracer_names" modify_via_xml="WATER_TRACERS" skip_default_entry="true">
<type>char</type>
<category>water_tracers</category>
<group>ALLCOMP_attributes</group>
<desc>
Colon-delimited list of names of water tracers in this run.
</desc>
<values>
<value></value>
</values>
</entry>

<entry id="water_tracer_species" modify_via_xml="WATER_TRACERS" skip_default_entry="true">
<type>char</type>
<category>water_tracers</category>
<group>ALLCOMP_attributes</group>
<desc>
Colon-delimited list of species of water tracers in this run.

Each element in the list corresponds to an element in water_tracer_names. A value of
'-' for a given element indicates a standard water tracer (i.e., a tracer of bulk
water).
</desc>
<values>
<value></value>
</values>
</entry>

<entry id="water_tracer_initial_ratios" skip_default_entry="true">
<type>char</type>
<category>water_tracers</category>
<group>ALLCOMP_attributes</group>
<desc>
Colon-delimited list of initial water tracer ratios (as a fraction of total water).

Each element in the list corresponds to an element in water_tracer_names.

For water isotopes, this ratio is typically set to 1 for numerical reasons; the
actual isotopic ratios can then be determined via reference to standard global
ratios.
</desc>
<values>
<value></value>
</values>
</entry>

<entry id="water_tracers_do_checks">
<type>logical</type>
<category>water_tracers</category>
<group>ALLCOMP_attributes</group>
<desc>
Check consistency between water tracer fields and their corresponding bulk fields.

This should only be used with artificial tracers that maintain a fixed ratio.
</desc>
<values>
<value>.false.</value>
</values>
</entry>

<!-- =========================== -->
<!-- CLOCK Attributes -->
<!-- =========================== -->
Expand Down
11 changes: 0 additions & 11 deletions cime_config/testdefs/testlist_drv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -247,17 +247,6 @@
</options>
</test>

<test compset="X" grid="f19_g17" name="SMS_D_Ld2" testmods="drv/water_tracers--drv/glc_avg_frequently">
<machines>
<machine name="derecho" compiler="intel" category="aux_cmeps"/>
<machine name="derecho" compiler="intel" category="prealpha"/>
</machines>
<options>
<option name="wallclock"> 00:20:00 </option>
<option name="comment">Test handling of water tracers in CMEPS; includes glc_avg_frequently testmod to exercise the lnd-to-glc mapping.</option>
</options>
</test>

<!-- ======================================= -->
<!-- TG compsets -->
<!-- ======================================= -->
Expand Down

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions cime_config/testdefs/testmods_dirs/drv/water_tracers/README

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion med_test_comps/xatm/cime_config/buildlib

This file was deleted.

32 changes: 0 additions & 32 deletions med_test_comps/xatm/cime_config/buildnml

This file was deleted.

25 changes: 0 additions & 25 deletions med_test_comps/xatm/cime_config/config_component.xml

This file was deleted.

Loading