Skip to content

Commit

Permalink
FMS2: Move FMS domain calls to MOM infra
Browse files Browse the repository at this point in the history
The `set_domain` and `nullify_domain` calls used in FMS1 IO now pass
through the MOM domain infra.  Explicit references to the internal
`mpp_domain` have also been removed.
  • Loading branch information
marshallward authored and Hallberg-NOAA committed Jul 24, 2023
1 parent 88d9e32 commit 094ed4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/SIS_framework.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ module SIS_framework

! This file is part of SIS2. See LICENSE.md for the license.

use fms_io_mod, only : set_domain, nullify_domain

use MOM_coms_infra, only : SIS_chksum=>field_chksum
use MOM_coupler_types, only : coupler_1d_bc_type, coupler_2d_bc_type, coupler_3d_bc_type
use MOM_coupler_types, only : coupler_type_spawn, coupler_type_initialized, coupler_type_send_data
Expand All @@ -15,6 +13,7 @@ module SIS_framework
use MOM_domain_infra, only : MOM_domain_type, domain2D, get_domain_extent
use MOM_domain_infra, only : global_field, redistribute_data=>redistribute_array, broadcast_domain
use MOM_domain_infra, only : CENTER, CORNER, EAST=>EAST_FACE, NORTH=>NORTH_FACE, EAST_FACE, NORTH_FACE
use MOM_domain_infra, only : set_domain, nullify_domain
use MOM_error_handler, only : callTree_enter, callTree_leave, callTree_waypoint
use MOM_file_parser, only : get_param, read_param, log_param, log_version, param_file_type
! use MOM_io, only : MULTIPLE, READONLY_FILE, SINGLE_FILE
Expand Down
6 changes: 3 additions & 3 deletions src/ice_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2031,7 +2031,7 @@ subroutine ice_model_init(Ice, Time_Init, Time, Time_step_fast, Time_step_slow,
call clone_MOM_domain(sGD, dG%Domain)

! Set up the restart file and determine whether this is a new simulation.
call set_domain(sGD%mpp_domain)
call set_domain(sGD)
if (.not.associated(Ice%Ice_restart)) &
call SIS_restart_init(Ice%Ice_restart, restart_file, sGD, param_file)
new_sim = determine_is_new_run(dirs%input_filename, dirs%restart_input_dir, sG, Ice%Ice_restart)
Expand Down Expand Up @@ -2189,7 +2189,7 @@ subroutine ice_model_init(Ice, Time_Init, Time, Time_step_fast, Time_step_slow,

! Allocate and register fields for restarts.

if (.not.slow_ice_PE) call set_domain(fGD%mpp_domain)
if (.not.slow_ice_PE) call set_domain(fGD)
if (split_restart_files) then
if (.not.associated(Ice%Ice_fast_restart)) &
call SIS_restart_init(Ice%Ice_fast_restart, fast_rest_file, fGD, param_file)
Expand Down Expand Up @@ -2515,7 +2515,7 @@ subroutine ice_model_init(Ice, Time_Init, Time, Time_step_fast, Time_step_slow,


! if (Ice%fCS%Rad%add_diurnal_sw .or. Ice%fCS%Rad%do_sun_angle_for_alb) then
! call set_domain(fGD%mpp_domain)
! call set_domain(fGD)
call astronomy_init()
! call nullify_domain()
! endif
Expand Down

0 comments on commit 094ed4a

Please sign in to comment.