Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge with EMC fork #13

Merged
merged 68 commits into from
Jan 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
a446d0f
Remove dependence on the boundary layer scheme
gustavo-marques Mar 2, 2020
b5132d9
Modifications to run idealized two-column LBD
gustavo-marques Mar 10, 2020
51a4d2e
Apply a linear transition in LBD methods 1, 2
gustavo-marques Mar 10, 2020
3b121cb
Merge branch 'fix_LBD_tests' into LBD_idealized_experiments
gustavo-marques Apr 17, 2020
9dc4720
Add option to apply linear decay at the base of hbl
gustavo-marques May 5, 2020
92581e2
Minor improvements in the bulk method
gustavo-marques May 25, 2020
7299d86
Fix bug when applying ND only in the interior
gustavo-marques May 25, 2020
09ad695
Add option to apply linear decay at the base of hbl
gustavo-marques Jul 7, 2020
7e39059
Merge branch 'dev/ncar' into LBD_idealized_experiments
gustavo-marques Jul 7, 2020
a49954a
comment calls to BLD schemes
gustavo-marques Jul 7, 2020
1fd5393
Fix bug in loop-indices when applying linear decay
gustavo-marques Aug 26, 2020
9957e55
Fix bug in loop-indices when using discontinuous ND and interior_only
gustavo-marques Aug 26, 2020
d8ae09f
Rename lateral_boundary_diffusion_CS to lbd_CS
gustavo-marques Sep 4, 2020
2a80964
First attempt to use remapping in LBD
gustavo-marques Sep 4, 2020
fa376e4
Merge branch 'LBD_idealized_experiments2' into regrid_LBD
gustavo-marques Sep 21, 2020
5c56268
Adding options to specify dz to apply LBD @ top
gustavo-marques Sep 22, 2020
1849bcc
Adding option to output u^2, v^2 and u*v
gustavo-marques Sep 23, 2020
e0db9ab
Fix typo when posting vsq
gustavo-marques Sep 24, 2020
593ebfc
Delete fluxes_bulk_method
gustavo-marques Sep 29, 2020
75c587e
Major re-arragement to remap u- and v-fluxes
gustavo-marques Oct 2, 2020
441c34e
Define vertical grid on-the-fly using h's and BLDs
gustavo-marques Oct 6, 2020
40136b6
Passes GV to lateral_boundary_diffusion_init
gustavo-marques Oct 9, 2020
e537ef2
Add option to initialize passive tracer from z file
gustavo-marques Oct 9, 2020
365b298
Cleanup + add unit tests
gustavo-marques Oct 9, 2020
4ab4a7a
Remove hard-coded BLD and uncomment code for adv and PGF
gustavo-marques Oct 9, 2020
f444aff
Comment out write statements
gustavo-marques Oct 9, 2020
2538c4d
Improve the merging of interfaces
gustavo-marques Oct 15, 2020
87ba533
Adds missing args for KPP_get_BLD and energetic_PBL_get_MLD
gustavo-marques Oct 15, 2020
f0face4
Adds missing args for KPP_get_BLD and energetic_PBL_get_MLD
gustavo-marques Oct 15, 2020
ddbd9c7
Merge pull request #158 from gustavo-marques/dev-master-candidate-nca…
alperaltuntas Oct 16, 2020
4235bb2
Merge pull request #159 from gustavo-marques/add_u_v_squared_diags
alperaltuntas Oct 16, 2020
a962325
Add option to apply flux limiter
gustavo-marques Oct 19, 2020
9e7b089
Improve flux limiter
gustavo-marques Oct 20, 2020
3df9dbc
Merge branch 'dev/ncar' into merge-regrid_LBD
gustavo-marques Oct 20, 2020
e484bc8
Add option to set maximum value in subrotine unique
gustavo-marques Oct 20, 2020
9fb6f75
Fix unit tests
gustavo-marques Oct 20, 2020
60559ec
Code cleaning
gustavo-marques Oct 20, 2020
300b6e9
Option to apply limiter in native and LBD grids
gustavo-marques Oct 20, 2020
9fbc3e6
Merge pull request #6 from NOAA-GFDL/main-candidate-2020-09-18
gustavo-marques Oct 21, 2020
165b1b2
Merge pull request #160 from gustavo-marques/merge-main-candidate-202…
alperaltuntas Oct 23, 2020
30fac75
introduce public module ints stdout and stderr for standard output
alperaltuntas Oct 27, 2020
cc82d11
use MOM_io::stdout in MCT cap instead of glb%stdout or FMS stdout
alperaltuntas Oct 27, 2020
1269874
change all 'write(*,..' to 'write(stdout,...'
alperaltuntas Oct 27, 2020
3f09291
replace iso_fortran_env::stdout with MOM_io::stdout
alperaltuntas Oct 27, 2020
f0d8a4a
Merge branch 'dev/ncar' into HEAD
gustavo-marques Nov 10, 2020
f5abc66
Fix bug in linear decay
gustavo-marques Nov 17, 2020
11cc3dc
Undo changes related to check_grid_def
gustavo-marques Nov 17, 2020
48616d8
Delete uncessary comments
gustavo-marques Nov 17, 2020
aa27f1c
Add LBD clock, clean up, and document module
gustavo-marques Nov 18, 2020
fa2b424
Undo chages in tracer_example and MOM_tracer_flow_control
gustavo-marques Nov 18, 2020
d5c87fc
change left_reals character var to be deferred length to prevent reco…
alperaltuntas Nov 19, 2020
95271cd
change mesg character var to be deferred length to prevent record ove…
alperaltuntas Nov 20, 2020
7a5a0f7
real_array_string to deferred length
alperaltuntas Nov 20, 2020
5ac1846
Merge pull request #165 from NCAR/deferred_char_len
gustavo-marques Nov 24, 2020
ad9862b
Set maximum depth of the LBD grid
gustavo-marques Dec 1, 2020
acdfdda
Fix unit tests and declare max_depth
gustavo-marques Dec 1, 2020
37cea36
A few fixes to get it to compile with gfortran.
kshedstrom Dec 9, 2020
0c16805
Merge pull request #168 from kshedstrom/gnu_fix
alperaltuntas Dec 11, 2020
8215b70
Merge pull request #163 from NCAR/stdout
alperaltuntas Dec 11, 2020
cf97095
Fix bug in linear decay and set F_layer = 0 below htot_max
gustavo-marques Dec 14, 2020
eddbd6c
Merge pull request #164 from gustavo-marques/LBD_regrid_merged_10nov2020
alperaltuntas Dec 14, 2020
42d79c2
Merge branch 'main' into main-candidate-ncar-2020-12-15
gustavo-marques Dec 15, 2020
51ed387
Delete forgotten code
gustavo-marques Dec 16, 2020
5739a34
Merge branch 'delete_fotgotten_code_LBD' into main-candidate-ncar-202…
gustavo-marques Dec 16, 2020
9d04f38
Sets CS%limiter_remap=.false. in near_boundary_unit_tests
gustavo-marques Dec 18, 2020
0f664aa
Merge pull request #1275 from gustavo-marques/main-candidate-ncar-202…
marshallward Dec 19, 2020
5d0f8b4
Merge commit '0f664aa82f3034252c334dad1e4129f2fee112e3' into feature/…
jiandewang Dec 19, 2020
593aecb
Merge pull request #45 from jiandewang/feature/update-to-GFDL-20201215
jiandewang Dec 19, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 13 additions & 19 deletions config_src/mct_driver/mom_ocean_model_mct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module MOM_ocean_model_mct
use coupler_types_mod, only : coupler_type_set_diags, coupler_type_send_data
use mpp_domains_mod, only : domain2d, mpp_get_layout, mpp_get_global_domain
use mpp_domains_mod, only : mpp_define_domains, mpp_get_compute_domain, mpp_get_data_domain
use fms_mod, only : stdout
use MOM_io, only : stdout
use mpp_mod, only : mpp_chksum
use MOM_EOS, only : gsw_sp_from_sr, gsw_pt_from_ct
use MOM_wave_interface, only : wave_parameters_CS, MOM_wave_interface_init
Expand Down Expand Up @@ -409,10 +409,6 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in, gas_fields_ocn, i

