Skip to content

Commit

Permalink
Merge pull request ESCOMP#152 from jedwards4b/shr_pio_update
Browse files Browse the repository at this point in the history
add call to pio_init
  • Loading branch information
jedwards4b authored Apr 15, 2022
2 parents a10a768 + 842cb3d commit d1ccf82
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions dshr/dshr_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ end subroutine dshr_model_initphase
!===============================================================================
subroutine dshr_init(gcomp, compname, sdat, mpicom, my_task, inst_index, inst_suffix, &
flds_scalar_name, flds_scalar_num, flds_scalar_index_nx, flds_scalar_index_ny, logunit, rc)

#ifdef CESMCOUPLED
use nuopc_shr_methods, only : set_component_logging
#endif
! input/output variables
type(ESMF_GridComp) :: gcomp
character(len=*) , intent(in) :: compname !e.g. ATM, OCN, ...
Expand All @@ -126,6 +128,7 @@ subroutine dshr_init(gcomp, compname, sdat, mpicom, my_task, inst_index, inst_su
! local variables
type(ESMF_VM) :: vm
logical :: isPresent, isSet
integer :: slogunit
character(len=CX) :: cvalue
character(len=CX) :: logmsg
character(len=CX) :: diro
Expand Down Expand Up @@ -191,15 +194,18 @@ subroutine dshr_init(gcomp, compname, sdat, mpicom, my_task, inst_index, inst_su
else
logfile = "d"//shr_string_toLower(compname)//".log"
endif

#ifdef CESMCOUPLED
call set_component_logging(gcomp, my_task == main_task, logunit, slogunit, rc=rc)
#else
if (my_task == main_task) then
call ESMF_LogWrite(trim(subname)//' : output logging is written to '//trim(diro)//"/"//trim(logfile), ESMF_LOGMSG_INFO)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
open(newunit=logunit, file=trim(diro)//"/"//trim(logfile))

else
logUnit = 6
endif

#endif
! set component instance and suffix
call NUOPC_CompAttributeGet(gcomp, name="inst_suffix", isPresent=isPresent, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
Expand Down

0 comments on commit d1ccf82

Please sign in to comment.