Skip to content

Commit

Permalink
Merge pull request ESCOMP#376 from NorESMhub/noresm
Browse files Browse the repository at this point in the history
changes to bring cmeps up to date with changes in noresm
  • Loading branch information
jedwards4b authored May 5, 2023
2 parents cf7ec4f + 76bba43 commit 284137f
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 130 deletions.
37 changes: 2 additions & 35 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,6 @@ Are changes expected to change answers? (specify if bfb, different at roundoff,
Any User Interface Changes (namelist or namelist defaults changes)?

### Testing performed
Please describe the tests along with the target model and machine(s)
If possible, please also added hashes that were used in the testing

Testing performed if application target is CESM:
- [ ] (recommended) CIME_DRIVER=nuopc scripts_regression_tests.py
- machines:
- details (e.g. failed tests):
- [ ] (recommended) CESM testlist_drv.xml
- machines and compilers:
- details (e.g. failed tests):
- [ ] (optional) CESM prealpha test
- machines and compilers
- details (e.g. failed tests):
- [ ] (other) please described in detail
- machines and compilers
- details (e.g. failed tests):

Testing performed if application target is UFS-coupled:
- [ ] (recommended) UFS-coupled testing
- description:
- details (e.g. failed tests):

Testing performed if application target is UFS-HAFS:
- [ ] (recommended) UFS-HAFS testing
- description:
- details (e.g. failed tests):

### Hashes used for testing:

- [ ] CESM:
- repository to check out: https://github.com/ESCOMP/CESM.git
- branch/hash:
- [ ] UFS-coupled, then umbrella repostiory to check out and associated hash:
- repository to check out:
- branch/hash:
- [ ] UFS-HAFS, then umbrella repostiory to check out and associated hash:
- repository to check out:
- branch/hash:
2 changes: 1 addition & 1 deletion cesm/driver/esm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ subroutine esm_init_pelayout(driver, maxthreads, rc)
#ifndef NO_MPI2
use mpi , only : MPI_COMM_NULL, mpi_comm_size
#endif
use mct_mod , only : mct_world_init
use m_MCTWorld , only : mct_world_init => init

#ifdef MED_PRESENT
use med_internalstate_mod , only : med_id
Expand Down
8 changes: 2 additions & 6 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,13 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
elif case.get_value("RUN_TYPE") == "branch":
config["run_type"] = "branch"

config['wav_ice_coupling'] = config['COMP_WAV'] == 'ww3dev' and config['COMP_ICE'] == 'cice'

# ----------------------------------------------------
# Initialize namelist defaults
# ----------------------------------------------------
nmlgen.init_defaults(infile, config, skip_default_for_groups=["modelio"])

# --------------------------------
# Set default wav-ice coupling (assumes cice6 as the ice component
# --------------------------------
if case.get_value("COMP_WAV") == "ww3dev" and case.get_value("COMP_ICE") == "cice":
nmlgen.add_default("wavice_coupling", value=".true.")

# --------------------------------
# Overwrite: set brnch_retain_casename
# --------------------------------
Expand Down
81 changes: 0 additions & 81 deletions cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1361,87 +1361,6 @@
</entry>

<!--- map files -->
<!--- comment out map type for now, tcraig 3/25/13 -->

<entry id="ATM2OCN_FMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>atm2ocn flux mapping file</desc>
</entry>

<entry id="ATM2OCN_SMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>atm2ocn state mapping file</desc>
</entry>

<entry id="ATM2OCN_VMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>atm2ocn vector mapping file</desc>
</entry>

<entry id="ATM2LND_FMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>atm2lnd flux mapping file</desc>
</entry>

<entry id="ATM2LND_SMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>atm2lnd state mapping file</desc>
</entry>

<entry id="ATM2WAV_SMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>atm2wav state mapping file</desc>
</entry>

<entry id="OCN2ATM_FMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>ocn2atm flux mapping file</desc>
</entry>

<entry id="OCN2ATM_SMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>ocn2atm state mapping file</desc>
</entry>

<entry id="LND2ATM_FMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>lnd2atm flux mapping file</desc>
</entry>

<entry id="LND2ATM_SMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>lnd2atm state mapping file</desc>
</entry>

<entry id="LND2ROF_FMAPNAME">
<type>char</type>
Expand Down
8 changes: 8 additions & 0 deletions cime_config/config_component_cesm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,15 @@
<value compset="_CAM">CO2A</value>
<value compset="_DATM">none</value>
<value compset="_DATM%CPLHIST.+POP\d">CO2A</value>
<value compset="_DATM%CPLHIST.+BLOM%ECO">CO2A</value>
<value compset="^OMIP_DATM%IAF.*_POP2%[^_]*ECO">CO2A</value>
<value compset="^OMIP_DATM%JRA.*_POP2%[^_]*ECO">CO2A</value>
<value compset="HIST.*_DATM.*_CLM">CO2A</value>
<value compset="SSP.*_DATM.*_CLM">CO2A</value>
<value compset="_BGC%BPRP">CO2C</value>
<value compset="_BGC%BDRD">CO2C</value>
<value compset="20TR_DATM%IAF.*_BLOM%ECO">CO2A</value>
<value compset="20TR_DATM%JRA.*_BLOM%ECO">CO2A</value>
</values>
<group>run_coupling</group>
<file>env_run.xml</file>
Expand Down Expand Up @@ -232,6 +235,11 @@
<!-- =================================================== -->
<!-- TODO: why is this here? -->
<value compset="_DLND.*_CISM\d">1</value>
<!-- =================================================== -->
<!-- N compsets -->
<!-- =================================================== -->
<value compset="_DATM.*_BLOM">24</value>
<value compset="_BLOM" grid="oi%tnx0.25v">48</value>
</values>
<group>run_coupling</group>
<file>env_run.xml</file>
Expand Down
5 changes: 4 additions & 1 deletion cime_config/namelist_definition_drv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2371,6 +2371,7 @@
</desc>
<values>
<value COMP_OCN="pop">4</value>
<value COMP_OCN="blom">4</value>
<value>0</value>
</values>
</entry>
Expand Down Expand Up @@ -3899,7 +3900,7 @@
</values>
</entry>

<entry id="wavice_coupling">
<entry id="wav_coupling_to_cice">
<type>logical</type>
<category>expdef</category>
<group>ALLCOMP_attributes</group>
Expand All @@ -3908,6 +3909,8 @@
</desc>
<values>
<value>.false.</value>
<!-- The following is not set as a default for now -->
<!-- <value wav_coupling_to_cice='on'>.true.</value> -->
</values>
</entry>

Expand Down
12 changes: 6 additions & 6 deletions mediator/esmFldsExchange_cesm_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,16 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
type(InternalState) :: is_local
integer :: n, ns
character(len=CL) :: cvalue
logical :: wavice_coupling
logical :: wav_coupling_to_cice
logical :: ocn2glc_coupling
character(len=*) , parameter :: subname=' (esmFldsExchange_cesm) '
!--------------------------------------

rc = ESMF_SUCCESS

call NUOPC_CompAttributeGet(gcomp, name='wavice_coupling', value=cvalue, rc=rc)
call NUOPC_CompAttributeGet(gcomp, name='wav_coupling_to_cice', value=cvalue, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
read(cvalue,*) wavice_coupling
read(cvalue,*) wav_coupling_to_cice

call NUOPC_CompAttributeGet(gcomp, name='ocn2glc_coupling', value=cvalue, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
Expand Down Expand Up @@ -2831,7 +2831,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
! ---------------------------------------------------------------------
! to ice: wave elevation spectrum (field with ungridded dimensions)
! ---------------------------------------------------------------------
if (wavice_coupling) then
if (wav_coupling_to_cice) then
if (phase == 'advertise') then
call addfld_from(compwav, 'Sw_elevation_spectrum')
call addfld_to(compice, 'Sw_elevation_spectrum')
Expand Down Expand Up @@ -2866,7 +2866,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
!----------------------------------------------------------
! to wav: ice thickness from ice
!----------------------------------------------------------
if (wavice_coupling) then
if (wav_coupling_to_cice) then
if (phase == 'advertise') then
call addfld_from(compice, 'Si_thick')
call addfld_to(compwav, 'Si_thick')
Expand All @@ -2881,7 +2881,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
!----------------------------------------------------------
! to wav: ice floe diameter from ice
!----------------------------------------------------------
if (wavice_coupling) then
if (wav_coupling_to_cice) then
if (phase == 'advertise') then
call addfld_from(compice, 'Si_floediam')
call addfld_to(compwav, 'Si_floediam')
Expand Down

0 comments on commit 284137f

Please sign in to comment.