From 80743e6cbbbe70092a65c87e833bd953dc30fe19 Mon Sep 17 00:00:00 2001 From: "jessica.meixner" Date: Fri, 25 Oct 2019 12:43:06 -0400 Subject: [PATCH] Adding river runoff (from Jiande) Squashed commit of the following: commit 8aa45c6a0cc8bbf98c0e823a8994a4d0383e3d0b Author: jiandewang Date: Mon Sep 23 22:45:46 2019 -0400 fix typo in cap commit ad85f5a9aefe57ff790ee9afe81624494c5dd987 Merge: 4f71b04 c7d2a71 Author: jiandewang Date: Mon Sep 23 13:48:07 2019 -0400 solve conflict in mom cap commit 4f71b04369a1be10b4f8ac9f446512ee108d63cb Author: jiandewang Date: Sat Aug 17 21:08:44 2019 -0400 add ifndef CESMCOUPLED in cap for EMC runoff commit 258a19c7e86a863979cc9e8feb1b789e6c1f6fce Author: jiandewang Date: Sun Aug 4 19:30:08 2019 -0400 add runoff in mom_cap.F90 --- config_src/nuopc_driver/mom_cap.F90 | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/config_src/nuopc_driver/mom_cap.F90 b/config_src/nuopc_driver/mom_cap.F90 index 1aeaaa7a3a..3b36628b9a 100644 --- a/config_src/nuopc_driver/mom_cap.F90 +++ b/config_src/nuopc_driver/mom_cap.F90 @@ -313,6 +313,7 @@ !> This module contains a set of subroutines that are required by NUOPC. module MOM_cap_mod use constants_mod, only: constants_init +use data_override_mod, only: data_override_init, data_override use diag_manager_mod, only: diag_manager_init, diag_manager_end use field_manager_mod, only: field_manager_init, field_manager_end use fms_mod, only: fms_init, fms_end, open_namelist_file, check_nml_error @@ -976,6 +977,11 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) call ocean_model_init(ocean_public, ocean_state, Time, Time) endif +#ifndef CESMCOUPLED +! for runoff in EMC + call data_override_init(Ocean_domain_in = Ocean_public%domain) +#endif + call ocean_model_init_sfc(ocean_state, ocean_public) call mpp_get_compute_domain(ocean_public%domain, isc, iec, jsc, jec) @@ -1922,6 +1928,8 @@ subroutine ModelAdvance(gcomp, rc) file=__FILE__)) & return ! bail out + call ice_ocn_bnd_from_data(Ice_ocean_boundary, Time, Time_step_coupled) ! for runoff + !--------------- ! Update MOM6 !--------------- @@ -2525,4 +2533,18 @@ subroutine shr_file_getLogUnit(nunit) end subroutine shr_file_getLogUnit #endif -end module MOM_cap_mod + subroutine ice_ocn_bnd_from_data(x, Time, Time_step_coupled) +! get forcing data from data_overide + type (ice_ocean_boundary_type) :: x + type(Time_type), intent(in) :: Time, Time_step_coupled + + type(Time_type) :: Time_next + character(len=*),parameter :: subname='(mom_cap:ice_ocn_bnd_from_data)' + + Time_next = Time + Time_step_coupled +! call data_override('OCN', 'runoff', x%runoff , Time_next) + call data_override('OCN', 'runoff', x%rofl_flux , Time_next) + + end subroutine ice_ocn_bnd_from_data + +end module mom_cap_mod