call close_param_file(param_file)
call diag_mediator_close_registration(OS%diag)

if (is_root_pe()) &
write(*,'(/12x,a/)') '======== COMPLETED MOM INITIALIZATION ========'

call callTree_leave("ocean_model_init(")
end subroutine ocean_model_init

Expand Down Expand Up @@ -1053,20 +1049,18 @@ subroutine ocean_public_type_chksum(id, timestep, ocn)
integer, intent(in) :: timestep !< The number of elapsed timesteps
type(ocean_public_type), intent(in) :: ocn !< A structure containing various publicly
!! visible ocean surface fields.
integer :: n, m, outunit

outunit = stdout()

write(outunit,*) "BEGIN CHECKSUM(ocean_type):: ", id, timestep
write(outunit,100) 'ocean%t_surf ',mpp_chksum(ocn%t_surf )
write(outunit,100) 'ocean%s_surf ',mpp_chksum(ocn%s_surf )
write(outunit,100) 'ocean%u_surf ',mpp_chksum(ocn%u_surf )
write(outunit,100) 'ocean%v_surf ',mpp_chksum(ocn%v_surf )
write(outunit,100) 'ocean%sea_lev ',mpp_chksum(ocn%sea_lev)
write(outunit,100) 'ocean%frazil ',mpp_chksum(ocn%frazil )
write(outunit,100) 'ocean%melt_potential ',mpp_chksum(ocn%melt_potential)

