Skip to content

Commit

Permalink
addressed issues in PR
Browse files Browse the repository at this point in the history
  • Loading branch information
mvertens committed Oct 25, 2023
1 parent f2101a8 commit d5571b3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 13 additions & 1 deletion model/src/wav_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
! local variables
character(len=CL) :: logmsg
logical :: isPresent, isSet
logical :: aux_flds_to_cmeps
character(len=CL) :: cvalue
character(len=*), parameter :: subname=trim(modName)//':(InitializeAdvertise) '
!-------------------------------------------------------------------------------
Expand Down Expand Up @@ -369,7 +370,18 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
write(logmsg,'(A,l)') trim(subname)//': Wave wav_coupling_to_cice setting is ',wav_coupling_to_cice
call ESMF_LogWrite(trim(logmsg), ESMF_LOGMSG_INFO)

call advertise_fields(importState, exportState, flds_scalar_name, rc)
! Determine if auxiliary fields will be sent to cmeps for use in mediator history output
aux_flds_to_cmeps = .false.
call NUOPC_CompAttributeGet(gcomp, name='histaux_wav2med_file1_enabled', value=cvalue, isPresent=isPresent, &
isSet=isSet, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
if (isPresent .and. isSet) then
read(cvalue,*) aux_flds_to_cmeps
end if
write(logmsg,'(A,l)') trim(subname)//': Wave aux_flds_to_cmeps is ',aux_flds_to_cmeps
call ESMF_LogWrite(trim(logmsg), ESMF_LOGMSG_INFO)

call advertise_fields(importState, exportState, flds_scalar_name, aux_flds_to_cmeps, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

call ESMF_LogWrite(trim(subname)//' done', ESMF_LOGMSG_INFO)
Expand Down
4 changes: 2 additions & 2 deletions model/src/wav_import_export.F90
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,17 @@ module wav_import_export
!!
!> @author [email protected], [email protected]
!> @date 01-05-2022
subroutine advertise_fields(importState, ExportState, flds_scalar_name, rc)
subroutine advertise_fields(importState, ExportState, flds_scalar_name, aux_flds_to_cmeps, rc)
! input/output variables
type(ESMF_State) :: importState
type(ESMF_State) :: exportState
character(len=*) , intent(in) :: flds_scalar_name
logical , intent(in) :: aux_flds_to_cmeps
integer , intent(out) :: rc

! local variables
integer :: n, num
character(len=2) :: fvalue
logical :: aux_flds_to_cmeps = .true.
character(len=*), parameter :: subname='(wav_import_export:advertise_fields)'
!-------------------------------------------------------------------------------

Expand Down

0 comments on commit d5571b3

Please sign in to comment.