Skip to content

Commit

Permalink
chore: Add ifdefs for fms_io calls (#77)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This deprecates fms_io/mpp_io support by default, it can be renabled with the `-Duse_deprecated_io` CPP flag
rem1776 authored Jun 30, 2023
1 parent 9da2d61 commit bf645ea
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion SHiELD/coupler_main.F90
Original file line number Diff line number Diff line change
@@ -32,8 +32,9 @@ program coupler_main
update_atmos_model_state, &
atmos_data_type, atmos_model_restart
!--- FMS old io
#ifdef use_deprecated_io
use fms_io_mod, only: fms_io_exit!< This can't be removed until fms_io is not used at all

#endif
implicit none

!-----------------------------------------------------------------------
@@ -458,7 +459,9 @@ subroutine coupler_end
call diag_manager_end (Time_atmos)

!----- to be removed once fms_io is fully deprecated -----
#ifdef use_deprecated_io
call fms_io_exit()
#endif

!-----------------------------------------------------------------------

5 changes: 4 additions & 1 deletion full/coupler_main.F90
Original file line number Diff line number Diff line change
@@ -337,8 +337,9 @@ program coupler_main
use FMS, status_fms=>status
use FMSconstants, only: fmsconstants_init

!< Can't get rid of this until fms_io is no longer used at all
#ifdef use_deprecated_io
use fms_io_mod, only: fms_io_exit
#endif

! model interfaces used to couple the component models:
! atmosphere, land, ice, and ocean
@@ -1960,7 +1961,9 @@ subroutine coupler_end()
call coupler_restart(Time, Time_restart_current)

call diag_manager_end (Time)
#ifdef use_deprecated_io
call fms_io_exit
#endif
call mpp_set_current_pelist()

!-----------------------------------------------------------------------
5 changes: 4 additions & 1 deletion simple/coupler_main.F90
Original file line number Diff line number Diff line change
@@ -64,7 +64,9 @@ program coupler_main
use FMSconstants, only: fmsconstants_init

!--- FMS old io
#ifdef use_deprecated_io
use fms_io_mod, only: fms_io_exit!< This can't be removed until fms_io is not used at all
#endif

implicit none

@@ -513,8 +515,9 @@ subroutine coupler_end
call ice_model_end (Ice)

call diag_manager_end (Time_atmos)

#ifdef use_deprecated_io
call fms_io_exit
#endif

! call flux_exchange_end (Atm)

0 comments on commit bf645ea

Please sign in to comment.