call coupler_type_write_chksums(ocn%fields, outunit, 'ocean%')
integer :: n, m

write(stdout,*) "BEGIN CHECKSUM(ocean_type):: ", id, timestep
write(stdout,100) 'ocean%t_surf ',mpp_chksum(ocn%t_surf )
write(stdout,100) 'ocean%s_surf ',mpp_chksum(ocn%s_surf )
write(stdout,100) 'ocean%u_surf ',mpp_chksum(ocn%u_surf )
write(stdout,100) 'ocean%v_surf ',mpp_chksum(ocn%v_surf )
write(stdout,100) 'ocean%sea_lev ',mpp_chksum(ocn%sea_lev)
write(stdout,100) 'ocean%frazil ',mpp_chksum(ocn%frazil )
write(stdout,100) 'ocean%melt_potential ',mpp_chksum(ocn%melt_potential)

call coupler_type_write_chksums(ocn%fields, stdout, 'ocean%')
100 FORMAT(" CHECKSUM::",A20," = ",Z20)

end subroutine ocean_public_type_chksum
Expand Down
52 changes: 25 additions & 27 deletions config_src/mct_driver/mom_surface_forcing_mct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ module MOM_surface_forcing_mct
use coupler_types_mod, only : coupler_type_initialized, coupler_type_spawn
use coupler_types_mod, only : coupler_type_copy_data
use data_override_mod, only : data_override_init, data_override
use fms_mod, only : stdout
use mpp_mod, only : mpp_chksum
use time_interp_external_mod, only : init_external_field, time_interp_external
use time_interp_external_mod, only : time_interp_external_init
use MOM_io, only: stdout

implicit none ; private

Expand Down Expand Up @@ -1361,37 +1361,35 @@ subroutine ice_ocn_bnd_type_chksum(id, timestep, iobt)
!! ocean in a coupled model whose checksums are reported

! local variables
integer :: n,m, outunit

outunit = stdout()

write(outunit,*) "BEGIN CHECKSUM(ice_ocean_boundary_type):: ", id, timestep
write(outunit,100) 'iobt%u_flux ' , mpp_chksum( iobt%u_flux )
write(outunit,100) 'iobt%v_flux ' , mpp_chksum( iobt%v_flux )
write(outunit,100) 'iobt%t_flux ' , mpp_chksum( iobt%t_flux )
write(outunit,100) 'iobt%q_flux ' , mpp_chksum( iobt%q_flux )
write(outunit,100) 'iobt%salt_flux ' , mpp_chksum( iobt%salt_flux )
write(outunit,100) 'iobt%seaice_melt_heat' , mpp_chksum( iobt%seaice_melt_heat)
write(outunit,100) 'iobt%seaice_melt ' , mpp_chksum( iobt%seaice_melt )
write(outunit,100) 'iobt%lw_flux ' , mpp_chksum( iobt%lw_flux )
write(outunit,100) 'iobt%sw_flux_vis_dir' , mpp_chksum( iobt%sw_flux_vis_dir)
write(outunit,100) 'iobt%sw_flux_vis_dif' , mpp_chksum( iobt%sw_flux_vis_dif)
write(outunit,100) 'iobt%sw_flux_nir_dir' , mpp_chksum( iobt%sw_flux_nir_dir)
write(outunit,100) 'iobt%sw_flux_nir_dif' , mpp_chksum( iobt%sw_flux_nir_dif)
write(outunit,100) 'iobt%lprec ' , mpp_chksum( iobt%lprec )
write(outunit,100) 'iobt%fprec ' , mpp_chksum( iobt%fprec )
write(outunit,100) 'iobt%runoff ' , mpp_chksum( iobt%runoff )
write(outunit,100) 'iobt%calving ' , mpp_chksum( iobt%calving )
write(outunit,100) 'iobt%p ' , mpp_chksum( iobt%p )
integer :: n,m

