Skip to content

Commit

Permalink
updates to have data model avect info print correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariana Vertenstein committed Apr 19, 2018
1 parent bbd6efe commit f72f219
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 96 deletions.
16 changes: 10 additions & 6 deletions src/components/data_comps/datm/nuopc/datm_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,11 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
!--------------------------------

if (dbug > 1) then
call mct_aVect_info(2, d2x, istr='initial diag'//':AV', pe=localPet)
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
if (my_task == master_task) then
call mct_aVect_info(2, d2x, istr='initial diag'//':AV')
end if
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
endif

#ifdef USE_ESMF_METADATA
Expand Down Expand Up @@ -650,9 +652,11 @@ subroutine ModelAdvance(gcomp, rc)
!--------------------------------

if (dbug > 1) then
call mct_aVect_info(2, d2x, istr='run diag'//':AV', pe=localPet)
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
if (my_task == master_task) then
call mct_aVect_info(2, d2x, istr='run diag'//':AV', pe=localPet)
end if
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
endif

if (my_task == master_task) then
Expand Down
16 changes: 10 additions & 6 deletions src/components/data_comps/dice/nuopc/dice_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,11 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
!--------------------------------

if (dbug > 1) then
call mct_aVect_info(2, d2x, istr=subname//':AV', pe=localPet)
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
if (my_task == master_task) then
call mct_aVect_info(2, d2x, istr=subname//':AV')
end if
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
endif

#ifdef USE_ESMF_METADATA
Expand Down Expand Up @@ -620,9 +622,11 @@ subroutine ModelAdvance(gcomp, rc)
!--------------------------------

if (dbug > 1) then
call mct_aVect_info(2, d2x, istr=subname//':AV', pe=localPet)
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
if (my_task == master_task) then
call mct_aVect_info(2, d2x, istr=subname//':AV', pe=localPet)
end if
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
endif

if (my_task == master_task) then
Expand Down
16 changes: 10 additions & 6 deletions src/components/data_comps/dlnd/nuopc/dlnd_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,11 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
!--------------------------------

if (dbug > 1) then
call mct_aVect_info(2, d2x, istr='initial diag'//':AV', pe=localPet)
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
if (my_task == master_task) then
call mct_aVect_info(2, d2x, istr='initial diag'//':AV')
end if
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
endif

#ifdef USE_ESMF_METADATA
Expand Down Expand Up @@ -562,9 +564,11 @@ subroutine ModelAdvance(gcomp, rc)
!--------------------------------

if (dbug > 1) then
call mct_aVect_info(2, d2x, istr='run diag'//':AV', pe=localPet)
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
if (my_task == master_task) then
call mct_aVect_info(2, d2x, istr='run diag'//':AV')
end if
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
endif

if (master_task) then
Expand Down
16 changes: 10 additions & 6 deletions src/components/data_comps/docn/nuopc/docn_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,11 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
!--------------------------------

if (dbug > 1) then
call mct_aVect_info(2, d2x, istr=subname//':AV', pe=localPet)
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
if (my_task == master_task) then
call mct_aVect_info(2, d2x, istr=subname//':AV')
end if
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
endif

#ifdef USE_ESMF_METADATA
Expand Down Expand Up @@ -611,9 +613,11 @@ subroutine ModelAdvance(gcomp, rc)
!--------------------------------

if (dbug > 1) then
call mct_aVect_info(2, d2x, istr=subname//':AV', pe=localPet)
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
if (my_task == master_task) then
call mct_aVect_info(2, d2x, istr=subname//':AV')
end if
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
endif

if (my_task == master_task) then
Expand Down
16 changes: 10 additions & 6 deletions src/components/data_comps/drof/nuopc/drof_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,11 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
!--------------------------------

if (dbug > 1) then
call mct_aVect_info(2, d2x, istr=subname//':AV', pe=localPet)
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
if (my_task == master_task) then
call mct_aVect_info(2, d2x, istr=subname//':AV')
end if
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
endif

#ifdef USE_ESMF_METADATA
Expand Down Expand Up @@ -594,9 +596,11 @@ subroutine ModelAdvance(gcomp, rc)
!--------------------------------

if (dbug > 1) then
call mct_aVect_info(2, d2x, istr=subname//':AV', pe=localPet)
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
if (my_task == master_task) then
call mct_aVect_info(2, d2x, istr=subname//':AV', pe=localPet)
end if
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
endif

if (my_task == master_task) then
Expand Down
16 changes: 10 additions & 6 deletions src/components/data_comps/dwav/nuopc/dwav_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,11 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
!--------------------------------

if (dbug > 1) then
call mct_aVect_info(2, d2x, istr='initial diag'//':AV', pe=localPet)
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
if (my_task == master_task) then
call mct_aVect_info(2, d2x, istr='initial diag'//':AV')
end if
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
endif

#ifdef USE_ESMF_METADATA
Expand Down Expand Up @@ -560,9 +562,11 @@ subroutine ModelAdvance(gcomp, rc)
!--------------------------------

if (dbug > 1) then
call mct_aVect_info(2, d2x, istr='initial diag'//':AV', pe=localPet)
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
if (my_task == master_task) then
call mct_aVect_info(2, d2x, istr='initial diag'//':AV')
end if
call shr_nuopc_methods_State_diagnose(exportState,subname//':ES',rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
endif

if (master_task) then
Expand Down
14 changes: 10 additions & 4 deletions src/drivers/nuopc/cime_driver/esm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -760,11 +760,11 @@ subroutine SetModelServices(driver, rc)
write(logunit,*) trim(subname)//":wav_present="//trim(wav_present)
write(logunit,*) trim(subname)//":glc_present="//trim(glc_present)
write(logunit,*) trim(subname)//":med_present="//trim(med_present)
end if

! Print out colon delimited string of fields from mediator log file
call esmFlds_Concat(child, logunit, rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
! Print out colon delimited string of fields from mediator log file
call esmFlds_Concat(logunit, rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
end if

else

Expand Down Expand Up @@ -841,6 +841,12 @@ subroutine SetRunSequence(driver, rc)
call NUOPC_DriverIngestRunSequence(driver, runSeqFF, autoAddConnectors=.true., rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return

call NUOPC_DriverPrint(driver, orderflag=.true.)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
return ! bail out

if (mastertask) then
call NUOPC_FreeFormatPrint(runSeqFF, rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return
Expand Down
88 changes: 32 additions & 56 deletions src/drivers/nuopc/cime_flds/esmFlds.F90
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ subroutine esmFlds_Init(gcomp, rc)
character(len=*), parameter :: subname='(shr_nuopc_fldList_Init)'
!--------------------------------------

rc = ESMF_SUCCESS

call ESMF_GridCompGet(gcomp, vm=vm, rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return

Expand Down Expand Up @@ -2528,91 +2530,65 @@ end subroutine esmFlds_Init

!================================================================================

subroutine esmFlds_Concat(gcomp, logunit, rc)
subroutine esmFlds_Concat(logunit, rc)

!----------------------------------------------------------------------------
! creation of colon delimited field list
!----------------------------------------------------------------------------

! input/output variables
type(ESMF_GridComp) :: gcomp
integer, intent(in) :: logunit
integer, intent(inout) :: rc

! local variables
type(ESMF_VM) :: vm
integer :: localPet
logical :: mastertask
character(CXX) :: concatFr, concatTo
character(len=*), parameter :: subname='(esmFlds_Concat)'
!--------------------------------------

call ESMF_GridCompGet(gcomp, vm=vm, rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return

call ESMF_VMGet(vm, localPet=localPet, rc=rc)
if (shr_nuopc_methods_ChkErr(rc,__LINE__,u_FILE_u)) return

mastertask = .false.
if (localPet == 0) mastertask=.true.
rc = ESMF_SUCCESS

! Determine character list of fields
concatFr = ''; concatTo = ''
call shr_nuopc_fldList_Concat(fldListFr(compatm), fldListTo(compatm), concatFr, concatTo, flds_scalar_name)
if (mastertask) then
write(logunit, "(A)") subname//': flds_a2x = ',trim(concatFr)
write(logunit, "(A)") '-------------------------------------------------'
write(logunit, "(A)") subname//': flds_x2a = ',trim(concatTo)
write(logunit, "(A)") '-------------------------------------------------'
end if
write(logunit, "(A)") subname//': flds_a2x = ',trim(concatFr)
write(logunit, "(A)") '-------------------------------------------------'
write(logunit, "(A)") subname//': flds_x2a = ',trim(concatTo)
write(logunit, "(A)") '-------------------------------------------------'
concatFr = ''; concatTo = ''
call shr_nuopc_fldList_Concat(fldListFr(complnd), fldListTo(complnd), concatFr, concatTo, flds_scalar_name)
if (mastertask) then
write(logunit, "(A)") subname//': flds_l2x = ',trim(concatFr)
write(logunit, "(A)") '-------------------------------------------------'
write(logunit, "(A)") subname//': flds_x2l = ',trim(concatTo)
write(logunit, "(A)") '-------------------------------------------------'
end if
write(logunit, "(A)") subname//': flds_l2x = ',trim(concatFr)
write(logunit, "(A)") '-------------------------------------------------'
write(logunit, "(A)") subname//': flds_x2l = ',trim(concatTo)
write(logunit, "(A)") '-------------------------------------------------'
concatFr = ''; concatTo = ''
call shr_nuopc_fldList_Concat(fldListFr(compice), fldListTo(compice), concatFr, concatTo, flds_scalar_name)
if (mastertask) then
write(logunit, "(A)") subname//': flds_i2x = ',trim(concatFr)
write(logunit, "(A)") '-------------------------------------------------'
write(logunit, "(A)") subname//': flds_x2i = ',trim(concatTo)
write(logunit, "(A)") '-------------------------------------------------'
end if
write(logunit, "(A)") subname//': flds_i2x = ',trim(concatFr)
write(logunit, "(A)") '-------------------------------------------------'
write(logunit, "(A)") subname//': flds_x2i = ',trim(concatTo)
write(logunit, "(A)") '-------------------------------------------------'
concatFr = ''; concatTo = ''
call shr_nuopc_fldList_Concat(fldListFr(compocn), fldListTo(compocn), concatFr, concatTo, flds_scalar_name)
if (mastertask) then
write(logunit, "(A)") subname//': flds_o2x = ',trim(concatFr)
write(logunit, "(A)") '-------------------------------------------------'
write(logunit, "(A)") subname//': flds_x2o = ',trim(concatTo)
write(logunit, "(A)") '-------------------------------------------------'
end if
write(logunit, "(A)") subname//': flds_o2x = ',trim(concatFr)
write(logunit, "(A)") '-------------------------------------------------'
write(logunit, "(A)") subname//': flds_x2o = ',trim(concatTo)
write(logunit, "(A)") '-------------------------------------------------'
concatFr = ''; concatTo = ''
call shr_nuopc_fldList_Concat(fldListFr(compglc), fldListTo(compglc), concatFr, concatTo, flds_scalar_name)
if (mastertask) then
write(logunit, "(A)") subname//': flds_g2x = ',trim(concatFr)
write(logunit, "(A)") '-------------------------------------------------'
write(logunit, "(A)") subname//': flds_x2g = ',trim(concatTo)
write(logunit, "(A)") '-------------------------------------------------'
end if
write(logunit, "(A)") subname//': flds_g2x = ',trim(concatFr)
write(logunit, "(A)") '-------------------------------------------------'
write(logunit, "(A)") subname//': flds_x2g = ',trim(concatTo)
write(logunit, "(A)") '-------------------------------------------------'
concatFr = ''; concatTo = ''
call shr_nuopc_fldList_Concat(fldListFr(comprof), fldListTo(comprof), concatFr, concatTo, flds_scalar_name)
if (mastertask) then
write(logunit, "(A)") subname//': flds_r2x = ',trim(concatFr)
write(logunit, "(A)") '-------------------------------------------------'
write(logunit, "(A)") subname//': flds_r2x = ',trim(concatTo)
write(logunit, "(A)") '-------------------------------------------------'
end if
write(logunit, "(A)") subname//': flds_r2x = ',trim(concatFr)
write(logunit, "(A)") '-------------------------------------------------'
write(logunit, "(A)") subname//': flds_r2x = ',trim(concatTo)
write(logunit, "(A)") '-------------------------------------------------'
concatFr = ''; concatTo = ''
call shr_nuopc_fldList_Concat(fldListFr(compwav), fldListTo(compwav), concatFr, concatTo, flds_scalar_name)
if (mastertask) then
write(logunit, "(A)") subname//': flds_w2x = ',trim(concatFr)
write(logunit, "(A)") '-------------------------------------------------'
write(logunit, "(A)") subname//': flds_x2w = ',trim(concatTo)
write(logunit, "(A)") '-------------------------------------------------'
end if
write(logunit, "(A)") subname//': flds_w2x = ',trim(concatFr)
write(logunit, "(A)") '-------------------------------------------------'
write(logunit, "(A)") subname//': flds_x2w = ',trim(concatTo)
write(logunit, "(A)") '-------------------------------------------------'

end subroutine esmFlds_Concat

Expand Down

0 comments on commit f72f219

Please sign in to comment.