Skip to content

Commit

Permalink
fix: bypass coupler_generate_sfc_xgrid and flux_exchange_init if …
Browse files Browse the repository at this point in the history
…do_flux=.F. (NOAA-GFDL#142)
  • Loading branch information
JosephMouallem authored Aug 30, 2024
1 parent e84cf65 commit e357d8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions full/coupler_main.F90
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ program coupler_main
!-----------------------------------------------------------------------
!> ocean/slow-ice integration loop

if (check_stocks >= 0) call coupler_flux_init_finish_stocks(Time, Atm, Land, Ice, Ocean_state, &
if (check_stocks >= 0 .and. do_flux) call coupler_flux_init_finish_stocks(Time, Atm, Land, Ice, Ocean_state, &
coupler_clocks, init_stocks=.True.)

!> ocean/slow-ice integration loop
Expand Down Expand Up @@ -436,7 +436,8 @@ program coupler_main
end if

! needs to sit here rather than at the end of the coupler loop.
if (check_stocks > 0) call coupler_flux_check_stocks(nc, Time, Atm, Land, Ice, Ocean_state, coupler_clocks)
if (check_stocks > 0 .and. do_flux) call coupler_flux_check_stocks(nc, Time, Atm, Land, Ice, Ocean_state, &
coupler_clocks)

if (do_ice .and. Ice%pe) then
if (Ice%slow_ice_pe) call coupler_unpack_ocean_ice_boundary(nc, Time_flux_ocean_to_ice, Ice, Ocean_ice_boundary,&
Expand All @@ -461,7 +462,7 @@ program coupler_main
!> begin atm_clock_1
call fms_mpp_clock_begin(coupler_clocks%atm)

call coupler_generate_sfc_xgrid(Land, Ice, coupler_clocks)
if (do_flux) call coupler_generate_sfc_xgrid(Land, Ice, coupler_clocks)
call send_ice_mask_sic(Time)

!-----------------------------------------------------------------------
Expand Down Expand Up @@ -671,7 +672,7 @@ program coupler_main
enddo coupled_timestep_loop

!-----------------------------------------------------------------------
if( check_stocks >=0 ) call coupler_flux_init_finish_stocks(Time, Atm, Land, Ice, Ocean_state, &
if(check_stocks >=0 .and. do_flux) call coupler_flux_init_finish_stocks(Time, Atm, Land, Ice, Ocean_state, &
coupler_clocks, finish_stocks=.True.)

call fms_mpp_set_current_pelist()
Expand Down
2 changes: 1 addition & 1 deletion full/full_coupler_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ subroutine coupler_init(Atm, Ocean, Land, Ice, Ocean_state, Atmos_land_boundary,
endif

call fms_mpp_clock_begin(coupler_clocks%flux_exchange_init)
call flux_exchange_init ( Time, Atm, Land, Ice, Ocean, Ocean_state,&
if(do_flux) call flux_exchange_init ( Time, Atm, Land, Ice, Ocean, Ocean_state,&
atmos_ice_boundary, land_ice_atmos_boundary, &
land_ice_boundary, ice_ocean_boundary, ocean_ice_boundary, &
do_ocean, slow_ice_ocean_pelist, dt_atmos=dt_atmos, dt_cpld=dt_cpld)
Expand Down

0 comments on commit e357d8f

Please sign in to comment.