Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CMEPS Issues Fixed (include github issue #):
Are changes expected to change answers?
- [ ] bit for bit
- [ ] different at roundoff level
- [ ] more substantial
- [ ] more substantial

Any User Interface Changes (namelist or namelist defaults changes)?
- [ ] Yes
Expand Down Expand Up @@ -42,7 +42,7 @@ Testing performed if application target is UFS-HAFS:
Hashes used for testing:
- [ ] CESM:
- repository to check out: https://github.com/ESCOMP/CESM.git
- branch: nuopc_dev
- branch:
- hash:
- [ ] UFS-coupled, then umbrella repostiory to check out and associated hash:
- repository to check out:
Expand Down
17 changes: 15 additions & 2 deletions mediator/med.F90
Original file line number Diff line number Diff line change
Expand Up @@ -556,9 +556,9 @@ 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
use med_internalstate_mod, only : mastertask, logunit, diagunit
use esmFlds, only : dststatus_print

type(ESMF_GridComp) :: gcomp
type(ESMF_State) :: importState, exportState
type(ESMF_Clock) :: clock
Expand All @@ -568,10 +568,13 @@ subroutine InitializeP0(gcomp, importState, exportState, clock, rc)
type(ESMF_VM) :: vm
character(len=CL) :: cvalue
integer :: localPet
integer :: i
logical :: isPresent, isSet
character(len=CX) :: msgString
character(len=CX) :: diro
character(len=CX) :: logfile
character(len=CX) :: diagfile
character(len=CX) :: do_budgets
character(len=*),parameter :: subname=' (module_MED:InitializeP0) '
!-----------------------------------------------------------

Expand All @@ -597,6 +600,16 @@ subroutine InitializeP0(gcomp, importState, exportState, clock, rc)
logfile = 'mediator.log'
end if
open(newunit=logunit, file=trim(diro)//"/"//trim(logfile))

call NUOPC_CompAttributeGet(gcomp, name="do_budgets", value=cvalue, isPresent=isPresent, isSet=isSet, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
if (isPresent .and. isSet) then
if (trim(cvalue) .eq. '.true.') then
i = index(logfile, '.log')
diagfile = "diags"//logfile(i:)
open(newunit=diagunit, file=trim(diro)//"/"//trim(diagfile))
endif
end if
else
logUnit = 6
endif
Expand Down
Loading