diff --git a/.github/workflows/bumpversion.yml b/.github/workflows/bumpversion.yml
index 7364cb8d8..b17d491f0 100644
--- a/.github/workflows/bumpversion.yml
+++ b/.github/workflows/bumpversion.yml
@@ -2,7 +2,7 @@ name: Bump version
on:
push:
branches:
- - master
+ - main
jobs:
build:
runs-on: ubuntu-latest
diff --git a/.github/workflows/extbuild.yml b/.github/workflows/extbuild.yml
index 8455f2928..fafc46f46 100644
--- a/.github/workflows/extbuild.yml
+++ b/.github/workflows/extbuild.yml
@@ -2,12 +2,12 @@
name: extbuild
# Controls when the action will run. Triggers the workflow on push or pull request
-# events but only for the master branch
+# events but only for the main branch
on:
push:
- branches: [ master ]
+ branches: [ main ]
pull_request:
- branches: [ master ]
+ branches: [ main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml
index 3f156fb25..45cb76058 100644
--- a/.github/workflows/srt.yml
+++ b/.github/workflows/srt.yml
@@ -3,12 +3,12 @@
name: scripts regression tests
# Controls when the action will run. Triggers the workflow on push or pull request
-# events but only for the master branch
+# events but only for the main branch
on:
push:
- branches: [ master ]
+ branches: [ main ]
pull_request:
- branches: [ master ]
+ branches: [ main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
@@ -51,7 +51,7 @@ jobs:
- run: echo "PyYAML" > requirements.txt
- name: Install PyYAML
run: pip install -r requirements.txt
- # use the latest cesm master
+ # use the latest cesm main
- name: cesm checkout
uses: actions/checkout@v3
with:
diff --git a/cesm/driver/ensemble_driver.F90 b/cesm/driver/ensemble_driver.F90
index 7e64c1cc6..2c7e66fbc 100644
--- a/cesm/driver/ensemble_driver.F90
+++ b/cesm/driver/ensemble_driver.F90
@@ -9,7 +9,7 @@ module Ensemble_driver
use shr_kind_mod , only : cl=>shr_kind_cl, cs=>shr_kind_cs
use shr_log_mod , only : shr_log_setLogUnit
- use esm_utils_mod , only : mastertask, logunit, chkerr
+ use esm_utils_mod , only : maintask, logunit, chkerr
implicit none
private
@@ -250,15 +250,15 @@ subroutine SetModelServices(ensemble_driver, rc)
call NUOPC_CompAttributeGet(driver, name="logfile", value=logfile, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
open (newunit=logunit,file=trim(diro)//"/"//trim(logfile))
- mastertask = .true.
+ maintask = .true.
else
logUnit = 6
- mastertask = .false.
+ maintask = .false.
endif
call shr_log_setLogUnit (logunit)
! Create a clock for each driver instance
- call esm_time_clockInit(ensemble_driver, driver, logunit, mastertask, rc)
+ call esm_time_clockInit(ensemble_driver, driver, logunit, maintask, rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
endif
diff --git a/cesm/driver/esm.F90 b/cesm/driver/esm.F90
index 1c73ea17d..6b094992e 100644
--- a/cesm/driver/esm.F90
+++ b/cesm/driver/esm.F90
@@ -9,7 +9,7 @@ module ESM
use shr_mpi_mod , only : shr_mpi_bcast
use shr_mem_mod , only : shr_mem_init
use shr_log_mod , only : shr_log_setLogunit
- use esm_utils_mod, only : logunit, mastertask, dbug_flag, chkerr
+ use esm_utils_mod, only : logunit, maintask, dbug_flag, chkerr
use perf_mod , only : t_initf, t_setLogUnit
implicit none
@@ -154,9 +154,9 @@ subroutine SetModelServices(driver, rc)
call ESMF_VMGet(vm, localPet=localPet, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
if (localPet == 0) then
- mastertask=.true.
+ maintask=.true.
else
- mastertask = .false.
+ maintask = .false.
end if
!-------------------------------------------
@@ -206,7 +206,7 @@ subroutine SetModelServices(driver, rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
! Memory test
- if (mastertask) then
+ if (maintask) then
call shr_mem_init(strbuf=meminitstr)
write(logunit,*) trim(meminitstr)
end if
@@ -214,7 +214,7 @@ subroutine SetModelServices(driver, rc)
!-------------------------------------------
! Timer initialization (has to be after pelayouts are determined)
!-------------------------------------------
- call t_initf('drv_in', LogPrint=.true., LogUnit=logunit, mpicom=global_comm, mastertask=mastertask, MaxThreads=maxthreads)
+ call t_initf('drv_in', LogPrint=.true., LogUnit=logunit, mpicom=global_comm, maintask=maintask, MaxThreads=maxthreads)
call ESMF_LogWrite(trim(subname)//": done", ESMF_LOGMSG_INFO)
@@ -301,7 +301,7 @@ subroutine pretty_print_nuopc_freeformat(ffstuff, label, rc)
rc = ESMF_SUCCESS
- if (mastertask .or. dbug_flag > 3) then
+ if (maintask .or. dbug_flag > 3) then
write(logunit, *) 'BEGIN: ', trim(label)
call NUOPC_FreeFormatGet(ffstuff, linecount=linecnt, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
@@ -467,7 +467,7 @@ subroutine InitAttributes(driver, rc)
call NUOPC_CompAttributeGet(driver, name="tfreeze_option", value=tfreeze_option, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- call shr_frz_freezetemp_init(tfreeze_option, mastertask)
+ call shr_frz_freezetemp_init(tfreeze_option, maintask)
call NUOPC_CompAttributeGet(driver, name='cpl_rootpe', value=cvalue, rc=rc)
read(cvalue, *) rootpe_med
@@ -1519,7 +1519,7 @@ subroutine esm_finalize(driver, rc)
rc = ESMF_SUCCESS
- if (mastertask) then
+ if (maintask) then
write(logunit,*)' SUCCESSFUL TERMINATION OF CESM'
end if
diff --git a/cesm/driver/esm_time_mod.F90 b/cesm/driver/esm_time_mod.F90
index ada8f2da2..0c8a6e86c 100644
--- a/cesm/driver/esm_time_mod.F90
+++ b/cesm/driver/esm_time_mod.F90
@@ -52,12 +52,12 @@ module esm_time_mod
contains
!===============================================================================
- subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, mastertask, rc)
+ subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, maintask, rc)
! input/output variables
type(ESMF_GridComp) :: ensemble_driver, instance_driver
integer, intent(in) :: logunit
- logical, intent(in) :: mastertask
+ logical, intent(in) :: maintask
integer, intent(out) :: rc
! local variables
@@ -142,7 +142,7 @@ subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, mastert
restart_pfile = trim(restart_file)//inst_suffix
- if (mastertask) then
+ if (maintask) then
call ESMF_LogWrite(trim(subname)//" read rpointer file = "//trim(restart_pfile), &
ESMF_LOGMSG_INFO)
open(newunit=unitn, file=restart_pfile, form='FORMATTED', status='old',iostat=ierr)
@@ -160,7 +160,7 @@ subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, mastert
return
end if
close(unitn)
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//" reading driver restart from file = "//trim(restart_file)
end if
call esm_time_read_restart(restart_file, start_ymd, start_tod, curr_ymd, curr_tod, rc)
@@ -177,7 +177,7 @@ subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, mastert
else
- if (mastertask) then
+ if (maintask) then
write(logunit,*) ' NOTE: the current compset has no mediator - which provides the clock restart information'
write(logunit,*) ' In this case the restarts are handled solely by the component being used and'
write(logunit,*) ' and the driver clock will always be starting from the initial date on restart'
@@ -200,7 +200,7 @@ subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, mastert
call ESMF_TimeSet( StartTime, yy=yr, mm=mon, dd=day, s=start_tod, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
- if(mastertask) then
+ if(maintask) then
write(tmpstr,'(i10)') start_ymd
call ESMF_LogWrite(trim(subname)//': driver start_ymd: '// trim(tmpstr), ESMF_LOGMSG_INFO)
write(logunit,*) trim(subname)//': driver start_ymd: '// trim(tmpstr)
@@ -214,7 +214,7 @@ subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, mastert
call ESMF_TimeSet( CurrTime, yy=yr, mm=mon, dd=day, s=curr_tod, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
- if(mastertask) then
+ if(maintask) then
write(tmpstr,'(i10)') curr_ymd
call ESMF_LogWrite(trim(subname)//': driver curr_ymd: '// trim(tmpstr), ESMF_LOGMSG_INFO)
write(logunit,*) trim(subname)//': driver curr_ymd: '// trim(tmpstr)
@@ -267,7 +267,7 @@ subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, mastert
read(cvalue,*) glc_avg_period
dtime_drv = minval((/atm_cpl_dt, lnd_cpl_dt, ocn_cpl_dt, ice_cpl_dt, glc_cpl_dt, rof_cpl_dt, wav_cpl_dt/))
- if(mastertask) then
+ if(maintask) then
write(tmpstr,'(i10)') dtime_drv
call ESMF_LogWrite(trim(subname)//': driver time interval is : '// trim(tmpstr), ESMF_LOGMSG_INFO, rc=rc)
write(logunit,*) trim(subname)//': driver time interval is : '// trim(tmpstr)
@@ -314,7 +314,7 @@ subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, mastert
stop_tod = 0
endif
- if (mastertask) then
+ if (maintask) then
write(tmpstr,'(i10)') stop_ymd
call ESMF_LogWrite(trim(subname)//': driver stop_ymd: '// trim(tmpstr), ESMF_LOGMSG_INFO)
write(logunit,*) trim(subname)//': driver stop_ymd: '// trim(tmpstr)
diff --git a/cesm/nuopc_cap_share/driver_pio_mod.F90 b/cesm/nuopc_cap_share/driver_pio_mod.F90
index 42d301221..43d913c6d 100644
--- a/cesm/nuopc_cap_share/driver_pio_mod.F90
+++ b/cesm/nuopc_cap_share/driver_pio_mod.F90
@@ -27,7 +27,7 @@ module driver_pio_mod
logical, allocatable :: pio_async_interface(:)
integer :: total_comps
- logical :: mastertask
+ logical :: maintask
#define DEBUGI 1
#ifdef DEBUGI
@@ -72,7 +72,7 @@ subroutine driver_pio_init(driver, rc)
call ESMF_VMGet(vm, localPet=localPet, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- mastertask = (localPet == 0)
+ maintask = (localPet == 0)
call NUOPC_CompAttributeGet(driver, name="pio_buffer_size_limit", value=cname, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
@@ -80,7 +80,7 @@ subroutine driver_pio_init(driver, rc)
! 0 is a valid value of pio_buffer_size_limit
if(pio_buffer_size_limit>=0) then
- if(mastertask) write(shr_log_unit,*) 'Setting pio_buffer_size_limit : ',pio_buffer_size_limit
+ if(maintask) write(shr_log_unit,*) 'Setting pio_buffer_size_limit : ',pio_buffer_size_limit
call pio_set_buffer_size_limit(pio_buffer_size_limit)
endif
@@ -89,7 +89,7 @@ subroutine driver_pio_init(driver, rc)
read(cname, *) pio_blocksize
if(pio_blocksize>0) then
- if(mastertask) write(shr_log_unit,*) 'Setting pio_blocksize : ',pio_blocksize
+ if(maintask) write(shr_log_unit,*) 'Setting pio_blocksize : ',pio_blocksize
call pio_set_blocksize(pio_blocksize)
endif
@@ -98,7 +98,7 @@ subroutine driver_pio_init(driver, rc)
read(cname, *) pio_debug_level
if(pio_debug_level > 0) then
- if(mastertask) write(shr_log_unit,*) 'Setting pio_debug_level : ',pio_debug_level
+ if(maintask) write(shr_log_unit,*) 'Setting pio_debug_level : ',pio_debug_level
ret = pio_set_log_level(pio_debug_level)
endif
@@ -145,7 +145,7 @@ subroutine driver_pio_init(driver, rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
read(cname, *) pio_rearr_opts%comm_fc_opts_io2comp%max_pend_req
- if(mastertask) then
+ if(maintask) then
! Log the rearranger options
write(shr_log_unit, *) "PIO rearranger options:"
write(shr_log_unit, *) " comm type = ", pio_rearr_opts%comm_type, " (",trim(pio_rearr_comm_type),")"
diff --git a/cesm/nuopc_cap_share/esm_utils_mod.F90 b/cesm/nuopc_cap_share/esm_utils_mod.F90
index f6a4aeb40..7832e79d3 100644
--- a/cesm/nuopc_cap_share/esm_utils_mod.F90
+++ b/cesm/nuopc_cap_share/esm_utils_mod.F90
@@ -3,7 +3,7 @@ module esm_utils_mod
implicit none
public
- logical :: mastertask
+ logical :: maintask
integer :: logunit
integer :: dbug_flag = 0
diff --git a/cesm/nuopc_cap_share/nuopc_shr_methods.F90 b/cesm/nuopc_cap_share/nuopc_shr_methods.F90
index 0ed53f22b..cfa2b00e1 100644
--- a/cesm/nuopc_cap_share/nuopc_shr_methods.F90
+++ b/cesm/nuopc_cap_share/nuopc_shr_methods.F90
@@ -75,12 +75,12 @@ module nuopc_shr_methods
contains
!===============================================================================
- subroutine memcheck(string, level, mastertask)
+ subroutine memcheck(string, level, maintask)
! input/output variables
character(len=*) , intent(in) :: string
integer , intent(in) :: level
- logical , intent(in) :: mastertask
+ logical , intent(in) :: maintask
! local variables
integer :: ierr
@@ -90,7 +90,7 @@ subroutine memcheck(string, level, mastertask)
!-----------------------------------------------------------------------
#ifdef CESMCOUPLED
- if ((mastertask .and. memdebug_level > level) .or. memdebug_level > level+1) then
+ if ((maintask .and. memdebug_level > level) .or. memdebug_level > level+1) then
ierr = GPTLprint_memusage(string)
endif
#endif
@@ -131,11 +131,11 @@ end subroutine get_component_instance
!===============================================================================
- subroutine set_component_logging(gcomp, mastertask, logunit, shrlogunit, rc)
+ subroutine set_component_logging(gcomp, maintask, logunit, shrlogunit, rc)
use driver_pio_mod, only : driver_pio_log_comp_settings
! input/output variables
type(ESMF_GridComp) :: gcomp
- logical, intent(in) :: mastertask
+ logical, intent(in) :: maintask
integer, intent(out) :: logunit
integer, intent(out) :: shrlogunit
integer, intent(out) :: rc
@@ -149,7 +149,7 @@ subroutine set_component_logging(gcomp, mastertask, logunit, shrlogunit, rc)
rc = ESMF_SUCCESS
- if (mastertask) then
+ if (maintask) then
call NUOPC_CompAttributeGet(gcomp, name="diro", value=diro, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
call NUOPC_CompAttributeGet(gcomp, name="logfile", value=logfile, rc=rc)
diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml
index 923e9afa8..c06f7a7f3 100644
--- a/cime_config/config_component.xml
+++ b/cime_config/config_component.xml
@@ -45,7 +45,7 @@
-
+
@@ -54,7 +54,7 @@
$CIMEROOT/config_files.xml
case_def
env_case.xml
- master configuration file that specifies all relevant filenames
+ main configuration file that specifies all relevant filenames
and directories to configure a case
diff --git a/doc/source/addendum/req_attributes.rst b/doc/source/addendum/req_attributes.rst
index d6b844282..410303632 100644
--- a/doc/source/addendum/req_attributes.rst
+++ b/doc/source/addendum/req_attributes.rst
@@ -34,7 +34,7 @@ Scalar attributes
between the mediator and a component. Currently scalar values are
put into a field bundle that only contains an undistributed
dimension equal to the size of ``ScalarFieldCount`` and communicated
- between the component and the mediator on the `master task` of each
+ between the component and the mediator on the `main task` of each
component.
**ScalarFieldName** (required)
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 80334e199..8c53bb751 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -51,8 +51,8 @@
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
-# The master toctree document.
-master_doc = 'index'
+# The main toctree document.
+main_doc = 'index'
# General information about the project.
project = u'CMEPS'
@@ -64,9 +64,9 @@
# built documents.
#
# The short X.Y version.
-version = u'master'
+version = u'main'
# The full version, including alpha/beta/rc tags.
-release = u'master'
+release = u'main'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -143,7 +143,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
- (master_doc, 'on.tex', u'on Documentation',
+ (main_doc, 'on.tex', u'on Documentation',
u'Staff of the NCAR and NOAA/EMC', 'manual'),
]
@@ -153,7 +153,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- (master_doc, 'on', u'on Documentation',
+ (main_doc, 'on', u'on Documentation',
[author], 1)
]
@@ -164,7 +164,7 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
- (master_doc, 'on', u'on Documentation',
+ (main_doc, 'on', u'on Documentation',
author, 'on', 'One line description of project.',
'Miscellaneous'),
]
@@ -172,7 +172,7 @@
# -- Options for pdf output -------------------------------------------------
pdf_documents = [
- (master_doc,
+ (main_doc,
u'CMEPS_Users_Guide',
u'CMEPS Users Guide (PDF)',)
]
diff --git a/doc/source/index.rst b/doc/source/index.rst
index c03f6276e..179198910 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -1,4 +1,4 @@
-.. on documentation master file, created by
+.. on documentation main file, created by
sphinx-quickstart on Mon May 18 11:50:23 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
diff --git a/mediator/esmFldsExchange_cesm_mod.F90 b/mediator/esmFldsExchange_cesm_mod.F90
index ac003daa4..ae3627491 100644
--- a/mediator/esmFldsExchange_cesm_mod.F90
+++ b/mediator/esmFldsExchange_cesm_mod.F90
@@ -20,7 +20,7 @@ module esmFldsExchange_cesm_mod
!--------------------------------------
use med_kind_mod , only : CX=>SHR_KIND_CX, CS=>SHR_KIND_CS, CL=>SHR_KIND_CL, R8=>SHR_KIND_R8
- use med_internalstate_mod , only : logunit, mastertask
+ use med_internalstate_mod , only : logunit, maintask
implicit none
public
@@ -71,7 +71,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
use med_kind_mod , only : CX=>SHR_KIND_CX, CS=>SHR_KIND_CS, CL=>SHR_KIND_CL, R8=>SHR_KIND_R8
use med_utils_mod , only : chkerr => med_utils_chkerr
use med_methods_mod , only : fldchk => med_methods_FB_FldChk
- use med_internalstate_mod , only : InternalState, logunit, mastertask
+ use med_internalstate_mod , only : InternalState, logunit, maintask
use med_internalstate_mod , only : compmed, compatm, complnd, compocn
use med_internalstate_mod , only : compice, comprof, compwav, compglc, ncomps
use med_internalstate_mod , only : mapbilnr, mapconsf, mapconsd, mappatch, mappatch_uv3d, mapbilnr_nstod
@@ -124,71 +124,71 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
! mapping to atm
call NUOPC_CompAttributeGet(gcomp, name='ice2atm_map', value=ice2atm_map, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit, '(a)') trim(subname)//'ice2atm_map = '// trim(ice2atm_map)
+ if (maintask) write(logunit, '(a)') trim(subname)//'ice2atm_map = '// trim(ice2atm_map)
call NUOPC_CompAttributeGet(gcomp, name='lnd2atm_map', value=lnd2atm_map, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit, '(a)') trim(subname)//'lnd2atm_map = '// trim(lnd2atm_map)
+ if (maintask) write(logunit, '(a)') trim(subname)//'lnd2atm_map = '// trim(lnd2atm_map)
call NUOPC_CompAttributeGet(gcomp, name='ocn2atm_map', value=ocn2atm_map, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit, '(a)') trim(subname)//'ocn2atm_map = '// trim(ocn2atm_map)
+ if (maintask) write(logunit, '(a)') trim(subname)//'ocn2atm_map = '// trim(ocn2atm_map)
! mapping to lnd
call NUOPC_CompAttributeGet(gcomp, name='atm2lnd_map', value=atm2lnd_map, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit, '(a)') trim(subname)//'atm2lnd_map = '// trim(atm2lnd_map)
+ if (maintask) write(logunit, '(a)') trim(subname)//'atm2lnd_map = '// trim(atm2lnd_map)
call NUOPC_CompAttributeGet(gcomp, name='rof2lnd_map', value=rof2lnd_map, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit, '(a)') trim(subname)//'rof2lnd_map = '// trim(rof2lnd_map)
+ if (maintask) write(logunit, '(a)') trim(subname)//'rof2lnd_map = '// trim(rof2lnd_map)
! mapping to ice
call NUOPC_CompAttributeGet(gcomp, name='atm2ice_map', value=atm2ice_map, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit, '(a)') trim(subname)//'atm2ice_map = '// trim(atm2ice_map)
+ if (maintask) write(logunit, '(a)') trim(subname)//'atm2ice_map = '// trim(atm2ice_map)
call NUOPC_CompAttributeGet(gcomp, name='glc2ice_rmapname', value=glc2ice_rmap, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit, '(a)') trim(subname)//'glc2ice_rmapname = '// trim(glc2ice_rmap)
+ if (maintask) write(logunit, '(a)') trim(subname)//'glc2ice_rmapname = '// trim(glc2ice_rmap)
! mapping to ocn
call NUOPC_CompAttributeGet(gcomp, name='atm2ocn_map', value=atm2ocn_map, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit, '(a)') trim(subname)//'atm2ocn_map = '// trim(atm2ocn_map)
+ if (maintask) write(logunit, '(a)') trim(subname)//'atm2ocn_map = '// trim(atm2ocn_map)
call NUOPC_CompAttributeGet(gcomp, name='glc2ocn_liq_rmapname', value=glc2ocn_liq_rmap, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit, '(a)') trim(subname)//'glc2ocn_liq_rmapname = '// trim(glc2ocn_liq_rmap)
+ if (maintask) write(logunit, '(a)') trim(subname)//'glc2ocn_liq_rmapname = '// trim(glc2ocn_liq_rmap)
call NUOPC_CompAttributeGet(gcomp, name='glc2ocn_ice_rmapname', value=glc2ocn_ice_rmap, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit, '(a)') trim(subname)//'glc2ocn_ice_rmapname = '// trim(glc2ocn_ice_rmap)
+ if (maintask) write(logunit, '(a)') trim(subname)//'glc2ocn_ice_rmapname = '// trim(glc2ocn_ice_rmap)
call NUOPC_CompAttributeGet(gcomp, name='wav2ocn_smapname', value=wav2ocn_smap, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit, '(a)') trim(subname)//'wav2ocn_smapname = '// trim(wav2ocn_smap)
+ if (maintask) write(logunit, '(a)') trim(subname)//'wav2ocn_smapname = '// trim(wav2ocn_smap)
call NUOPC_CompAttributeGet(gcomp, name='rof2ocn_fmapname', value=rof2ocn_fmap, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit, '(a)') trim(subname)//'rof2ocn_fmapname = '// trim(rof2ocn_fmap)
+ if (maintask) write(logunit, '(a)') trim(subname)//'rof2ocn_fmapname = '// trim(rof2ocn_fmap)
call NUOPC_CompAttributeGet(gcomp, name='rof2ocn_liq_rmapname', value=rof2ocn_liq_rmap, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit, '(a)') trim(subname)//'rof2ocn_liq_rmapname = '// trim(rof2ocn_liq_rmap)
+ if (maintask) write(logunit, '(a)') trim(subname)//'rof2ocn_liq_rmapname = '// trim(rof2ocn_liq_rmap)
call NUOPC_CompAttributeGet(gcomp, name='rof2ocn_ice_rmapname', value=rof2ocn_ice_rmap, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit, '(a)') trim(subname)//'rof2ocn_ice_rmapname = '// trim(rof2ocn_ice_rmap)
+ if (maintask) write(logunit, '(a)') trim(subname)//'rof2ocn_ice_rmapname = '// trim(rof2ocn_ice_rmap)
! mapping to rof
call NUOPC_CompAttributeGet(gcomp, name='lnd2rof_map', value=lnd2rof_map, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit, '(a)') trim(subname)//'lnd2rof_map = '// trim(lnd2rof_map)
+ if (maintask) write(logunit, '(a)') trim(subname)//'lnd2rof_map = '// trim(lnd2rof_map)
! mapping to wav
call NUOPC_CompAttributeGet(gcomp, name='atm2wav_map', value=atm2wav_map, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit,'(a)') trim(subname)//'atm2wav_map = '// trim(atm2wav_map)
+ if (maintask) write(logunit,'(a)') trim(subname)//'atm2wav_map = '// trim(atm2wav_map)
call NUOPC_CompAttributeGet(gcomp, name='ice2wav_smapname', value=ice2wav_smap, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit,'(a)') trim(subname)//'ice2wav_smapname = '// trim(ice2wav_smap)
+ if (maintask) write(logunit,'(a)') trim(subname)//'ice2wav_smapname = '// trim(ice2wav_smap)
call NUOPC_CompAttributeGet(gcomp, name='ocn2wav_smapname', value=ocn2wav_smap, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit,'(a)') trim(subname)//'ocn2wav_smapname = '// trim(ocn2wav_smap)
+ if (maintask) write(logunit,'(a)') trim(subname)//'ocn2wav_smapname = '// trim(ocn2wav_smap)
! uv cart3d mapping
call NUOPC_CompAttributeGet(gcomp, name='mapuv_with_cart3d', value=cvalue, rc=rc)
@@ -221,7 +221,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
read(cvalue,*) flds_r2l_stream_channel_depths
! write diagnostic output
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a,l7)') trim(subname)//' flds_co2a = ',flds_co2a
write(logunit,'(a,l7)') trim(subname)//' flds_co2b = ',flds_co2b
write(logunit,'(a,l7)') trim(subname)//' flds_co2c = ',flds_co2c
diff --git a/mediator/med.F90 b/mediator/med.F90
index e9b76721b..acbd28948 100644
--- a/mediator/med.F90
+++ b/mediator/med.F90
@@ -40,7 +40,7 @@ module MED
use med_utils_mod , only : memcheck => med_memcheck
use med_time_mod , only : med_time_alarmInit
use med_internalstate_mod , only : InternalState, med_internalstate_init, med_internalstate_coupling
- use med_internalstate_mod , only : med_internalstate_defaultmasks, logunit, mastertask
+ use med_internalstate_mod , only : med_internalstate_defaultmasks, logunit, maintask
use med_internalstate_mod , only : ncomps, compname
use med_internalstate_mod , only : compmed, compatm, compocn, compice, complnd, comprof, compwav, compglc
use med_internalstate_mod , only : coupling_mode, aoflux_code, aoflux_ccpp_suite
@@ -547,7 +547,7 @@ subroutine InitializeP0(gcomp, importState, exportState, clock, rc)
use ESMF , only : ESMF_GridCompGet, ESMF_VMGet, ESMF_AttributeGet, ESMF_AttributeSet
use ESMF , only : ESMF_LogWrite, ESMF_LOGMSG_INFO, ESMF_METHOD_INITIALIZE
use NUOPC , only : NUOPC_CompFilterPhaseMap, NUOPC_CompAttributeGet
- use med_internalstate_mod, only : mastertask, logunit, diagunit
+ use med_internalstate_mod, only : maintask, logunit, diagunit
#ifdef CESMCOUPLED
use nuopc_shr_methods, only : set_component_logging
use shr_log_mod, only : shr_log_unit
@@ -576,11 +576,11 @@ subroutine InitializeP0(gcomp, importState, exportState, clock, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_VMGet(vm, localPet=localPet, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
- mastertask = .false.
- if (localPet == 0) mastertask=.true.
+ maintask = .false.
+ if (localPet == 0) maintask=.true.
! Determine mediator logunit
- if (mastertask) then
+ if (maintask) then
call NUOPC_CompAttributeGet(gcomp, name="diro", value=diro, isPresent=isPresent, isSet=isSet, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
if (.not. isPresent .and. .not. isSet) then
@@ -592,7 +592,7 @@ subroutine InitializeP0(gcomp, importState, exportState, clock, rc)
logfile = 'mediator.log'
end if
#ifdef CESMCOUPLED
- call set_component_logging(gcomp, mastertask, logunit, shr_log_unit, rc)
+ call set_component_logging(gcomp, maintask, logunit, shr_log_unit, rc)
#else
open(newunit=logunit,file=trim(diro)//"/"//trim(logfile))
#endif
@@ -613,7 +613,7 @@ subroutine InitializeP0(gcomp, importState, exportState, clock, rc)
call ESMF_AttributeGet(gcomp, name="Verbosity", value=cvalue, defaultValue="max", &
convention="NUOPC", purpose="Instance", rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)')trim(subname)//": Mediator verbosity is set to "//trim(cvalue)
end if
@@ -621,7 +621,7 @@ subroutine InitializeP0(gcomp, importState, exportState, clock, rc)
call NUOPC_CompAttributeGet(gcomp, name="Profiling", value=cvalue, isPresent=isPresent, isSet=isSet, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
if (isPresent .and. isSet) then
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//": Mediator profiling is set to "//trim(cvalue)
end if
end if
@@ -770,7 +770,7 @@ subroutine InitializeIPDv03p1(gcomp, importState, exportState, clock, rc)
cvalue = 'cesm'
end if
aoflux_code = trim(cvalue)
- if (mastertask) then
+ if (maintask) then
write(logunit,*) '========================================================'
write(logunit,'(a)')trim(subname)//' Mediator aoflux scheme is '//trim(aoflux_code)
write(logunit,*) '========================================================'
@@ -785,7 +785,7 @@ subroutine InitializeIPDv03p1(gcomp, importState, exportState, clock, rc)
call ESMF_Finalize(endflag=ESMF_END_ABORT)
end if
aoflux_ccpp_suite = trim(cvalue)
- if (mastertask) then
+ if (maintask) then
write(logunit,*) '========================================================'
write(logunit,'(a)')trim(subname)//' Mediator aoflux CCPP suite is '//trim(aoflux_ccpp_suite)
write(logunit,*) '========================================================'
@@ -799,7 +799,7 @@ subroutine InitializeIPDv03p1(gcomp, importState, exportState, clock, rc)
call NUOPC_CompAttributeGet(gcomp, name='coupling_mode', value=coupling_mode, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
call ESMF_LogWrite('coupling_mode = '// trim(coupling_mode), ESMF_LOGMSG_INFO)
- if (mastertask) then
+ if (maintask) then
write(logunit,*) '========================================================'
write(logunit,'(a)')trim(subname)//' Mediator Coupling Mode is '//trim(coupling_mode)
write(logunit,*) '========================================================'
@@ -871,12 +871,12 @@ subroutine InitializeIPDv03p1(gcomp, importState, exportState, clock, rc)
do ncomp = 1,ncomps
if (ncomp /= compmed) then
- if (mastertask) write(logunit,*)
+ if (maintask) write(logunit,*)
fldListFr => med_fldList_GetFldListFr(ncomp)
fld => fldListFr%fields
do while(associated(fld))
call med_fld_GetFldInfo(fld, stdname=stdname, shortname=shortname)
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//':Fr_'//trim(compname(ncomp))//': '//trim(shortname)
end if
if (trim(shortname) == is_local%wrap%flds_scalar_name) then
@@ -896,7 +896,7 @@ subroutine InitializeIPDv03p1(gcomp, importState, exportState, clock, rc)
fld => fldListTo%fields
do while(associated(fld))
call med_fld_GetFldInfo(fld, stdname=stdname, shortname=shortname, rc=rc)
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//':To_'//trim(compname(ncomp))//': '//trim(shortname)
end if
if (trim(shortname) == is_local%wrap%flds_scalar_name) then
@@ -1634,7 +1634,7 @@ subroutine DataInitialize(gcomp, rc)
! Create field bundles FBImp, FBExp
!----------------------------------------------------------
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') 'Creating mediator field bundles '
end if
@@ -1643,7 +1643,7 @@ subroutine DataInitialize(gcomp, rc)
ESMF_StateIsCreated(is_local%wrap%NStateImp(n1),rc=rc) .and. &
ESMF_StateIsCreated(is_local%wrap%NStateExp(n1),rc=rc)) then
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//' initializing FBs for '//trim(compname(n1))
end if
@@ -1662,7 +1662,7 @@ subroutine DataInitialize(gcomp, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
if (fieldCount == 0) then
- if (mastertask) then
+ if (maintask) then
write(logunit,*) trim(subname)//' '//trim(compname(n1))//' import FB field count is = ', fieldCount
write(logunit,*) trim(subname)//' '//trim(compname(n1))//' trying to use export FB'
call ESMF_FieldBundleGet(is_local%wrap%FBExp(n1), fieldCount=fieldCount, rc=rc)
@@ -1685,7 +1685,7 @@ subroutine DataInitialize(gcomp, rc)
ESMF_StateIsCreated(is_local%wrap%NStateImp(n1),rc=rc) .and. &
ESMF_StateIsCreated(is_local%wrap%NStateImp(n2),rc=rc)) then
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//' initializing FBs for '//&
trim(compname(n1))//'_'//trim(compname(n2))
end if
@@ -1733,13 +1733,13 @@ subroutine DataInitialize(gcomp, rc)
call FB_init(is_local%wrap%FBMed_ocnalb_a, is_local%wrap%flds_scalar_name, &
STgeom=is_local%wrap%NStateImp(compatm), fieldnamelist=fldnames, name='FBMed_ocnalb_a', rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//' initializing FB FBMed_ocnalb_a'
end if
call FB_init(is_local%wrap%FBMed_ocnalb_o, is_local%wrap%flds_scalar_name, &
STgeom=is_local%wrap%NStateImp(compocn), fieldnamelist=fldnames, name='FBMed_ocnalb_o', rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//' initializing FB FBMed_ocnalb_o'
end if
deallocate(fldnames)
@@ -1787,7 +1787,7 @@ subroutine DataInitialize(gcomp, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
end if
- if (mastertask) then
+ if (maintask) then
call med_fldList_Document_Mapping(logunit, is_local%wrap%med_coupling_active)
call med_fldList_Document_Merging(logunit, is_local%wrap%med_coupling_active)
end if
@@ -1973,7 +1973,7 @@ subroutine DataInitialize(gcomp, rc)
! then dependency is not satisified - must return to atm
call ESMF_LogWrite("MED - Initialize-Data-Dependency from ATM NOT YET SATISFIED!!!", &
ESMF_LOGMSG_INFO)
- if (mastertask) then
+ if (maintask) then
write(logunit,'(A)') trim(subname)//"MED - Initialize-Data-Dependency from ATM NOT YET SATISFIED!!!"
end if
compDone(compatm) = .false.
@@ -2032,7 +2032,7 @@ subroutine DataInitialize(gcomp, rc)
if (.not. atCorrectTime) then
allDone=.false.
if (dbug_flag > 0) then
- if (mastertask) then
+ if (maintask) then
write(logunit,'(A)') trim(subname)//" MED - Initialize-Data-Dependency check not yet satisfied for "//&
trim(compname(n1))
end if
@@ -2055,12 +2055,12 @@ subroutine DataInitialize(gcomp, rc)
!---------------------------------------
if (allDone) then
- if (mastertask) then
+ if (maintask) then
write(logunit,*)
write(logunit,'(a)') trim(subname)//"Initialize-Data-Dependency allDone check Passed"
end if
do n1 = 1,ncomps
- if (mastertask) then
+ if (maintask) then
write(logunit,*)
write(logunit,'(a)') trim(subname)//" "//trim(compname(n1))
end if
@@ -2080,13 +2080,13 @@ subroutine DataInitialize(gcomp, rc)
is_local%wrap%nx(n1) = nint(real_nx)
is_local%wrap%ny(n1) = nint(real_ny)
write(msgString,'(2i8,2l4)') is_local%wrap%nx(n1), is_local%wrap%ny(n1)
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') 'global nx,ny sizes for '//trim(compname(n1))//":"//trim(msgString)
end if
call ESMF_LogWrite(trim(subname)//":"//trim(compname(n1))//":"//trim(msgString), ESMF_LOGMSG_INFO)
end if
end do
- if (mastertask) write(logunit,*)
+ if (maintask) write(logunit,*)
!---------------------------------------
! Initialize mediator IO
@@ -2107,7 +2107,7 @@ subroutine DataInitialize(gcomp, rc)
!---------------------------------------
call NUOPC_CompAttributeGet(gcomp, name="read_restart", value=cvalue, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) then
+ if (maintask) then
write(logunit,*)
write(logunit,'(a)') trim(subname)//' read_restart = '//trim(cvalue)
end if
@@ -2497,8 +2497,8 @@ subroutine med_finalize(gcomp, rc)
integer, intent(out) :: rc
rc = ESMF_SUCCESS
- call memcheck("med_finalize", 0, mastertask)
- if (mastertask) then
+ call memcheck("med_finalize", 0, maintask)
+ if (maintask) then
write(logunit,*)' SUCCESSFUL TERMINATION OF CMEPS'
call med_phases_profile_finalize()
end if
diff --git a/mediator/med_diag_mod.F90 b/mediator/med_diag_mod.F90
index 6cf30a8df..802334f6f 100644
--- a/mediator/med_diag_mod.F90
+++ b/mediator/med_diag_mod.F90
@@ -27,7 +27,7 @@ module med_diag_mod
use med_constants_mod , only : shr_const_rearth, shr_const_pi, shr_const_latice, shr_const_latvap
use med_constants_mod , only : shr_const_ice_ref_sal, shr_const_ocn_ref_sal, shr_const_isspval
use med_kind_mod , only : CX=>SHR_KIND_CX, CS=>SHR_KIND_CS, CL=>SHR_KIND_CL, R8=>SHR_KIND_R8
- use med_internalstate_mod , only : InternalState, logunit, mastertask, diagunit
+ use med_internalstate_mod , only : InternalState, logunit, maintask, diagunit
use med_methods_mod , only : fldbun_getdata2d => med_methods_FB_getdata2d
use med_methods_mod , only : fldbun_getdata1d => med_methods_FB_getdata1d
use med_methods_mod , only : fldbun_fldChk => med_methods_FB_FldChk
@@ -50,7 +50,7 @@ module med_diag_mod
public :: med_phases_diag_ice_ice2med
public :: med_phases_diag_ice_med2ice
- private :: med_diag_sum_master
+ private :: med_diag_sum_main
private :: med_diag_print_atm
private :: med_diag_print_lnd_ice_ocn
private :: med_diag_print_summary
@@ -231,7 +231,7 @@ module med_diag_mod
! public data members
! ---------------------------------
- ! note: call med_diag_sum_master then save budget_global and budget_counter on restart from/to root pe ---
+ ! note: call med_diag_sum_main then save budget_global and budget_counter on restart from/to root pe ---
real(r8), allocatable :: budget_local (:,:,:) ! local sum, valid on all pes
real(r8), allocatable :: budget_global (:,:,:) ! global sum, valid only on root pe
@@ -270,7 +270,7 @@ subroutine med_diag_init(gcomp, rc)
rc = ESMF_SUCCESS
- if(mastertask) then
+ if(maintask) then
write(logunit,'(a)') ' Creating budget_diags%comps '
end if
@@ -281,7 +281,7 @@ subroutine med_diag_init(gcomp, rc)
else
budget_table_version = 'v1'
end if
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname) //' budget table version is '//trim(budget_table_version)
end if
@@ -589,7 +589,7 @@ subroutine med_phases_diag_accum(gcomp, rc)
end subroutine med_phases_diag_accum
!===============================================================================
- subroutine med_diag_sum_master(gcomp, rc)
+ subroutine med_diag_sum_main(gcomp, rc)
! ------------------------------------------------------------------
! Sum local values to global on root
@@ -605,7 +605,7 @@ subroutine med_diag_sum_master(gcomp, rc)
integer :: c_size ! number of component send/recvs
integer :: f_size ! number of fields
integer :: p_size ! number of period types
- character(*), parameter :: subName = '(med_diag_sum_master) '
+ character(*), parameter :: subName = '(med_diag_sum_main) '
! ------------------------------------------------------------------
call t_startf('MED:'//subname)
@@ -629,7 +629,7 @@ subroutine med_diag_sum_master(gcomp, rc)
call t_stopf('MED:'//subname)
- end subroutine med_diag_sum_master
+ end subroutine med_diag_sum_main
!===============================================================================
subroutine med_phases_diag_atm(gcomp, rc)
@@ -2055,7 +2055,7 @@ subroutine med_phases_diag_print(gcomp, rc)
date = year*10000 + mon*100 + day
#ifdef DEBUG
- if(mastertask) then
+ if(maintask) then
write(timestr,'(i4.4,a,i2.2,a,i2.2,a,i5.5)') year,'-',mon,'-',day,'-',tod
write(logunit,' (a)') trim(subname)//": time = "//trim(timestr)
endif
@@ -2103,13 +2103,13 @@ subroutine med_phases_diag_print(gcomp, rc)
if (.not. sumdone) then
! Some budgets will be printed for this period type
! Determine sums if not already done
- call med_diag_sum_master(gcomp, rc)
+ call med_diag_sum_main(gcomp, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
sumdone = .true.
end if
- if (mastertask) then
+ if (maintask) then
c_size = size(budget_diags%comps)
f_size = size(budget_diags%fields)
p_size = size(budget_diags%periods)
@@ -2124,7 +2124,7 @@ subroutine med_phases_diag_print(gcomp, rc)
end if
datagpr(:,:,:) = datagpr(:,:,:)/budget_counter(:,:,:)
- ! Write diagnostic tables to logunit (mastertask only)
+ ! Write diagnostic tables to logunit (maintask only)
if (output_level >= 3) then
! detail atm budgets and breakdown into components ---
call med_diag_print_atm(datagpr, ip, date, tod)
@@ -2141,8 +2141,8 @@ subroutine med_phases_diag_print(gcomp, rc)
deallocate(datagpr)
- endif ! output_level > 0 and mastertask
- end if ! if mastertask
+ endif ! output_level > 0 and maintask
+ end if ! if maintask
enddo ! ip = 1, period_types
!-------------------------------------------------------------------------------
@@ -2760,7 +2760,7 @@ subroutine add_to_budget_diag(entries, index, name)
! create new entry if fldname is not in original list
if (.not. found) then
- if(mastertask) write(logunit,*) ' Add ',trim(name),' to budgets with index ',index
+ if(maintask) write(logunit,*) ' Add ',trim(name),' to budgets with index ',index
! 1) allocate newfld to be size (one element larger than input flds)
allocate(new_entries(index))
diff --git a/mediator/med_internalstate_mod.F90 b/mediator/med_internalstate_mod.F90
index 52866ca4d..c5497293f 100644
--- a/mediator/med_internalstate_mod.F90
+++ b/mediator/med_internalstate_mod.F90
@@ -18,8 +18,8 @@ module med_internalstate_mod
public :: med_internalstate_defaultmasks
integer, public :: logunit ! logunit for mediator log output
- integer, public :: diagunit ! diagunit for budget output (med master only)
- logical, public :: mastertask=.false. ! is this the mastertask
+ integer, public :: diagunit ! diagunit for budget output (med main only)
+ logical, public :: maintask=.false. ! is this the maintask
integer, public :: med_id ! needed currently in med_io_mod and set in esm.F90
! Components
@@ -239,7 +239,7 @@ subroutine med_internalstate_init(gcomp, rc)
end do
num_icesheets = num_icesheets + 1
endif
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a,i8)') trim(subname)//' number of ice sheets is ',num_icesheets
end if
end if
@@ -333,7 +333,7 @@ subroutine med_internalstate_init(gcomp, rc)
compname(compglc(ns)) = 'glc' // trim(cnum)
end do
- if (mastertask) then
+ if (maintask) then
! Write out present flags
write(logunit,*)
do n1 = 1,ncomps
@@ -404,7 +404,7 @@ subroutine med_internalstate_coupling(gcomp, rc)
! starts, but any coupling set to false will never be allowed.
! are allowed, just update the table below.
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname) // "Initializing active coupling flags"
end if
@@ -491,7 +491,7 @@ subroutine med_internalstate_coupling(gcomp, rc)
! - the columns are the source of coupling
! - So, the second column indicates which models the atm is coupled to.
! - And the second row indicates which models are coupled to the atm.
- if (mastertask) then
+ if (maintask) then
write(logunit,*) ' '
write(logunit,'(A)') trim(subname)//' Allowed coupling flags'
write(logunit,'(2x,A10,20(A5))') '|from to -> ',(compname(n2),n2=1,ncomps)
diff --git a/mediator/med_map_mod.F90 b/mediator/med_map_mod.F90
index 2dcb39069..1e1808357 100644
--- a/mediator/med_map_mod.F90
+++ b/mediator/med_map_mod.F90
@@ -5,7 +5,7 @@ module med_map_mod
use ESMF , only : ESMF_SUCCESS, ESMF_FAILURE
use ESMF , only : ESMF_LOGMSG_ERROR, ESMF_LOGMSG_INFO, ESMF_LogWrite
use ESMF , only : ESMF_Field
- use med_internalstate_mod , only : InternalState, logunit, mastertask
+ use med_internalstate_mod , only : InternalState, logunit, maintask
use med_constants_mod , only : dbug_flag => med_constants_dbug_flag
use med_utils_mod , only : chkerr => med_utils_ChkErr
use perf_mod , only : t_startf, t_stopf
@@ -131,7 +131,7 @@ subroutine med_map_RouteHandles_initfrom_esmflds(gcomp, flds_scalar_name, llogun
! --------------------------------------------------------------
! First loop over source and destination components components
- if (mastertask) write(logunit,*) ' '
+ if (maintask) write(logunit,*) ' '
do n1 = 1, ncomps
do n2 = 1, ncomps
if (n1 /= n2) then
@@ -194,7 +194,7 @@ subroutine med_map_RouteHandles_initfrom_esmflds(gcomp, flds_scalar_name, llogun
! unity normalization up front
! --------------------------------------------------------------
- if (mastertask) then
+ if (maintask) then
write(logunit,*)
write(logunit,'(a)') trim(subname)//"Initializing unity map normalizations"
endif
@@ -212,7 +212,7 @@ subroutine med_map_RouteHandles_initfrom_esmflds(gcomp, flds_scalar_name, llogun
call ESMF_FieldBundleGet(is_local%wrap%FBImp(n1,n1), fieldCount=fieldCount, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
if (fieldCount == 0) then
- if (mastertask) then
+ if (maintask) then
write(logunit,*) trim(subname)//' '//trim(compname(n1))//' import FB field count is = ', fieldCount
write(logunit,*) trim(subname)//' '//trim(compname(n1))//' trying to use export FB'
end if
@@ -257,7 +257,7 @@ subroutine med_map_RouteHandles_initfrom_esmflds(gcomp, flds_scalar_name, llogun
call med_map_field(field_src=field_src, field_dst=is_local%wrap%field_NormOne(n1,n2,mapindex), &
routehandles=is_local%wrap%RH(n1,n2,:), maptype=mapindex, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//' created field_NormOne for '&
//compname(n1)//'->'//compname(n2)//' with mapping '//trim(mapnames(mapindex))
end if
@@ -431,14 +431,14 @@ subroutine med_map_routehandles_initfrom_field(n1, n2, fldsrc, flddst, mapindex,
! Create route handle
if (mapindex == mapfcopy) then
- if (mastertask) then
+ if (maintask) then
write(logunit,'(A)') trim(subname)//' creating RH redist for '//trim(string)
end if
call ESMF_FieldRedistStore(fldsrc, flddst, routehandle=routehandles(mapfcopy), &
ignoreUnmatchedIndices = .true., rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
else if (lmapfile /= 'unset') then
- if (mastertask) then
+ if (maintask) then
write(logunit,'(A)') trim(subname)//' creating RH '//trim(mapname)//&
' via input file '//trim(mapfile)//' for '//trim(string)
end if
@@ -448,7 +448,7 @@ subroutine med_map_routehandles_initfrom_field(n1, n2, fldsrc, flddst, mapindex,
if (chkerr(rc,__LINE__,u_FILE_u)) return
else if (mapindex == mapbilnr .or. mapindex == mapbilnr_uv3d) then
if (.not. ESMF_RouteHandleIsCreated(routehandles(mapbilnr))) then
- if (mastertask) then
+ if (maintask) then
write(logunit,'(A)') trim(subname)//' creating RH '//trim(mapname)//' for '//trim(string)
end if
call ESMF_FieldRegridStore(fldsrc, flddst, routehandle=routehandles(mapbilnr), &
@@ -464,7 +464,7 @@ subroutine med_map_routehandles_initfrom_field(n1, n2, fldsrc, flddst, mapindex,
ldstprint = .true.
end if
else if (mapindex == mapfillv_bilnr) then
- if (mastertask) then
+ if (maintask) then
write(logunit,'(A)') trim(subname)//' creating RH '//trim(mapname)//' for '//trim(string)
end if
call ESMF_FieldRegridStore(fldsrc, flddst, routehandle=routehandles(mapfillv_bilnr), &
@@ -479,7 +479,7 @@ subroutine med_map_routehandles_initfrom_field(n1, n2, fldsrc, flddst, mapindex,
if (chkerr(rc,__LINE__,u_FILE_u)) return
ldstprint = .true.
else if (mapindex == mapbilnr_nstod) then
- if (mastertask) then
+ if (maintask) then
write(logunit,'(A)') trim(subname)//' creating RH '//trim(mapname)//' for '//trim(string)
end if
call ESMF_FieldRegridStore(fldsrc, flddst, routehandle=routehandles(mapbilnr_nstod), &
@@ -495,7 +495,7 @@ subroutine med_map_routehandles_initfrom_field(n1, n2, fldsrc, flddst, mapindex,
if (chkerr(rc,__LINE__,u_FILE_u)) return
ldstprint = .true.
else if (mapindex == mapconsf .or. mapindex == mapnstod_consf) then
- if (mastertask) then
+ if (maintask) then
write(logunit,'(A)') trim(subname)//' creating RH '//trim(mapname)//' for '//trim(string)
end if
call ESMF_FieldRegridStore(fldsrc, flddst, routehandle=routehandles(mapconsf), &
@@ -512,7 +512,7 @@ subroutine med_map_routehandles_initfrom_field(n1, n2, fldsrc, flddst, mapindex,
ldstprint = .true.
else if (mapindex == mapconsf_aofrac) then
if (.not. ESMF_RouteHandleIsCreated(routehandles(mapconsf))) then
- if (mastertask) then
+ if (maintask) then
write(logunit,'(A)') trim(subname)//' creating RH '//trim(mapname)//' for '//trim(string)
end if
call ESMF_FieldRegridStore(fldsrc, flddst, routehandle=routehandles(mapconsf_aofrac), &
@@ -529,14 +529,14 @@ subroutine med_map_routehandles_initfrom_field(n1, n2, fldsrc, flddst, mapindex,
ldstprint = .true.
else
! Copy existing consf RH
- if (mastertask) then
+ if (maintask) then
write(logunit,'(A)') trim(subname)//' copying RH(mapconsf) to '//trim(mapname)//' for '//trim(string)
end if
routehandles(mapconsf_aofrac) = ESMF_RouteHandleCreate(routehandles(mapconsf), rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
end if
else if (mapindex == mapconsd .or. mapindex == mapnstod_consd) then
- if (mastertask) then
+ if (maintask) then
write(logunit,'(A)') trim(subname)//' creating RH '//trim(mapname)//' for '//trim(string)
end if
call ESMF_FieldRegridStore(fldsrc, flddst, routehandle=routehandles(mapconsd), &
@@ -553,7 +553,7 @@ subroutine med_map_routehandles_initfrom_field(n1, n2, fldsrc, flddst, mapindex,
ldstprint = .true.
else if (mapindex == mappatch .or. mapindex == mappatch_uv3d) then
if (.not. ESMF_RouteHandleIsCreated(routehandles(mappatch))) then
- if (mastertask) then
+ if (maintask) then
write(logunit,'(A)') trim(subname)//' creating RH '//trim(mapname)//' for '//trim(string)
end if
call ESMF_FieldRegridStore(fldsrc, flddst, routehandle=routehandles(mappatch), &
@@ -569,7 +569,7 @@ subroutine med_map_routehandles_initfrom_field(n1, n2, fldsrc, flddst, mapindex,
ldstprint = .true.
end if
else
- if (mastertask) then
+ if (maintask) then
write(logunit,'(A)') trim(subname)//' mapindex '//trim(mapname)//' not supported for '//trim(string)
end if
call ESMF_LogWrite(trim(subname)//' mapindex '//trim(mapname)//' not supported ', &
@@ -629,7 +629,7 @@ subroutine med_map_routehandles_initfrom_field(n1, n2, fldsrc, flddst, mapindex,
! Output route handle to file if requested
if (rhprint) then
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//trim(string)//": printing RH for "//trim(mapname)
end if
call ESMF_RouteHandlePrint(routehandles(mapindex), rc=rc)
@@ -791,7 +791,7 @@ subroutine med_map_packed_field_create(destcomp, flds_scalar_name, &
! ungridded dimensions and need to unwrap them into separate fields for the
! purposes of packing
- if (mastertask) write(logunit,*)
+ if (maintask) write(logunit,*)
! Determine the normalization type for each packed_data mapping element
! Loop over mapping types
@@ -873,7 +873,7 @@ subroutine med_map_packed_field_create(destcomp, flds_scalar_name, &
packed_data(mapindex)%fldindex(nf) = npacked(mapindex)
end if
- if (mastertask) then
+ if (maintask) then
write(logunit,'(5(a,2x),2x,i4)') trim(subname)//&
'Packed field: destcomp,mapping,mapnorm,fldname,index: ', &
trim(compname(destcomp)), &
diff --git a/mediator/med_phases_aofluxes_mod.F90 b/mediator/med_phases_aofluxes_mod.F90
index bf2061de3..0b3d10901 100644
--- a/mediator/med_phases_aofluxes_mod.F90
+++ b/mediator/med_phases_aofluxes_mod.F90
@@ -26,7 +26,7 @@ module med_phases_aofluxes_mod
use ESMF , only : ESMF_Finalize, ESMF_LogFoundError
use ESMF , only : ESMF_XGridGet, ESMF_MeshCreate, ESMF_MeshWrite, ESMF_KIND_R8
use med_kind_mod , only : CX=>SHR_KIND_CX, CS=>SHR_KIND_CS, CL=>SHR_KIND_CL, R8=>SHR_KIND_R8
- use med_internalstate_mod , only : InternalState, mastertask, logunit
+ use med_internalstate_mod , only : InternalState, maintask, logunit
use med_internalstate_mod , only : compatm, compocn, coupling_mode, aoflux_code, mapconsd, mapconsf, mapfcopy
use med_constants_mod , only : dbug_flag => med_constants_dbug_flag
use med_utils_mod , only : memcheck => med_memcheck
@@ -198,7 +198,7 @@ subroutine med_phases_aofluxes_init_fldbuns(gcomp, rc)
call FB_init(is_local%wrap%FBMed_aoflux_a, is_local%wrap%flds_scalar_name, &
STgeom=is_local%wrap%NStateImp(compatm), fieldnamelist=fldnames_aof_out, name='FBMed_aoflux_a', rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) then
+ if (maintask) then
write(logunit,*)
write(logunit,'(a)') trim(subname)//' initialized FB FBMed_aoflux_a'
end if
@@ -207,7 +207,7 @@ subroutine med_phases_aofluxes_init_fldbuns(gcomp, rc)
call FB_init(is_local%wrap%FBMed_aoflux_o, is_local%wrap%flds_scalar_name, &
STgeom=is_local%wrap%NStateImp(compocn), fieldnamelist=fldnames_aof_out, name='FBMed_aoflux_o', rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//' initialized FB FBMed_aoflux_o'
write(logunit,'(a)') trim(subname)//' following are the fields in FBMed_aoflux_o and FBMed_aoflux_a'
do n = 1,fieldcount
@@ -220,7 +220,7 @@ subroutine med_phases_aofluxes_init_fldbuns(gcomp, rc)
! Create the field bundle is_local%wrap%FBImp(compatm,compocn) if needed
if (.not. ESMF_FieldBundleIsCreated(is_local%wrap%FBImp(compatm,compocn), rc=rc)) then
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//' creating field bundle FBImp(compatm,compocn)'
end if
call FB_init(is_local%wrap%FBImp(compatm,compocn), is_local%wrap%flds_scalar_name, &
@@ -228,14 +228,14 @@ subroutine med_phases_aofluxes_init_fldbuns(gcomp, rc)
name='FBImp'//trim(compname(compatm))//'_'//trim(compname(compocn)), rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
end if
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//' initializing FB for '// &
trim(compname(compatm))//'_'//trim(compname(compocn))
end if
! Create the field bundle is_local%wrap%FBImp(compocn,compatm) if needed
if (.not. ESMF_FieldBundleIsCreated(is_local%wrap%FBImp(compocn,compatm), rc=rc)) then
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//' creating field bundle FBImp(compocn,compatm)'
end if
call FB_init(is_local%wrap%FBImp(compocn,compatm), is_local%wrap%flds_scalar_name, &
@@ -243,7 +243,7 @@ subroutine med_phases_aofluxes_init_fldbuns(gcomp, rc)
name='FBImp'//trim(compname(compocn))//'_'//trim(compname(compatm)), rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
end if
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//' initializing FB for '// &
trim(compname(compocn))//'_'//trim(compname(compatm))
end if
@@ -309,7 +309,7 @@ subroutine med_phases_aofluxes_run(gcomp, rc)
if (dbug_flag > 5) then
call ESMF_LogWrite(trim(subname)//": called", ESMF_LOGMSG_INFO)
endif
- call memcheck(subname, 5, mastertask)
+ call memcheck(subname, 5, maintask)
! Calculate atm/ocn fluxes on the destination grid
call med_aofluxes_update(gcomp, aoflux_in, aoflux_out, rc)
@@ -368,7 +368,7 @@ subroutine med_aofluxes_init(gcomp, aoflux_in, aoflux_out, rc)
call ESMF_LogWrite(trim(subname)//": called", ESMF_LOGMSG_INFO)
endif
rc = ESMF_SUCCESS
- call memcheck(subname, 5, mastertask)
+ call memcheck(subname, 5, maintask)
call t_startf('MED:'//subname)
@@ -396,7 +396,7 @@ subroutine med_aofluxes_init(gcomp, aoflux_in, aoflux_out, rc)
ocn_surface_flux_scheme = 0
end if
#ifdef CESMCOUPLED
- if (mastertask) then
+ if (maintask) then
write(logunit,*)
write(logunit,'(a)') trim(subname)//' ocn_surface_flux_scheme is '//trim(cvalue)
end if
@@ -1059,7 +1059,7 @@ subroutine med_aofluxes_update(gcomp, aoflux_in, aoflux_out, rc)
#else
#ifdef UFS_AOFLUX
if (trim(aoflux_code) == 'ccpp') then
- call flux_atmocn_ccpp(gcomp=gcomp, mastertask=mastertask, logunit=logunit, &
+ call flux_atmocn_ccpp(gcomp=gcomp, maintask=maintask, logunit=logunit, &
nMax=aoflux_in%lsize, psfc=aoflux_in%psfc, &
pbot=aoflux_in%pbot, tbot=aoflux_in%tbot, qbot=aoflux_in%shum, lwdn=aoflux_in%lwdn, &
zbot=aoflux_in%zbot, garea=aoflux_in%garea, ubot=aoflux_in%ubot, usfc=aoflux_in%usfc, vbot=aoflux_in%vbot, &
diff --git a/mediator/med_phases_history_mod.F90 b/mediator/med_phases_history_mod.F90
index 363118c8d..2f7c9f062 100644
--- a/mediator/med_phases_history_mod.F90
+++ b/mediator/med_phases_history_mod.F90
@@ -20,7 +20,7 @@ module med_phases_history_mod
use NUOPC_Model , only : NUOPC_ModelGet
use med_utils_mod , only : chkerr => med_utils_ChkErr
use med_internalstate_mod , only : ncomps, compname
- use med_internalstate_mod , only : InternalState, mastertask, logunit
+ use med_internalstate_mod , only : InternalState, maintask, logunit
use med_time_mod , only : med_time_alarmInit
use med_io_mod , only : med_io_write, med_io_wopen, med_io_enddef, med_io_close
use perf_mod , only : t_startf, t_stopf
@@ -230,7 +230,7 @@ subroutine med_phases_history_write(gcomp, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
! Write diagnostic info
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a,2x,i8)') trim(subname) // " initialized history alarm "//&
trim(alarmname)//" with option "//trim(hist_option_all_inst)//" and frequency ",hist_n_all_inst
end if
@@ -253,7 +253,7 @@ subroutine med_phases_history_write(gcomp, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
! Write diagnostic info if appropriate
- if (mastertask .and. debug_alarms) then
+ if (maintask .and. debug_alarms) then
call ESMF_AlarmGet(alarm, ringInterval=ringInterval, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_TimeIntervalGet(ringInterval, s=ringinterval_length, rc=rc)
@@ -271,7 +271,7 @@ subroutine med_phases_history_write(gcomp, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
write(nexttimestr,'(i4.4,a,i2.2,a,i2.2,a,i5.5)') yr,'-',mon,'-',day,'-',sec
- if (mastertask) then
+ if (maintask) then
write(logunit,*)
write(logunit,'(a,i8)') trim(subname)//" : history alarmname "//trim(alarmname)//&
' is ringing, interval length is ', ringInterval_length
@@ -1142,7 +1142,7 @@ subroutine med_phases_history_write_comp_aux(gcomp, compid, auxcomp, rc)
end if ! end of if auxflds is set to 'all'
- if (mastertask) then
+ if (maintask) then
write(logunit,*)
write(logunit,'(a,i4,a)') trim(subname) // ' Writing the following fields to auxfile ',nfcnt,&
' for component '//trim(compname(compid))
@@ -1356,7 +1356,7 @@ subroutine get_auxflds(str, flds, rc)
valid = .false.
end if
if (.not. valid) then
- if (mastertask) write(logunit,*) "ERROR: invalid list = ",trim(str)
+ if (maintask) write(logunit,*) "ERROR: invalid list = ",trim(str)
call ESMF_LogWrite("ERROR: invalid list = "//trim(str), ESMF_LOGMSG_ERROR)
rc = ESMF_FAILURE
return
@@ -1565,7 +1565,7 @@ subroutine med_phases_history_init_histclock(gcomp, hclock, alarm, alarmname, hi
call ESMF_TimeIntervalGet(dtimestep, s=dsec, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a,2x,i8,2x,i8)') trim(subname) // " mediator, driver timesteps for " &
//trim(alarmname),msec,dsec
end if
@@ -1580,7 +1580,7 @@ subroutine med_phases_history_init_histclock(gcomp, hclock, alarm, alarmname, hi
reftime=StartTime, alarmname=trim(alarmname), advance_clock=.true., rc=rc)
! Write diagnostic info
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a,2x,i8)') trim(subname) // " initialized history alarm "//&
trim(alarmname)//" with option "//trim(hist_option)//" and frequency ",hist_n
end if
@@ -1634,7 +1634,7 @@ subroutine med_phases_history_query_ifwrite(gcomp, hclock, alarmname, write_now,
! Write diagnostic output
if (write_now) then
- if (mastertask .and. debug_alarms) then
+ if (maintask .and. debug_alarms) then
! output alarm info
call ESMF_AlarmGet(alarm, ringInterval=ringInterval, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
@@ -1652,7 +1652,7 @@ subroutine med_phases_history_query_ifwrite(gcomp, hclock, alarmname, write_now,
if (ChkErr(rc,__LINE__,u_FILE_u)) return
write(nexttimestr,'(i4.4,a,i2.2,a,i2.2,a,i5.5)') yr,'-',mon,'-',day,'-',sec
- if (mastertask) then
+ if (maintask) then
write(logunit,*)
write(logunit,'(a,i8)') trim(subname)//" : history alarmname "//trim(alarmname)//&
' is ringing, interval length is ', ringInterval_length
@@ -1674,7 +1674,7 @@ subroutine med_phases_history_query_ifwrite(gcomp, hclock, alarmname, write_now,
if (ChkErr(rc,__LINE__,u_FILE_u)) return
write(nexttimestr,'(i4.4,a,i2.2,a,i2.2,a,i5.5)') yr,'-',mon,'-',day,'-',sec
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//" : mclock currtime = "//trim(currtimestr)//&
" mclock nexttime = "//trim(nexttimestr)
end if
@@ -1800,7 +1800,7 @@ subroutine med_phases_history_set_timeinfo(gcomp, hclock, alarmname, &
write(histfile, "(6a)") trim(case_name),'.cpl',trim(inst_tag),trim(hist_str),trim(nexttime_str),'.nc'
end if
- if (mastertask) then
+ if (maintask) then
call ESMF_TimeGet(currtime, yy=yr, mm=mon, dd=day, s=sec, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
write(currtime_str,'(i4.4,a,i2.2,a,i2.2,a,i5.5)') yr,'-',mon,'-',day,'-',sec
diff --git a/mediator/med_phases_ocnalb_mod.F90 b/mediator/med_phases_ocnalb_mod.F90
index ecaf9956f..a5ef002c7 100644
--- a/mediator/med_phases_ocnalb_mod.F90
+++ b/mediator/med_phases_ocnalb_mod.F90
@@ -262,7 +262,7 @@ subroutine med_phases_ocnalb_run(gcomp, rc)
#else
- ! Determine master task
+ ! Determine main task
call ESMF_GridCompGet(gcomp, vm=vm, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
call ESMF_VMGet(vm, localPet=iam, rc=rc)
@@ -442,7 +442,7 @@ end subroutine med_phases_ocnalb_run
!===============================================================================
#ifdef CESMCOUPLED
- subroutine med_phases_ocnalb_orbital_init(gcomp, logunit, mastertask, rc)
+ subroutine med_phases_ocnalb_orbital_init(gcomp, logunit, maintask, rc)
!----------------------------------------------------------
! Obtain orbital related values
@@ -456,7 +456,7 @@ subroutine med_phases_ocnalb_orbital_init(gcomp, logunit, mastertask, rc)
! input/output variables
type(ESMF_GridComp) :: gcomp
integer , intent(in) :: logunit ! output logunit
- logical , intent(in) :: mastertask
+ logical , intent(in) :: maintask
integer , intent(out) :: rc ! output error
! local variables
@@ -541,7 +541,7 @@ end subroutine med_phases_ocnalb_orbital_init
!===============================================================================
- subroutine med_phases_ocnalb_orbital_update(clock, logunit, mastertask, eccen, obliqr, lambm0, mvelpp, rc)
+ subroutine med_phases_ocnalb_orbital_update(clock, logunit, maintask, eccen, obliqr, lambm0, mvelpp, rc)
!----------------------------------------------------------
! Update orbital settings
@@ -553,7 +553,7 @@ subroutine med_phases_ocnalb_orbital_update(clock, logunit, mastertask, eccen,
! input/output variables
type(ESMF_Clock) , intent(in) :: clock
integer , intent(in) :: logunit
- logical , intent(in) :: mastertask
+ logical , intent(in) :: maintask
real(R8) , intent(inout) :: eccen ! orbital eccentricity
real(R8) , intent(inout) :: obliqr ! Earths obliquity in rad
real(R8) , intent(inout) :: lambm0 ! Mean long of perihelion at vernal equinox (radians)
@@ -578,11 +578,11 @@ subroutine med_phases_ocnalb_orbital_update(clock, logunit, mastertask, eccen,
call ESMF_TimeGet(CurrTime, yy=year, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
orb_year = orb_iyear + (year - orb_iyear_align)
- lprint = mastertask
+ lprint = maintask
else
orb_year = orb_iyear
if (first_time) then
- lprint = mastertask
+ lprint = maintask
first_time = .false.
else
lprint = .false.
diff --git a/mediator/med_phases_post_glc_mod.F90 b/mediator/med_phases_post_glc_mod.F90
index c61097f9f..ac32ae8b8 100644
--- a/mediator/med_phases_post_glc_mod.F90
+++ b/mediator/med_phases_post_glc_mod.F90
@@ -16,7 +16,7 @@ module med_phases_post_glc_mod
use ESMF , only : ESMF_RouteHandle, ESMF_RouteHandleIsCreated
use med_internalstate_mod , only : compatm, compice, complnd, comprof, compocn, compname, compglc
use med_internalstate_mod , only : mapbilnr, mapconsd, compname
- use med_internalstate_mod , only : InternalState, mastertask, logunit
+ use med_internalstate_mod , only : InternalState, maintask, logunit
use med_methods_mod , only : fldbun_diagnose => med_methods_FB_diagnose
use med_methods_mod , only : fldbun_fldchk => med_methods_FB_fldchk
use med_methods_mod , only : fldbun_getmesh => med_methods_FB_getmesh
@@ -132,7 +132,7 @@ subroutine med_phases_post_glc(gcomp, rc)
exit
end if
end do
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a,L1)') trim(subname) // 'glc2lnd_coupling is ',glc2lnd_coupling
write(logunit,'(a,L1)') trim(subname) // 'glc2ocn_coupling is ',glc2ocn_coupling
write(logunit,'(a,L1)') trim(subname) // 'glc2ice_coupling is ',glc2ice_coupling
@@ -145,7 +145,7 @@ subroutine med_phases_post_glc(gcomp, rc)
call NUOPC_CompAttributeGet(gcomp, name="cism_evolve", value=cvalue, isPresent=isPresent, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
read (cvalue,*) cism_evolve
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a,l7)') trim(subname)//' cism_evolve = ',cism_evolve
end if
end if
diff --git a/mediator/med_phases_prep_atm_mod.F90 b/mediator/med_phases_prep_atm_mod.F90
index 47ef5928b..9bb2b059f 100644
--- a/mediator/med_phases_prep_atm_mod.F90
+++ b/mediator/med_phases_prep_atm_mod.F90
@@ -16,7 +16,7 @@ module med_phases_prep_atm_mod
use med_methods_mod , only : FB_getfldptr=> med_methods_FB_GetFldPtr
use med_merge_mod , only : med_merge_auto
use med_map_mod , only : med_map_field_packed
- use med_internalstate_mod , only : InternalState, mastertask
+ use med_internalstate_mod , only : InternalState, maintask
use med_internalstate_mod , only : compatm, compocn, compice, compname, coupling_mode
use esmFlds , only : med_fldlist_GetfldListTo, med_fldlist_type
use perf_mod , only : t_startf, t_stopf
@@ -62,7 +62,7 @@ subroutine med_phases_prep_atm(gcomp, rc)
if (dbug_flag > 5) then
call ESMF_LogWrite(subname//' called', ESMF_LOGMSG_INFO)
end if
- call memcheck(subname, 3, mastertask)
+ call memcheck(subname, 3, maintask)
!---------------------------------------
! --- Get the internal state
diff --git a/mediator/med_phases_prep_glc_mod.F90 b/mediator/med_phases_prep_glc_mod.F90
index a15eacc82..311d91c8a 100644
--- a/mediator/med_phases_prep_glc_mod.F90
+++ b/mediator/med_phases_prep_glc_mod.F90
@@ -22,7 +22,7 @@ module med_phases_prep_glc_mod
use ESMF , only : ESMF_DYNAMICMASK, ESMF_DynamicMaskSetR8R8R8, ESMF_DYNAMICMASKELEMENTR8R8R8
use ESMF , only : ESMF_FieldRegrid
use med_internalstate_mod , only : complnd, compocn, mapbilnr, mapconsd, compname, compglc
- use med_internalstate_mod , only : InternalState, mastertask, logunit
+ use med_internalstate_mod , only : InternalState, maintask, logunit
use med_map_mod , only : med_map_routehandles_init, med_map_rh_is_created
use med_map_mod , only : med_map_field_normalized, med_map_field
use med_constants_mod , only : dbug_flag => med_constants_dbug_flag
@@ -258,7 +258,7 @@ subroutine med_phases_prep_glc_init(gcomp, rc)
rc = ESMF_FAILURE
return
end select
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a,l4)') trim(subname)//' smb_renormalize is ',smb_renormalize
end if
@@ -546,7 +546,7 @@ subroutine med_phases_prep_glc_avg(gcomp, rc)
if (trim(glc_avg_period) == 'yearly') then
call med_time_alarmInit(prepglc_clock, glc_avg_alarm, 'yearly', alarmname='alarm_glc_avg', rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a,i10)') trim(subname)//&
' created alarm with averaging period for export to glc is yearly'
end if
@@ -556,7 +556,7 @@ subroutine med_phases_prep_glc_avg(gcomp, rc)
read(cvalue,*) glc_cpl_dt
call med_time_alarmInit(prepglc_clock, glc_avg_alarm, 'nseconds', opt_n=glc_cpl_dt, alarmname='alarm_glc_avg', rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a,i10)') trim(subname)//&
' created alarm with averaging period for export to glc (in seconds) ',glc_cpl_dt
end if
@@ -576,7 +576,7 @@ subroutine med_phases_prep_glc_avg(gcomp, rc)
! Check time
if (dbug_flag > 5) then
- if (mastertask) then
+ if (maintask) then
call NUOPC_ModelGet(gcomp, modelClock=med_clock, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_ClockGet(med_clock, currtime=med_currtime, rc=rc)
@@ -586,7 +586,7 @@ subroutine med_phases_prep_glc_avg(gcomp, rc)
call ESMF_ClockGet(prepglc_clock, currtime=prepglc_currtime, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_TimeGet(prepglc_currtime,yy=yr_prepglc, mm=mon_prepglc, dd=day_prepglc, s=sec_prepglc, rc=rc)
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a,4(i8,2x))') trim(subname)//'med clock yr, mon, day, sec = ',&
yr_med,mon_med,day_med,sec_med
write(logunit,'(a,4(i8,2x))') trim(subname)//'prep glc clock yr, mon, day, sec = ',&
@@ -602,7 +602,7 @@ subroutine med_phases_prep_glc_avg(gcomp, rc)
do_avg = .true.
call ESMF_LogWrite(trim(subname)//": glc_avg alarm is ringing - average input from lnd and ocn to glc", &
ESMF_LOGMSG_INFO)
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//"glc_avg alarm is ringing - averaging input from lnd and ocn to glc"
end if
! Turn off the alarm
@@ -1154,7 +1154,7 @@ subroutine med_phases_prep_glc_renormalize_smb(gcomp, ns, rc)
call ESMF_VMAllreduce(vm, senddata=local_ablat_lnd, recvdata=global_ablat_lnd, count=1, &
reduceflag=ESMF_REDUCE_SUM, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a,d21.10)') trim(subname)//'global_accum_lnd = ', global_accum_lnd
write(logunit,'(a,d21.10)') trim(subname)//'global_ablat_lnd = ', global_ablat_lnd
endif
@@ -1184,7 +1184,7 @@ subroutine med_phases_prep_glc_renormalize_smb(gcomp, ns, rc)
reduceflag=ESMF_REDUCE_SUM, rc=rc)
call ESMF_VMAllreduce(vm, senddata=local_ablat_glc, recvdata=global_ablat_glc, count=1, &
reduceflag=ESMF_REDUCE_SUM, rc=rc)
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a,d21.10)') trim(subname)//'global_accum_glc = ', global_accum_glc
write(logunit,'(a,d21.10)') trim(subname)//'global_ablat_glc = ', global_ablat_glc
endif
@@ -1200,7 +1200,7 @@ subroutine med_phases_prep_glc_renormalize_smb(gcomp, ns, rc)
else
ablat_renorm_factor = 0.0_r8
endif
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a,d21.10)') trim(subname)//'accum_renorm_factor = ', accum_renorm_factor
write(logunit,'(a,d21.10)') trim(subname)//'ablat_renorm_factor = ', ablat_renorm_factor
endif
diff --git a/mediator/med_phases_prep_ice_mod.F90 b/mediator/med_phases_prep_ice_mod.F90
index 0b1b40756..428f3afef 100644
--- a/mediator/med_phases_prep_ice_mod.F90
+++ b/mediator/med_phases_prep_ice_mod.F90
@@ -36,7 +36,7 @@ subroutine med_phases_prep_ice(gcomp, rc)
use med_methods_mod , only : FB_GetFldPtr => med_methods_FB_GetFldPtr
use med_constants_mod , only : dbug_flag => med_constants_dbug_flag
use med_merge_mod , only : med_merge_auto
- use med_internalstate_mod , only : InternalState, logunit, mastertask
+ use med_internalstate_mod , only : InternalState, logunit, maintask
use med_internalstate_mod , only : compatm, compice, compocn
use med_internalstate_mod , only : coupling_mode
use esmFlds , only : med_fldList_GetFldListTo
@@ -93,7 +93,7 @@ subroutine med_phases_prep_ice(gcomp, rc)
! is initialized to 0.
! In addition, in med.F90, if this attribute is not present as a mediator component attribute,
! it is set to 0.
- if (mastertask) then
+ if (maintask) then
call ESMF_StateGet(is_local%wrap%NstateImp(compocn), &
itemName=trim(is_local%wrap%flds_scalar_name), field=lfield, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
@@ -130,7 +130,7 @@ subroutine med_phases_prep_ice(gcomp, rc)
! obtain nextsw_cday from atm if it is in the import state and send it to ice
scalar_id=is_local%wrap%flds_scalar_index_nextsw_cday
- if (scalar_id > 0 .and. mastertask) then
+ if (scalar_id > 0 .and. maintask) then
call ESMF_StateGet(is_local%wrap%NstateImp(compatm), &
itemName=trim(is_local%wrap%flds_scalar_name), field=lfield, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
diff --git a/mediator/med_phases_prep_lnd_mod.F90 b/mediator/med_phases_prep_lnd_mod.F90
index 64bced198..0c0bad212 100644
--- a/mediator/med_phases_prep_lnd_mod.F90
+++ b/mediator/med_phases_prep_lnd_mod.F90
@@ -32,7 +32,7 @@ subroutine med_phases_prep_lnd(gcomp, rc)
use med_utils_mod , only : chkerr => med_utils_ChkErr
use med_constants_mod , only : dbug_flag => med_constants_dbug_flag
use med_internalstate_mod , only : complnd, compatm
- use med_internalstate_mod , only : InternalState, mastertask
+ use med_internalstate_mod , only : InternalState, maintask
use med_merge_mod , only : med_merge_auto
use perf_mod , only : t_startf, t_stopf
@@ -101,7 +101,7 @@ subroutine med_phases_prep_lnd(gcomp, rc)
! obtain nextsw_cday from atm if it is in the import state and send it to lnd
scalar_id=is_local%wrap%flds_scalar_index_nextsw_cday
- if (scalar_id > 0 .and. field_found .and. mastertask) then
+ if (scalar_id > 0 .and. field_found .and. maintask) then
call ESMF_StateGet(is_local%wrap%NstateImp(compatm), &
itemName=trim(is_local%wrap%flds_scalar_name), field=lfield, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
diff --git a/mediator/med_phases_prep_ocn_mod.F90 b/mediator/med_phases_prep_ocn_mod.F90
index 981bc1742..58c9ebc8b 100644
--- a/mediator/med_phases_prep_ocn_mod.F90
+++ b/mediator/med_phases_prep_ocn_mod.F90
@@ -7,7 +7,7 @@ module med_phases_prep_ocn_mod
use med_kind_mod , only : CX=>SHR_KIND_CX, CS=>SHR_KIND_CS, CL=>SHR_KIND_CL, R8=>SHR_KIND_R8
use med_constants_mod , only : czero =>med_constants_czero
use med_constants_mod , only : dbug_flag => med_constants_dbug_flag
- use med_internalstate_mod , only : InternalState, mastertask, logunit
+ use med_internalstate_mod , only : InternalState, maintask, logunit
use med_merge_mod , only : med_merge_auto, med_merge_field
use med_map_mod , only : med_map_field_packed
use med_utils_mod , only : memcheck => med_memcheck
@@ -61,7 +61,7 @@ subroutine med_phases_prep_ocn_init(gcomp, rc)
call ESMF_GridCompGetInternalState(gcomp, is_local, rc)
if (chkErr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//' initializing ocean export accumulation FB for '
end if
call FB_init(is_local%wrap%FBExpAccumOcn, is_local%wrap%flds_scalar_name, &
@@ -108,7 +108,7 @@ subroutine med_phases_prep_ocn_accum(gcomp, rc)
call ESMF_LogWrite(subname//' called', ESMF_LOGMSG_INFO)
end if
rc = ESMF_SUCCESS
- call memcheck(subname, 5, mastertask)
+ call memcheck(subname, 5, maintask)
! Get the internal state
nullify(is_local%wrap)
@@ -376,7 +376,7 @@ subroutine med_phases_prep_ocn_custom_cesm(gcomp, rc)
if (dbug_flag > 20) then
call ESMF_LogWrite(subname//' called', ESMF_LOGMSG_INFO)
end if
- call memcheck(subname, 5, mastertask)
+ call memcheck(subname, 5, maintask)
! Get the internal state
nullify(is_local%wrap)
@@ -565,7 +565,7 @@ subroutine med_phases_prep_ocn_custom_cesm(gcomp, rc)
! is initialized to 0.
! In addition, in med.F90, if this attribute is not present as a mediator component attribute,
! it is set to 0.
- if (mastertask) then
+ if (maintask) then
call ESMF_StateGet(is_local%wrap%NstateImp(compocn), &
itemName=trim(is_local%wrap%flds_scalar_name), field=lfield, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
@@ -638,7 +638,7 @@ subroutine med_phases_prep_ocn_custom_nems(gcomp, rc)
if (dbug_flag > 20) then
call ESMF_LogWrite(subname//' called', ESMF_LOGMSG_INFO)
end if
- call memcheck(subname, 5, mastertask)
+ call memcheck(subname, 5, maintask)
! Get the internal state
nullify(is_local%wrap)
diff --git a/mediator/med_phases_prep_rof_mod.F90 b/mediator/med_phases_prep_rof_mod.F90
index ef977524b..5d603a141 100644
--- a/mediator/med_phases_prep_rof_mod.F90
+++ b/mediator/med_phases_prep_rof_mod.F90
@@ -13,7 +13,7 @@ module med_phases_prep_rof_mod
use med_kind_mod , only : CX=>SHR_KIND_CX, CS=>SHR_KIND_CS, CL=>SHR_KIND_CL, R8=>SHR_KIND_R8
use ESMF , only : ESMF_FieldBundle, ESMF_Field
use med_internalstate_mod , only : complnd, comprof, mapconsf, mapconsd, mapfcopy
- use med_internalstate_mod , only : InternalState, mastertask, logunit
+ use med_internalstate_mod , only : InternalState, maintask, logunit
use med_constants_mod , only : dbug_flag => med_constants_dbug_flag
use med_constants_mod , only : czero => med_constants_czero
use med_utils_mod , only : chkerr => med_utils_chkerr
@@ -306,7 +306,7 @@ subroutine med_phases_prep_rof(gcomp, rc)
count = lndAccum2rof_cnt
if (count == 0) then
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)')trim(subname)//'accumulation count for land input averging to river is 0 '// &
' accumulation field is set to zero'
end if
diff --git a/mediator/med_phases_prep_wav_mod.F90 b/mediator/med_phases_prep_wav_mod.F90
index 8f0e9dcf2..5fcb9ba7e 100644
--- a/mediator/med_phases_prep_wav_mod.F90
+++ b/mediator/med_phases_prep_wav_mod.F90
@@ -7,7 +7,7 @@ module med_phases_prep_wav_mod
use med_kind_mod , only : CX=>SHR_KIND_CX, CS=>SHR_KIND_CS, CL=>SHR_KIND_CL, R8=>SHR_KIND_R8
use med_constants_mod , only : czero =>med_constants_czero
use med_constants_mod , only : dbug_flag => med_constants_dbug_flag
- use med_internalstate_mod , only : InternalState, mastertask, logunit
+ use med_internalstate_mod , only : InternalState, maintask, logunit
use med_merge_mod , only : med_merge_auto, med_merge_field
use med_map_mod , only : med_map_field_packed
use med_utils_mod , only : memcheck => med_memcheck
@@ -56,7 +56,7 @@ subroutine med_phases_prep_wav_init(gcomp, rc)
call ESMF_GridCompGetInternalState(gcomp, is_local, rc)
if (chkErr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') trim(subname)//' initializing wave export accumulation FB for '
end if
call FB_Init(is_local%wrap%FBExpAccumWav, is_local%wrap%flds_scalar_name, &
@@ -89,7 +89,7 @@ subroutine med_phases_prep_wav_accum(gcomp, rc)
call ESMF_LogWrite(subname//' called', ESMF_LOGMSG_INFO)
end if
rc = ESMF_SUCCESS
- call memcheck(subname, 5, mastertask)
+ call memcheck(subname, 5, maintask)
! Get the internal state
nullify(is_local%wrap)
diff --git a/mediator/med_phases_profile_mod.F90 b/mediator/med_phases_profile_mod.F90
index 7e9fb3c47..dadfb989c 100644
--- a/mediator/med_phases_profile_mod.F90
+++ b/mediator/med_phases_profile_mod.F90
@@ -7,7 +7,7 @@ module med_phases_profile_mod
use med_kind_mod , only : CX=>SHR_KIND_CX, CS=>SHR_KIND_CS, CL=>SHR_KIND_CL, R8=>SHR_KIND_R8
use med_constants_mod , only : dbug_flag=>med_constants_dbug_flag
use med_utils_mod , only : med_utils_chkerr, med_memcheck
- use med_internalstate_mod , only : mastertask, logunit
+ use med_internalstate_mod , only : maintask, logunit
use med_utils_mod , only : chkerr => med_utils_ChkErr
use med_time_mod , only : alarmInit => med_time_alarmInit
use perf_mod , only : t_startf, t_stopf
@@ -144,7 +144,7 @@ subroutine med_phases_profile(gcomp, rc)
endif
endif
- if ((stopalarmison .or. alarmIsOn .or. iterations==1) .and. mastertask) then
+ if ((stopalarmison .or. alarmIsOn .or. iterations==1) .and. maintask) then
! We need to get the next time for display
call ESMF_ClockGetNextTime(clock, nextTime=nexttime, rc=rc)
if (med_utils_ChkErr(rc,__LINE__,u_FILE_u)) return
diff --git a/mediator/med_phases_restart_mod.F90 b/mediator/med_phases_restart_mod.F90
index 0331e1cb7..6bf5f3466 100644
--- a/mediator/med_phases_restart_mod.F90
+++ b/mediator/med_phases_restart_mod.F90
@@ -7,7 +7,7 @@ module med_phases_restart_mod
use med_kind_mod , only : CX=>SHR_KIND_CX, CS=>SHR_KIND_CS, CL=>SHR_KIND_CL, R8=>SHR_KIND_R8
use med_constants_mod , only : dbug_flag => med_constants_dbug_flag
use med_utils_mod , only : chkerr => med_utils_ChkErr
- use med_internalstate_mod , only : mastertask, logunit, InternalState
+ use med_internalstate_mod , only : maintask, logunit, InternalState
use med_internalstate_mod , only : ncomps, compname, compocn, complnd, compwav
use perf_mod , only : t_startf, t_stopf
use med_phases_prep_glc_mod , only : FBlndAccum2glc_l, lndAccum2glc_cnt
@@ -106,7 +106,7 @@ subroutine med_phases_restart_alarm_init(gcomp, rc)
end if
! Write mediator diagnostic output
- if (mastertask) then
+ if (maintask) then
write(logunit,*)
write(logunit,'(a,2x,i8)') trim(subname)//" restart clock timestep = ",timestep_length
write(logunit,'(a,2x,i8)') trim(subname)//" set restart alarm with option "//&
@@ -262,7 +262,7 @@ subroutine med_phases_restart_write(gcomp, rc)
if (dbug_flag > 1) then
call ESMF_LogWrite(trim(subname)//": nexttime = "//trim(nexttimestr), ESMF_LOGMSG_INFO)
endif
- if (mastertask) then
+ if (maintask) then
call ESMF_ClockPrint(clock, options="currTime", &
preString="-------->"//trim(subname)//" mediating for: ", unit=cvalue, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
@@ -298,7 +298,7 @@ subroutine med_phases_restart_write(gcomp, rc)
write(restart_file,"(6a)") trim(restart_dir)//trim(case_name),'.cpl', trim(cpl_inst_tag),'.r.',&
trim(nexttimestr),'.nc'
- if (mastertask) then
+ if (maintask) then
restart_pfile = "rpointer.cpl"//trim(cpl_inst_tag)
call ESMF_LogWrite(trim(subname)//" write rpointer file = "//trim(restart_pfile), ESMF_LOGMSG_INFO)
open(newunit=unitn, file=restart_pfile, form='FORMATTED')
@@ -532,14 +532,14 @@ subroutine med_phases_restart_read(gcomp, rc)
if (dbug_flag > 1) then
call ESMF_LogWrite(trim(subname)//": currtime = "//trim(currtimestr), ESMF_LOGMSG_INFO)
endif
- if (mastertask) then
+ if (maintask) then
call ESMF_ClockPrint(clock, options="currTime", preString="-------->"//trim(subname)//" mediating for: ", rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
endif
! Get the restart file name from the pointer file
restart_pfile = "rpointer.cpl"//trim(cpl_inst_tag)
- if (mastertask) then
+ if (maintask) then
call ESMF_LogWrite(trim(subname)//" read rpointer file = "//trim(restart_pfile), ESMF_LOGMSG_INFO)
open(newunit=unitn, file=restart_pfile, form='FORMATTED', status='old', iostat=ierr)
if (ierr < 0) then
diff --git a/mediator/med_time_mod.F90 b/mediator/med_time_mod.F90
index 93eb53469..8a05c3671 100644
--- a/mediator/med_time_mod.F90
+++ b/mediator/med_time_mod.F90
@@ -17,7 +17,7 @@ module med_time_mod
use ESMF , only : operator(<=), operator(>), operator(==)
use med_constants_mod , only : dbug_flag => med_constants_dbug_flag
use med_utils_mod , only : chkerr => med_utils_ChkErr
- use med_internalstate_mod, only : mastertask, logunit
+ use med_internalstate_mod, only : maintask, logunit
implicit none
private ! default private
@@ -254,7 +254,7 @@ subroutine med_time_alarmInit( clock, alarm, option, &
enddo
endif
- if (mastertask) then
+ if (maintask) then
write(logunit,*)
write(logunit,'(a)') trim(subname) //' creating alarm '// trim(lalarmname)
end if
diff --git a/mediator/med_utils_mod.F90 b/mediator/med_utils_mod.F90
index 7017180c2..91286d651 100644
--- a/mediator/med_utils_mod.F90
+++ b/mediator/med_utils_mod.F90
@@ -17,14 +17,14 @@ module med_utils_mod
contains
!===============================================================================
- subroutine med_memcheck(string, level, mastertask)
+ subroutine med_memcheck(string, level, maintask)
character(len=*), intent(in) :: string
integer, intent(in) :: level
- logical, intent(in) :: mastertask
+ logical, intent(in) :: maintask
#ifdef CESMCOUPLED
integer :: ierr
integer, external :: GPTLprint_memusage
- if((mastertask .and. memdebug_level > level) .or. memdebug_level > level+1) then
+ if((maintask .and. memdebug_level > level) .or. memdebug_level > level+1) then
ierr = GPTLprint_memusage(string)
endif
#endif
diff --git a/ufs/flux_atmocn_ccpp_mod.F90 b/ufs/flux_atmocn_ccpp_mod.F90
index 9dafda8eb..84f1652bf 100644
--- a/ufs/flux_atmocn_ccpp_mod.F90
+++ b/ufs/flux_atmocn_ccpp_mod.F90
@@ -25,7 +25,7 @@ module flux_atmocn_ccpp_mod
use med_kind_mod, only : CL=>SHR_KIND_CL
use med_utils_mod, only : chkerr => med_utils_chkerr
use med_internalstate_mod, only : aoflux_ccpp_suite, logunit
- use med_internalstate_mod, only : InternalState, mastertask
+ use med_internalstate_mod, only : InternalState, maintask
use med_constants_mod, only : dbug_flag => med_constants_dbug_flag
implicit none
@@ -52,7 +52,7 @@ module flux_atmocn_ccpp_mod
contains
!===============================================================================
- subroutine flux_atmOcn_ccpp(gcomp, mastertask, logunit, nMax, mask, psfc, pbot, &
+ subroutine flux_atmOcn_ccpp(gcomp, maintask, logunit, nMax, mask, psfc, pbot, &
tbot, qbot, zbot, garea, ubot, usfc, vbot, vsfc, rbot, ts, lwdn, sen, lat, &
lwup, evp, taux, tauy, tref, qref, duu10n, ustar_sv, re_sv, ssq_sv, missval)
@@ -60,7 +60,7 @@ subroutine flux_atmOcn_ccpp(gcomp, mastertask, logunit, nMax, mask, psfc, pbot,
!--- input arguments --------------------------------
type(ESMF_GridComp), intent(in) :: gcomp ! gridded component
- logical , intent(in) :: mastertask ! master task
+ logical , intent(in) :: maintask ! main task
integer , intent(in) :: logunit ! log file unit number
integer , intent(in) :: nMax ! data vector length
integer , intent(in) :: mask (nMax) ! ocn domain mask
@@ -301,7 +301,7 @@ subroutine flux_atmOcn_ccpp(gcomp, mastertask, logunit, nMax, mask, psfc, pbot,
if (trim(cvalue) .eq. '.true.' .or. trim(cvalue) .eq. 'true') ini_read = .true.
end if
- if (mastertask) then
+ if (maintask) then
write(logunit,*) '========================================================'
write(logunit,'(a,f5.2)') trim(subname)//' ccpp_phy_semis_water = ', semis_water
write(logunit,'(a,l)') trim(subname)//' ccpp_phy_lseaspray = ', physics%model%lseaspray
@@ -361,7 +361,7 @@ subroutine flux_atmOcn_ccpp(gcomp, mastertask, logunit, nMax, mask, psfc, pbot,
! set counter
physics%model%kdt = ((currTime-StartTime)/timeStep)+1
- if (mastertask .and. dbug_flag > 5) then
+ if (maintask .and. dbug_flag > 5) then
write(logunit,'(a,i5)') 'kdt = ', physics%model%kdt
end if
diff --git a/ufs/ufs_io_mod.F90 b/ufs/ufs_io_mod.F90
index ee85fa183..8564be8e5 100644
--- a/ufs/ufs_io_mod.F90
+++ b/ufs/ufs_io_mod.F90
@@ -39,7 +39,7 @@ module ufs_io_mod
use med_kind_mod, only : r8=>SHR_KIND_R8, cs=>SHR_KIND_CS, cl=>SHR_KIND_CL
use med_utils_mod, only : chkerr => med_utils_chkerr
use med_constants_mod, only : dbug_flag => med_constants_dbug_flag
- use med_internalstate_mod, only : InternalState, mastertask, logunit
+ use med_internalstate_mod, only : InternalState, maintask, logunit
use med_internalstate_mod, only : compatm, compocn, mapconsf
use med_io_mod, only : med_io_date2yyyymmdd, med_io_sec2hms, med_io_ymd2date
use ufs_const_mod, only : shr_const_cday
@@ -173,7 +173,7 @@ subroutine read_initial(gcomp, ini_file, mosaic_file, input_dir, layout, rc)
! return pointer and fill variable
call ESMF_FieldGet(field_dst, localDe=0, farrayPtr=ptr, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit,'(a)') 'Reading: '//trim(flds(n))
+ if (maintask) write(logunit,'(a)') 'Reading: '//trim(flds(n))
if (trim(flds(n)) == 'zorl' ) physics%sfcprop%zorl(:) = ptr(:)
if (trim(flds(n)) == 'uustar') physics%sfcprop%uustar(:)= ptr(:)
nullify(ptr)
@@ -246,7 +246,7 @@ subroutine read_restart(gcomp, rst_file, rc)
! Now read in the restart file
!----------------------
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') 'Reading CCPP restart file: '//trim(rst_file)
end if
@@ -289,7 +289,7 @@ subroutine read_restart(gcomp, rst_file, rc)
call FB_getfldptr(FBin, trim(flds(n)), ptr, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) write(logunit,'(a)') 'Reading: '//trim(flds(n))
+ if (maintask) write(logunit,'(a)') 'Reading: '//trim(flds(n))
if (trim(flds(n)) == 'zorl' ) physics%sfcprop%zorl(:) = ptr(:)
if (trim(flds(n)) == 'uustar') physics%sfcprop%uustar(:)= ptr(:)
if (trim(flds(n)) == 'qss' ) physics%sfcprop%qss(:) = ptr(:)
@@ -873,7 +873,7 @@ subroutine write_restart(gcomp, restart_freq, rc)
call ESMF_FieldBundleWrite(FBout, trim(rst_file), overwrite=.true., rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
- if (mastertask) then
+ if (maintask) then
write(logunit,'(a)') 'CCPP restart file is closed: '//trim(rst_file)
end if