Skip to content

Commit ba6140c

Browse files
Merge pull request #1 from NOAA-EMC/dev/emc
merge dev/emc into fork
2 parents 80743e6 + 9a6f7f6 commit ba6140c

17 files changed

Lines changed: 5998 additions & 909 deletions

config_src/mct_driver/mom_ocean_model_mct.F90

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ module MOM_ocean_model_mct
5656
use coupler_types_mod, only : coupler_type_set_diags, coupler_type_send_data
5757
use mpp_domains_mod, only : domain2d, mpp_get_layout, mpp_get_global_domain
5858
use mpp_domains_mod, only : mpp_define_domains, mpp_get_compute_domain, mpp_get_data_domain
59-
use atmos_ocean_fluxes_mod, only : aof_set_coupler_flux
6059
use fms_mod, only : stdout
6160
use mpp_mod, only : mpp_chksum
6261
use MOM_EOS, only : gsw_sp_from_sr, gsw_pt_from_ct
@@ -525,7 +524,7 @@ subroutine update_ocean_model(Ice_ocean_boundary, OS, Ocean_sfc, &
525524
if (do_thermo) &
526525
call shelf_calc_flux(OS%sfc_state, OS%fluxes, OS%Time, dt_coupling, OS%Ice_shelf_CSp)
527526
if (do_dyn) &
528-
call add_shelf_forces(OS%grid, OS%Ice_shelf_CSp, OS%forces)
527+
call add_shelf_forces(OS%grid, OS%US, OS%Ice_shelf_CSp, OS%forces)
529528
endif
530529
if (OS%icebergs_alter_ocean) then
531530
if (do_dyn) &
@@ -560,7 +559,7 @@ subroutine update_ocean_model(Ice_ocean_boundary, OS, Ocean_sfc, &
560559
if (do_thermo) &
561560
call shelf_calc_flux(OS%sfc_state, OS%flux_tmp, OS%Time, dt_coupling, OS%Ice_shelf_CSp)
562561
if (do_dyn) &
563-
call add_shelf_forces(OS%grid, OS%Ice_shelf_CSp, OS%forces)
562+
call add_shelf_forces(OS%grid, OS%US, OS%Ice_shelf_CSp, OS%forces)
564563
endif
565564
if (OS%icebergs_alter_ocean) then
566565
if (do_dyn) &

config_src/mct_driver/mom_surface_forcing_mct.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ module MOM_surface_forcing_mct
145145
!> Structure corresponding to forcing, but with the elements, units, and conventions
146146
!! that exactly conform to the use for MOM-based coupled models.
147147
type, public :: ice_ocean_boundary_type
148-
real, pointer, dimension(:,:) :: rofl_flux =>NULL() !< liquid runoff [W/m2]
149-
real, pointer, dimension(:,:) :: rofi_flux =>NULL() !< ice runoff [W/m2]
148+
real, pointer, dimension(:,:) :: rofl_flux =>NULL() !< liquid runoff [kg/m2/s]
149+
real, pointer, dimension(:,:) :: rofi_flux =>NULL() !< ice runoff [kg/m2/s]
150150
real, pointer, dimension(:,:) :: u_flux =>NULL() !< i-direction wind stress [Pa]
151151
real, pointer, dimension(:,:) :: v_flux =>NULL() !< j-direction wind stress [Pa]
152152
real, pointer, dimension(:,:) :: t_flux =>NULL() !< sensible heat flux [W/m2]

config_src/mct_driver/ocn_comp_mct.F90

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,9 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )
109109
type(mct_aVect) , intent(inout) :: o2x_o !< Fluxes from ocean to coupler, computed by ocean
110110
character(len=*), optional , intent(in) :: NLFilename !< Namelist filename
111111

112-
! local variables
113-
type(time_type) :: time0 !< Model start time
112+
! local variable
113+
type(time_type) :: time0 !< Start time of coupled model's calendar.
114+
type(time_type) :: time_start !< The time at which to initialize the ocean model
114115
type(ESMF_time) :: time_var !< ESMF_time variable to query time
115116
type(ESMF_time) :: time_in_ESMF !< Initial time for ocean
116117
type(ESMF_timeInterval) :: ocn_cpl_interval !< Ocean coupling interval
@@ -202,11 +203,16 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )
202203

203204
call set_calendar_type(NOLEAP) !TODO: confirm this
204205

205-
! Get the initial time
206-
call ESMF_ClockGet(EClock, currTime=time_var, rc=rc)
206+
! Get start time
207+
call ESMF_ClockGet(EClock, StartTime=time_var, rc=rc)
207208
call ESMF_TimeGet(time_var, yy=year, mm=month, dd=day, h=hour, m=minute, s=seconds, rc=rc)
208209
time0 = set_date(year, month, day, hour, minute, seconds, err_msg=err_msg)
209210

211+
! Get current time
212+
call ESMF_ClockGet(EClock, currTime=time_var, rc=rc)
213+
call ESMF_TimeGet(time_var, yy=year, mm=month, dd=day, h=hour, m=minute, s=seconds, rc=rc)
214+
time_start = set_date(year, month, day, hour, minute, seconds, err_msg=err_msg)
215+
210216
! Debugging clocks
211217
if (debug .and. is_root_pe()) then
212218
write(glb%stdout,*) 'ocn_init_mct, current time: y,m,d-',year,month,day,'h,m,s=',hour,minute,seconds
@@ -279,7 +285,7 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )
279285
runtype = get_runtype()
280286
if (runtype == "initial") then
281287
! startup (new run) - 'n' is needed below since we don't specify input_filename in input.nml
282-
call ocean_model_init(glb%ocn_public, glb%ocn_state, time0, time0, input_restart_file = 'n')
288+
call ocean_model_init(glb%ocn_public, glb%ocn_state, time0, time_start, input_restart_file = 'n')
283289
else ! hybrid or branch or continuos runs
284290
! get output path root
285291
call seq_infodata_GetData( glb%infodata, outPathRoot=restartpath )
@@ -295,7 +301,7 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )
295301
write(glb%stdout,*) 'Reading restart file: ',trim(restartfile)
296302
end if
297303
call shr_file_freeUnit(nu)
298-
call ocean_model_init(glb%ocn_public, glb%ocn_state, time0, time0, input_restart_file=trim(restartfile))
304+
call ocean_model_init(glb%ocn_public, glb%ocn_state, time0, time_start, input_restart_file=trim(restartfile))
299305
endif
300306
if (is_root_pe()) then
301307
write(glb%stdout,'(/12x,a/)') '======== COMPLETED MOM INITIALIZATION ========'

0 commit comments

Comments
 (0)