write(stdout,*) "BEGIN CHECKSUM(ice_ocean_boundary_type):: ", id, timestep
write(stdout,100) 'iobt%u_flux ' , mpp_chksum( iobt%u_flux )
write(stdout,100) 'iobt%v_flux ' , mpp_chksum( iobt%v_flux )
write(stdout,100) 'iobt%t_flux ' , mpp_chksum( iobt%t_flux )
write(stdout,100) 'iobt%q_flux ' , mpp_chksum( iobt%q_flux )
write(stdout,100) 'iobt%salt_flux ' , mpp_chksum( iobt%salt_flux )
write(stdout,100) 'iobt%seaice_melt_heat' , mpp_chksum( iobt%seaice_melt_heat)
write(stdout,100) 'iobt%seaice_melt ' , mpp_chksum( iobt%seaice_melt )
write(stdout,100) 'iobt%lw_flux ' , mpp_chksum( iobt%lw_flux )
write(stdout,100) 'iobt%sw_flux_vis_dir' , mpp_chksum( iobt%sw_flux_vis_dir)
write(stdout,100) 'iobt%sw_flux_vis_dif' , mpp_chksum( iobt%sw_flux_vis_dif)
write(stdout,100) 'iobt%sw_flux_nir_dir' , mpp_chksum( iobt%sw_flux_nir_dir)
write(stdout,100) 'iobt%sw_flux_nir_dif' , mpp_chksum( iobt%sw_flux_nir_dif)
write(stdout,100) 'iobt%lprec ' , mpp_chksum( iobt%lprec )
write(stdout,100) 'iobt%fprec ' , mpp_chksum( iobt%fprec )
write(stdout,100) 'iobt%runoff ' , mpp_chksum( iobt%runoff )
write(stdout,100) 'iobt%calving ' , mpp_chksum( iobt%calving )
write(stdout,100) 'iobt%p ' , mpp_chksum( iobt%p )
if (associated(iobt%ustar_berg)) &
write(outunit,100) 'iobt%ustar_berg ' , mpp_chksum( iobt%ustar_berg )
write(stdout,100) 'iobt%ustar_berg ' , mpp_chksum( iobt%ustar_berg )
if (associated(iobt%area_berg)) &
write(outunit,100) 'iobt%area_berg ' , mpp_chksum( iobt%area_berg )
write(stdout,100) 'iobt%area_berg ' , mpp_chksum( iobt%area_berg )
if (associated(iobt%mass_berg)) &
write(outunit,100) 'iobt%mass_berg ' , mpp_chksum( iobt%mass_berg )
write(stdout,100) 'iobt%mass_berg ' , mpp_chksum( iobt%mass_berg )
100 FORMAT(" CHECKSUM::",A20," = ",Z20)

call coupler_type_write_chksums(iobt%fluxes, outunit, 'iobt%')
call coupler_type_write_chksums(iobt%fluxes, stdout, 'iobt%')

end subroutine ice_ocn_bnd_type_chksum

Expand Down
50 changes: 25 additions & 25 deletions config_src/mct_driver/ocn_comp_mct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module ocn_comp_mct
use MOM_constants, only: CELSIUS_KELVIN_OFFSET
use MOM_domains, only: AGRID, BGRID_NE, CGRID_NE, pass_vector
use mpp_domains_mod, only: mpp_get_compute_domain
use MOM_io, only: stdout

