From f43edc81c7f95355f4405cda7ae1813497ddab47 Mon Sep 17 00:00:00 2001 From: Jun Wang Date: Tue, 28 Jul 2020 01:27:25 +0000 Subject: [PATCH 1/6] set up dycore_data at atmos_init --- atmos_model.F90 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/atmos_model.F90 b/atmos_model.F90 index 8637ed838..1b99c3a49 100644 --- a/atmos_model.F90 +++ b/atmos_model.F90 @@ -793,6 +793,17 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step) fv3Clock = mpp_clock_id( 'FV3 Dycore ', flags=clock_flag_default, grain=CLOCK_COMPONENT ) endif +!--- get bottom layer data from dynamical core for coupling + print *,'bf set up dycore fields' + call atmosphere_get_bottom_layer (Atm_block, DYCORE_Data) + print *,'aft set up dycore fields' + + !if in coupled mode, set up coupled fields + if (IPD_Control%cplflx .or. IPD_Control%cplwav) then + if (mpp_pe() == mpp_root_pe()) print *,'COUPLING: IPD layer' + call setup_exportdata(rc) + endif + #ifdef CCPP ! Set flag for first time step of time integration IPD_Control%first_time_step = .true. @@ -2039,7 +2050,7 @@ subroutine setup_exportdata (rc) integer :: j, i, ix, nb, isc, iec, jsc, jec, idx real(IPD_kind_phys) :: rtime, rtimek ! -! if (mpp_pe() == mpp_root_pe()) print *,'enter setup_exportdata' + if (mpp_pe() == mpp_root_pe()) print *,'enter setup_exportdata' isc = IPD_control%isc iec = IPD_control%isc+IPD_control%nx-1 @@ -2602,6 +2613,7 @@ subroutine setup_exportdata (rc) ! bottom layer temperature (t) idx = queryfieldlist(exportFieldsList,'inst_temp_height_lowest') + if (mpp_pe() == mpp_root_pe()) print *,'cpl, in get inst_temp_height_lowest' if (idx > 0 ) then !$omp parallel do default(shared) private(i,j,nb,ix) do j=jsc,jec From f6fec0d9cab133a317215332dc3024d3ad357941 Mon Sep 17 00:00:00 2001 From: "Jun.Wang" Date: Wed, 29 Jul 2020 02:43:06 +0000 Subject: [PATCH 2/6] fix syntax error in atmos_model.F90 --- atmos_model.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atmos_model.F90 b/atmos_model.F90 index 1b99c3a49..e6abcd394 100644 --- a/atmos_model.F90 +++ b/atmos_model.F90 @@ -801,7 +801,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step) !if in coupled mode, set up coupled fields if (IPD_Control%cplflx .or. IPD_Control%cplwav) then if (mpp_pe() == mpp_root_pe()) print *,'COUPLING: IPD layer' - call setup_exportdata(rc) + call setup_exportdata(ierr) endif #ifdef CCPP @@ -2763,7 +2763,7 @@ subroutine setup_exportdata (rc) IPD_Data(nb)%coupling%snow_cpl(ix) = zero enddo enddo - if (mpp_pe() == mpp_root_pe()) print *,'zeroing coupling fields at kdt= ',IPD_Control%kdt + if (mpp_pe() == mpp_root_pe()) print *,'zeroing coupling accumulated fields at kdt= ',IPD_Control%kdt endif !cplflx ! if (mpp_pe() == mpp_root_pe()) print *,'end of setup_exportdata' From e9acd383ed9192bcd517375104b1aaca19bb0696 Mon Sep 17 00:00:00 2001 From: "Jun.Wang" Date: Wed, 29 Jul 2020 16:28:16 +0000 Subject: [PATCH 3/6] put in initial fields in fv3 export fields at init --- atmos_model.F90 | 1 + cpl/module_cap_cpl.F90 | 2 ++ cpl/module_cplfields.F90 | 4 +++- fv3_cap.F90 | 5 ++++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/atmos_model.F90 b/atmos_model.F90 index e6abcd394..4ae51fac3 100644 --- a/atmos_model.F90 +++ b/atmos_model.F90 @@ -2627,6 +2627,7 @@ subroutine setup_exportdata (rc) endif enddo enddo + if (mpp_pe() == mpp_root_pe()) print *,'cpl, in get inst_temp_height_lowest=',exportData(isc,jsc,idx) endif ! bottom layer specific humidity (q) diff --git a/cpl/module_cap_cpl.F90 b/cpl/module_cap_cpl.F90 index 82980612b..5483e71ff 100644 --- a/cpl/module_cap_cpl.F90 +++ b/cpl/module_cap_cpl.F90 @@ -193,9 +193,11 @@ subroutine realizeConnectedCplFields(state, grid, end select call NUOPC_Realize(state, field=field, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! -- zero out field call ESMF_FieldFill(field, dataFillScheme="const", const1=0._ESMF_KIND_R8, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! -- save field fieldList(item) = field call ESMF_LogWrite('realizeConnectedCplFields '//trim(state_tag)//' Field '//trim(fieldNames(item)) & diff --git a/cpl/module_cplfields.F90 b/cpl/module_cplfields.F90 index 5e62755f9..c7263f9fd 100644 --- a/cpl/module_cplfields.F90 +++ b/cpl/module_cplfields.F90 @@ -201,6 +201,7 @@ subroutine fillExportFields(data_a2oi, rc) integer :: n,dimCount logical :: isCreated type(ESMF_TypeKind_Flag) :: datatype + character(len=ESMF_MAXSTR) :: fieldName real(kind=ESMF_KIND_R4), dimension(:,:), pointer :: datar42d real(kind=ESMF_KIND_R8), dimension(:,:), pointer :: datar82d @@ -212,8 +213,9 @@ subroutine fillExportFields(data_a2oi, rc) if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__, rcToReturn=rc)) return if (isCreated) then ! set data - call ESMF_FieldGet(exportFields(n), dimCount=dimCount, typekind=datatype, rc=localrc) + call ESMF_FieldGet(exportFields(n), name=fieldname, dimCount=dimCount, typekind=datatype, rc=localrc) if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__, rcToReturn=rc)) return + print *,'in fillExportFields, field created n=',n,size(exportFields),'name=', trim(fieldname) if ( datatype == ESMF_TYPEKIND_R8) then if ( dimCount == 2) then call ESMF_FieldGet(exportFields(n),farrayPtr=datar82d,localDE=0, rc=localrc) diff --git a/fv3_cap.F90 b/fv3_cap.F90 index d0d55b47a..36ec41e3f 100644 --- a/fv3_cap.F90 +++ b/fv3_cap.F90 @@ -60,7 +60,8 @@ module fv3gfs_cap_mod nImportFields, importFields, & importFieldsList, importFieldTypes, & importFieldShare, importFieldsValid, & - queryFieldList + queryFieldList, fillExportFields, & + exportData use module_cap_cpl, only: realizeConnectedCplFields, & clock_cplIntval, Dump_cplFields @@ -927,6 +928,8 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc) importFields, rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return end if +!jw + call fillExportFields(exportData) endif end subroutine InitializeRealize From 015d9093c3306d95697f984f6e36bd87155de84c Mon Sep 17 00:00:00 2001 From: Jun Wang Date: Thu, 3 Sep 2020 15:10:49 +0000 Subject: [PATCH 4/6] add state_diagnose from Denise Co-authored-by: Denise.Worthen --- cpl/module_cap_cpl.F90 | 121 ++++++++++++++++++++++++++++++++------- cpl/module_cplfields.F90 | 2 +- fv3_cap.F90 | 29 +++++++--- 3 files changed, 124 insertions(+), 28 deletions(-) diff --git a/cpl/module_cap_cpl.F90 b/cpl/module_cap_cpl.F90 index 5483e71ff..f5427c791 100644 --- a/cpl/module_cap_cpl.F90 +++ b/cpl/module_cap_cpl.F90 @@ -13,7 +13,7 @@ module module_cap_cpl public clock_cplIntval public realizeConnectedInternCplField public realizeConnectedCplFields - public Dump_cplFields + public diagnose_cplFields ! contains @@ -215,13 +215,14 @@ end subroutine realizeConnectedCplFields !----------------------------------------------------------------------------- - subroutine Dump_cplFields(gcomp, importState, exportstate, clock_fv3, & - statewrite_flag, state_tag, timestr) + subroutine diagnose_cplFields(gcomp, importState, exportstate, clock_fv3, & + statewrite_flag, stdiagnose_flag, state_tag, timestr) type(ESMF_GridComp), intent(in) :: gcomp type(ESMF_State) :: importState, exportstate type(ESMF_Clock),intent(in) :: clock_fv3 logical, intent(in) :: statewrite_flag + integer, intent(in) :: stdiagnose_flag character(len=*), intent(in) :: state_tag !< Import or export. character(len=*), intent(in) :: timestr !< Import or export. integer :: timeslice = 1 @@ -243,32 +244,39 @@ subroutine Dump_cplFields(gcomp, importState, exportstate, clock_fv3, & unit=nuopcMsg) ! call ESMF_LogWrite(nuopcMsg, ESMF_LOGMSG_INFO) - ! Dumping Fields out - if (statewrite_flag) then + if(trim(state_tag) .eq. 'import')then + call ESMF_GridCompGet(gcomp, importState=importState, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - if(trim(state_tag) .eq. 'import')then - call ESMF_GridCompGet(gcomp, importState=importState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - ! replace with tiled field dumps - !call ESMFPP_RegridWriteState(importState, "fv3_cap_import_", timeslice, rc=rc) - write(filename,'(a,a,a)') 'fv3_cap_import_'//trim(timestr)//'_' + if(stdiagnose_flag > 0)then + call state_diagnose(importState, ':IS', rc=rc) + end if + + ! Dump Fields out + if (statewrite_flag) then + write(filename,'(A)') 'fv3_cap_import_'//trim(timestr)//'_' call State_RWFields_tiles(importState,trim(filename), timeslice, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return end if + end if - if(trim(state_tag) .eq. 'export')then - call ESMF_GridCompGet(gcomp, exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - ! replace with tiled field dumps - !call ESMFPP_RegridWriteState(exportState, "fv3_cap_export_", timeslice, rc=rc) - write(filename,'(a,a,a)') 'fv3_cap_export_'//trim(timestr)//'_' + if(trim(state_tag) .eq. 'export')then + call ESMF_GridCompGet(gcomp, exportState=exportState, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + if(stdiagnose_flag > 0)then + call state_diagnose(exportState, ':ES', rc=rc) + end if + + ! Dump Fields out + if (statewrite_flag) then + write(filename,'(A)') 'fv3_cap_export_'//trim(timestr)//'_' call State_RWFields_tiles(exportState,trim(filename), timeslice, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return end if + end if - endif -! - end subroutine Dump_cplFields + end subroutine diagnose_cplFields !----------------------------------------------------------------------------- @@ -459,4 +467,77 @@ end subroutine State_RWFields_tiles !----------------------------------------------------------------------------- + subroutine state_diagnose(State,string, rc) + ! ---------------------------------------------- + ! Diagnose status of state + ! ---------------------------------------------- + type(ESMF_State), intent(inout) :: State + character(len=*), intent(in), optional :: string + integer, intent(out), optional :: rc + + ! local variables + integer :: i,j,n + integer :: itemCount + character(len=64) ,pointer :: itemNameList(:) + character(len=64) :: lstring + character(len=256) :: tmpstr + + type(ESMF_Field) :: lfield + type(ESMF_StateItem_Flag) :: itemType + real(ESMF_KIND_R8), pointer :: dataPtr2d(:,:) + real(ESMF_KIND_R8), pointer :: dataPtr3d(:,:,:) + integer :: lrc, dimCount + character(len=*),parameter :: subname='(FV3: state_diagnose)' + + lstring = '' + if (present(string)) then + lstring = trim(string) + endif + + call ESMF_LogWrite(subname//' called', ESMF_LOGMSG_INFO) + + call ESMF_StateGet(State, itemCount=itemCount, rc=lrc) + if (ESMF_LogFoundError(rcToCheck=lrc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + allocate(itemNameList(itemCount)) + + call ESMF_StateGet(State, itemNameList=itemNameList, rc=lrc) + if (ESMF_LogFoundError(rcToCheck=lrc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + do n = 1, itemCount + call ESMF_StateGet(State, itemName=trim(itemNameList(n)), itemType=itemType, rc=lrc) + if (ESMF_LogFoundError(rcToCheck=lrc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + if(itemType == ESMF_STATEITEM_FIELD)then + call ESMF_StateGet(State, itemName=trim(itemNameList(n)), field=lfield, rc=lrc) + if (ESMF_LogFoundError(rcToCheck=lrc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_FieldGet(lfield, dimCount=dimcount, rc=lrc) + if (ESMF_LogFoundError(rcToCheck=lrc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + if(dimcount == 2)then + call ESMF_FieldGet(lfield, farrayPtr=dataPtr2d, rc=lrc) + if (ESMF_LogFoundError(rcToCheck=lrc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + write(tmpstr,'(A,3g14.7)') trim(subname)//' '//trim(lstring)//':'//trim(itemNameList(n))//' ', & + minval(dataPtr2d),maxval(dataPtr2d),sum(dataPtr2d) + call ESMF_LogWrite(trim(tmpstr), ESMF_LOGMSG_INFO, rc=lrc) + else + call ESMF_FieldGet(lfield, farrayPtr=dataPtr3d, rc=lrc) + if (ESMF_LogFoundError(rcToCheck=lrc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + write(tmpstr,'(A,3g14.7)') trim(subname)//' '//trim(lstring)//':'//trim(itemNameList(n))//' ', & + minval(dataPtr3d),maxval(dataPtr3d),sum(dataPtr3d) + call ESMF_LogWrite(trim(tmpstr), ESMF_LOGMSG_INFO, rc=lrc) + end if + end if + enddo + deallocate(itemNameList) + + if (present(rc)) rc = lrc + call ESMF_LogWrite(subname//' exit', ESMF_LOGMSG_INFO) + + end subroutine state_diagnose + + !----------------------------------------------------------------------------- + end module module_cap_cpl diff --git a/cpl/module_cplfields.F90 b/cpl/module_cplfields.F90 index c7263f9fd..3690731ea 100644 --- a/cpl/module_cplfields.F90 +++ b/cpl/module_cplfields.F90 @@ -215,7 +215,7 @@ subroutine fillExportFields(data_a2oi, rc) ! set data call ESMF_FieldGet(exportFields(n), name=fieldname, dimCount=dimCount, typekind=datatype, rc=localrc) if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__, rcToReturn=rc)) return - print *,'in fillExportFields, field created n=',n,size(exportFields),'name=', trim(fieldname) + !print *,'in fillExportFields, field created n=',n,size(exportFields),'name=', trim(fieldname) if ( datatype == ESMF_TYPEKIND_R8) then if ( dimCount == 2) then call ESMF_FieldGet(exportFields(n),farrayPtr=datar82d,localDE=0, rc=localrc) diff --git a/fv3_cap.F90 b/fv3_cap.F90 index df4783eb1..18f445f04 100644 --- a/fv3_cap.F90 +++ b/fv3_cap.F90 @@ -63,7 +63,7 @@ module fv3gfs_cap_mod queryFieldList, fillExportFields, & exportData use module_cap_cpl, only: realizeConnectedCplFields, & - clock_cplIntval, Dump_cplFields + clock_cplIntval, diagnose_cplFields implicit none @@ -93,6 +93,7 @@ module fv3gfs_cap_mod character(len=160) :: nuopcMsg integer :: timeslice = 0 integer :: fcstmype + integer :: dbug = 0 !----------------------------------------------------------------------- @@ -189,7 +190,7 @@ subroutine InitializeP0(gcomp, importState, exportState, clock, rc) character(len=10) :: value character(240) :: msgString - + logical :: isPresent, isSet character(len=*),parameter :: subname='(fv3gfs_cap:InitializeP0)' rc = ESMF_SUCCESS @@ -212,6 +213,15 @@ subroutine InitializeP0(gcomp, importState, exportState, clock, rc) write(msgString,'(A,l6)') trim(subname)//' cplprint_flag = ',cplprint_flag call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_INFO, rc=rc) + ! Read in cap debug flag + call NUOPC_CompAttributeGet(gcomp, name='dbug_flag', value=value, isPresent=isPresent, isSet=isSet, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + if (isPresent .and. isSet) then + read(value,*) dbug + end if + write(msgString,'(A,i6)') trim(subname)//' dbug = ',dbug + call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_INFO, rc=rc) + end subroutine !----------------------------------------------------------------------------- @@ -550,6 +560,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) rsthour = CurrTime - StartTime first_kdt = nint(rsthour/timeStep) + 1 endif + ! !####################################################################### ! set up fcst grid component @@ -1045,6 +1056,7 @@ subroutine ModelAdvance(gcomp, rc) call ESMF_ClockGet(clock_fv3, currTime=currTime, timeStep=timeStep, rc=rc) call ESMF_TimeGet(currTime, timestring=import_timestr, rc=rc) call ESMF_TimeGet(currTime+timestep, timestring=export_timestr, rc=rc) + ! !----------------------------------------------------------------------------- !*** integration loop @@ -1069,8 +1081,10 @@ subroutine ModelAdvance(gcomp, rc) if ( cpl ) then ! assign import_data called during phase=1 - call Dump_cplFields(gcomp, importState, exportstate, clock_fv3, & - cplprint_flag, 'import', import_timestr) + if( dbug > 0 .or. cplprint_flag ) then + call diagnose_cplFields(gcomp, importState, exportstate, clock_fv3, & + cplprint_flag, dbug, 'import', import_timestr) + endif endif call ESMF_GridCompRun(fcstComp, exportState=fcstState, clock=clock_fv3, & @@ -1194,8 +1208,10 @@ subroutine ModelAdvance(gcomp, rc) ! !jw for coupled, check clock and dump import and export state if ( cpl ) then - call Dump_cplFields(gcomp, importState, exportstate, clock_fv3, & - cplprint_flag, 'export', export_timestr) + if( dbug > 0 .or. cplprint_flag ) then + call diagnose_cplFields(gcomp, importState, exportstate, clock_fv3, & + cplprint_flag, dbug, 'export', export_timestr) + end if endif if (mype==0) print *,'fv3_cap,end integrate,na=',na,' time=',mpi_wtime()- timeri @@ -1663,7 +1679,6 @@ subroutine atmos_model_finalize(gcomp, rc) end subroutine atmos_model_finalize - !####################################################################### ! ! From 90d5eaffd4eb9a1c1340a32f002413a7b3420ec2 Mon Sep 17 00:00:00 2001 From: "Jun.Wang" Date: Fri, 4 Sep 2020 19:01:38 +0000 Subject: [PATCH 5/6] fix state diagnose on write tasks --- fv3_cap.F90 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/fv3_cap.F90 b/fv3_cap.F90 index 18f445f04..29b7c361a 100644 --- a/fv3_cap.F90 +++ b/fv3_cap.F90 @@ -572,7 +572,11 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) ! create fcst grid component fcstpe = .false. - num_pes_fcst = petcount - write_groups * wrttasks_per_group + if( quilting ) then + num_pes_fcst = petcount - write_groups * wrttasks_per_group + else + num_pes_fcst = petcount + endif allocate(fcstPetList(num_pes_fcst)) do j=1, num_pes_fcst fcstPetList(j) = j - 1 @@ -1082,8 +1086,10 @@ subroutine ModelAdvance(gcomp, rc) if ( cpl ) then ! assign import_data called during phase=1 if( dbug > 0 .or. cplprint_flag ) then - call diagnose_cplFields(gcomp, importState, exportstate, clock_fv3, & + if( mype < num_pes_fcst ) then + call diagnose_cplFields(gcomp, importState, exportstate, clock_fv3, & cplprint_flag, dbug, 'import', import_timestr) + endif endif endif @@ -1209,8 +1215,10 @@ subroutine ModelAdvance(gcomp, rc) !jw for coupled, check clock and dump import and export state if ( cpl ) then if( dbug > 0 .or. cplprint_flag ) then - call diagnose_cplFields(gcomp, importState, exportstate, clock_fv3, & - cplprint_flag, dbug, 'export', export_timestr) + if( mype < num_pes_fcst ) then + call diagnose_cplFields(gcomp, importState, exportstate, clock_fv3, & + cplprint_flag, dbug, 'export', export_timestr) + endif end if endif From 41cb0169534cd3ec9b72fe90bc2d43316e7dd7dc Mon Sep 17 00:00:00 2001 From: "Jun.Wang" Date: Tue, 15 Sep 2020 12:32:57 +0000 Subject: [PATCH 6/6] remove print lines --- atmos_model.F90 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/atmos_model.F90 b/atmos_model.F90 index 34f4ee1ed..0499c3c56 100644 --- a/atmos_model.F90 +++ b/atmos_model.F90 @@ -744,9 +744,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step) endif !--- get bottom layer data from dynamical core for coupling - print *,'bf set up dycore fields' call atmosphere_get_bottom_layer (Atm_block, DYCORE_Data) - print *,'aft set up dycore fields' !if in coupled mode, set up coupled fields if (IPD_Control%cplflx .or. IPD_Control%cplwav) then @@ -922,8 +920,6 @@ subroutine update_atmos_model_state (Atmos) !if in coupled mode, set up coupled fields if (IPD_Control%cplflx .or. IPD_Control%cplwav) then -! if (mpp_pe() == mpp_root_pe()) print *,'COUPLING: IPD layer' -!jw call setup_exportdata(IPD_Control, IPD_Data, Atm_block) call setup_exportdata(rc) endif