! Previously inlined - now in separate modules
use MOM_ocean_model_mct, only: ocean_public_type, ocean_state_type
Expand Down Expand Up @@ -88,7 +89,6 @@ module ocn_comp_mct
type(cpl_indices_type) :: ind !< Variable IDs
logical :: sw_decomp !< Controls whether shortwave is decomposed into 4 components
real :: c1, c2, c3, c4 !< Coeffs. used in the shortwave decomposition i/o
integer :: stdout !< standard output unit. (by default, points to ocn.log.* )
character(len=384) :: pointer_filename !< Name of the ascii file that contains the path
!! and filename of the latest restart file.
end type MCT_MOM_Data
Expand Down Expand Up @@ -194,14 +194,14 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )
call shr_file_getLogUnit (shrlogunit)
call shr_file_getLogLevel(shrloglev)

glb%stdout = shr_file_getUnit() ! get an unused unit number
stdout = shr_file_getUnit() ! get an unused unit number

! open the ocn_modelio.nml file and then open a log file associated with stdout
ocn_modelio_name = 'ocn_modelio.nml' // trim(inst_suffix)
call shr_file_setIO(ocn_modelio_name,glb%stdout)
call shr_file_setIO(ocn_modelio_name,stdout)

! set the shr log io unit number
call shr_file_setLogUnit(glb%stdout)
call shr_file_setLogUnit(stdout)
end if

call set_calendar_type(NOLEAP) !TODO: confirm this
Expand All @@ -218,23 +218,23 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )

! Debugging clocks
if (debug .and. is_root_pe()) then
write(glb%stdout,*) 'ocn_init_mct, current time: y,m,d-',year,month,day,'h,m,s=',hour,minute,seconds
write(stdout,*) 'ocn_init_mct, current time: y,m,d-',year,month,day,'h,m,s=',hour,minute,seconds

call ESMF_ClockGet(EClock, StartTime=time_var, rc=rc)
call ESMF_TimeGet(time_var, yy=year, mm=month, dd=day, h=hour, m=minute, s=seconds, rc=rc)
write(glb%stdout,*) 'ocn_init_mct, start time: y,m,d-',year,month,day,'h,m,s=',hour,minute,seconds
write(stdout,*) 'ocn_init_mct, start time: y,m,d-',year,month,day,'h,m,s=',hour,minute,seconds

call ESMF_ClockGet(EClock, StopTime=time_var, rc=rc)
call ESMF_TimeGet(time_var, yy=year, mm=month, dd=day, h=hour, m=minute, s=seconds, rc=rc)
write(glb%stdout,*) 'ocn_init_mct, stop time: y,m,d-',year,month,day,'h,m,s=',hour,minute,seconds
write(stdout,*) 'ocn_init_mct, stop time: y,m,d-',year,month,day,'h,m,s=',hour,minute,seconds

call ESMF_ClockGet(EClock, PrevTime=time_var, rc=rc)
call ESMF_TimeGet(time_var, yy=year, mm=month, dd=day, h=hour, m=minute, s=seconds, rc=rc)
write(glb%stdout,*) 'ocn_init_mct, previous time: y,m,d-',year,month,day,'h,m,s=',hour,minute,seconds
write(stdout,*) 'ocn_init_mct, previous time: y,m,d-',year,month,day,'h,m,s=',hour,minute,seconds

call ESMF_ClockGet(EClock, TimeStep=ocn_cpl_interval, rc=rc)
call ESMF_TimeIntervalGet(ocn_cpl_interval, yy=year, mm=month, d=day, s=seconds, sn=seconds_n, sd=seconds_d, rc=rc)
write(glb%stdout,*) 'ocn_init_mct, time step: y,m,d-',year,month,day,'s,sn,sd=',seconds,seconds_n,seconds_d
write(stdout,*) 'ocn_init_mct, time step: y,m,d-',year,month,day,'s,sn,sd=',seconds,seconds_n,seconds_d
endif

npes = num_pes()
Expand Down Expand Up @@ -298,7 +298,7 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )
! read name of restart file in the pointer file
nu = shr_file_getUnit()
restart_pointer_file = trim(glb%pointer_filename)
if (is_root_pe()) write(glb%stdout,*) 'Reading ocn pointer file: ',restart_pointer_file
if (is_root_pe()) write(stdout,*) 'Reading ocn pointer file: ',restart_pointer_file
restartfile = ""; restartfiles = "";
open(nu, file=restart_pointer_file, form='formatted', status='unknown')
do
Expand All @@ -316,13 +316,13 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )
enddo
close(nu)
if (is_root_pe()) then
write(glb%stdout,*) 'Reading restart file(s): ',trim(restartfiles)
write(stdout,*) 'Reading restart file(s): ',trim(restartfiles)
end if
call shr_file_freeUnit(nu)
call ocean_model_init(glb%ocn_public, glb%ocn_state, time0, time_start, input_restart_file=trim(restartfiles))
endif
if (is_root_pe()) then
write(glb%stdout,'(/12x,a/)') '======== COMPLETED MOM INITIALIZATION ========'
write(stdout,'(/12x,a/)') '======== COMPLETED MOM INITIALIZATION ========'
end if

! Initialize ocn_state%sfc_state out of sight
Expand Down Expand Up @@ -383,7 +383,7 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )
ncouple_per_day = seconds_in_day / ocn_cpl_dt
mom_cpl_dt = seconds_in_day / ncouple_per_day
if (mom_cpl_dt /= ocn_cpl_dt) then
write(glb%stdout,*) 'ERROR mom_cpl_dt and ocn_cpl_dt must be identical'
write(stdout,*) 'ERROR mom_cpl_dt and ocn_cpl_dt must be identical'
call exit(0)
end if

Expand Down Expand Up @@ -457,7 +457,7 @@ subroutine ocn_run_mct( EClock, cdata_o, x2o_o, o2x_o)
if (is_root_pe()) then
call shr_file_getLogUnit(shrlogunit)
call shr_file_getLogLevel(shrloglev)
call shr_file_setLogUnit(glb%stdout)
call shr_file_setLogUnit(stdout)
endif

! Query the beginning time of the current coupling interval
Expand All @@ -484,7 +484,7 @@ subroutine ocn_run_mct( EClock, cdata_o, x2o_o, o2x_o)
if (runtype /= "continue" .and. runtype /= "branch") then

if (debug .and. is_root_pe()) then
write(glb%stdout,*) 'doubling first interval duration!'
write(stdout,*) 'doubling first interval duration!'
endif

! shift back the start time by one coupling interval (to align the start time with other components)
Expand All @@ -500,19 +500,19 @@ subroutine ocn_run_mct( EClock, cdata_o, x2o_o, o2x_o)
if (debug .and. is_root_pe()) then
call ESMF_ClockGet(EClock, CurrTime=time_var, rc=rc)
call ESMF_TimeGet(time_var, yy=year, mm=month, dd=day, h=hour, m=minute, s=seconds, rc=rc)
write(glb%stdout,*) 'ocn_run_mct, current time: y,m,d-',year,month,day,'h,m,s=',hour,minute,seconds
write(stdout,*) 'ocn_run_mct, current time: y,m,d-',year,month,day,'h,m,s=',hour,minute,seconds
call ESMF_ClockGet(EClock, StartTime=time_var, rc=rc)
call ESMF_TimeGet(time_var, yy=year, mm=month, dd=day, h=hour, m=minute, s=seconds, rc=rc)
write(glb%stdout,*) 'ocn_run_mct, start time: y,m,d-',year,month,day,'h,m,s=',hour,minute,seconds
write(stdout,*) 'ocn_run_mct, start time: y,m,d-',year,month,day,'h,m,s=',hour,minute,seconds
call ESMF_ClockGet(EClock, StopTime=time_var, rc=rc)
call ESMF_TimeGet(time_var, yy=year, mm=month, dd=day, h=hour, m=minute, s=seconds, rc=rc)
write(glb%stdout,*) 'ocn_run_mct, stop time: y,m,d-',year,month,day,'h,m,s=',hour,minute,seconds
write(stdout,*) 'ocn_run_mct, stop time: y,m,d-',year,month,day,'h,m,s=',hour,minute,seconds
call ESMF_ClockGet(EClock, PrevTime=time_var, rc=rc)
call ESMF_TimeGet(time_var, yy=year, mm=month, dd=day, h=hour, m=minute, s=seconds, rc=rc)
write(glb%stdout,*) 'ocn_run_mct, previous time: y,m,d-',year,month,day,'h,m,s=',hour,minute,seconds
write(stdout,*) 'ocn_run_mct, previous time: y,m,d-',year,month,day,'h,m,s=',hour,minute,seconds
call ESMF_ClockGet(EClock, TimeStep=ocn_cpl_interval, rc=rc)
call ESMF_TimeIntervalGet(ocn_cpl_interval, yy=year, mm=month, d=day, s=seconds, sn=seconds_n, sd=seconds_d, rc=rc)
write(glb%stdout,*) 'ocn_init_mct, time step: y,m,d-',year,month,day,'s,sn,sd=',seconds,seconds_n,seconds_d
write(stdout,*) 'ocn_init_mct, time step: y,m,d-',year,month,day,'s,sn,sd=',seconds,seconds_n,seconds_d
endif

! set the cdata pointers:
Expand All @@ -525,10 +525,10 @@ subroutine ocn_run_mct( EClock, cdata_o, x2o_o, o2x_o)
!glb%sw_decomp = .false.
!END TODO:
if (glb%sw_decomp) then
call ocn_import(x2o_o%rattr, glb%ind, glb%grid, Ice_ocean_boundary, glb%ocn_public, glb%stdout, Eclock, &
call ocn_import(x2o_o%rattr, glb%ind, glb%grid, Ice_ocean_boundary, glb%ocn_public, stdout, Eclock, &
c1=glb%c1, c2=glb%c2, c3=glb%c3, c4=glb%c4)
else
call ocn_import(x2o_o%rattr, glb%ind, glb%grid, Ice_ocean_boundary, glb%ocn_public, glb%stdout, Eclock )
call ocn_import(x2o_o%rattr, glb%ind, glb%grid, Ice_ocean_boundary, glb%ocn_public, stdout, Eclock )
end if

! Update internal ocean
Expand All @@ -540,7 +540,7 @@ subroutine ocn_run_mct( EClock, cdata_o, x2o_o, o2x_o)
!--- write out intermediate restart file when needed.
! Check alarms for flag to write restart at end of day
write_restart_at_eod = seq_timemgr_RestartAlarmIsOn(EClock)
if (debug .and. is_root_pe()) write(glb%stdout,*) 'ocn_run_mct, write_restart_at_eod=', write_restart_at_eod
if (debug .and. is_root_pe()) write(stdout,*) 'ocn_run_mct, write_restart_at_eod=', write_restart_at_eod

if (write_restart_at_eod) then
! case name
Expand Down Expand Up @@ -575,7 +575,7 @@ subroutine ocn_run_mct( EClock, cdata_o, x2o_o, o2x_o)
endif

close(nu)
write(glb%stdout,*) 'ocn restart pointer file written: ',trim(restartname)
write(stdout,*) 'ocn restart pointer file written: ',trim(restartname)
endif
call shr_file_freeUnit(nu)

Expand Down Expand Up @@ -761,7 +761,7 @@ end subroutine ocn_domain_mct
else if (trim(starttype) == trim(seq_infodata_start_type_brnch)) then
get_runtype = "branch"
else
write(glb%stdout,*) 'ocn_comp_mct ERROR: unknown starttype'
write(stdout,*) 'ocn_comp_mct ERROR: unknown starttype'
call exit(0)
end if
return
Expand Down
4 changes: 2 additions & 2 deletions config_src/nuopc_driver/mom_cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1215,11 +1215,11 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
!---------------------------------

if (len_trim(scalar_field_name) > 0) then
call State_SetScalar(dble(nxg),scalar_field_idx_grid_nx, exportState, localPet, &
call State_SetScalar(real(nxg,ESMF_KIND_R8),scalar_field_idx_grid_nx, exportState, localPet, &
scalar_field_name, scalar_field_count, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

call State_SetScalar(dble(nyg),scalar_field_idx_grid_ny, exportState, localPet, &
call State_SetScalar(real(nyg,ESMF_KIND_R8),scalar_field_idx_grid_ny, exportState, localPet, &
scalar_field_name, scalar_field_count, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
endif
Expand Down
Loading