Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
36d4f7f
Bugfix: cpu clock sync error
marshallward Dec 4, 2021
e48f4a7
+Add the new routine unit_no_scaling_init
Hallberg-NOAA Dec 6, 2021
59c5926
(*)Provide US arguments to 4 existing calls
Hallberg-NOAA Dec 6, 2021
3162bd0
+Make US arguments non-optional for 28 routines
Hallberg-NOAA Dec 6, 2021
763ddab
Docs: Add NASA-GMAO to consortium figure
marshallward Dec 6, 2021
582de2e
add infrastructure for residual term
Nov 29, 2021
196586d
add residual term loss on flux
Dec 8, 2021
6807892
clean up/ move to implicit update
Dec 8, 2021
3ce6a31
Merge branch 'dev/gfdl' into cpu_clock_sync_bugfix
Hallberg-NOAA Dec 9, 2021
833cd30
+Remove clocks inside of j-loops
Hallberg-NOAA Dec 5, 2021
8b5c1c8
Deallocate eta_PF_start to avoid a memory leak
Hallberg-NOAA Dec 5, 2021
3f46b6a
+Set find_salt_root if SHELF_THREE_EQN = .False.
Hallberg-NOAA Dec 5, 2021
ec553aa
+Obsolete ETA_TOLERANCE_AUX
Hallberg-NOAA Dec 5, 2021
d733714
(*)Fix extract_diabatic_member
Hallberg-NOAA Dec 10, 2021
5172c49
Warn if opacity_from_chl is called without fluxes
Hallberg-NOAA Dec 10, 2021
90739be
Correct comments describing advect_tracer args
Hallberg-NOAA Dec 10, 2021
3364af1
Update indexing of array passed to data_override.
wfcooke Dec 6, 2021
2319139
Correct out of bounds index (por_face_areaU) bug
Hallberg-NOAA Dec 7, 2021
05edb63
(*)Offline tracer read bug fix
Hallberg-NOAA Dec 10, 2021
fcfd238
+Refactored and rescaled the offline tracer code
Hallberg-NOAA Dec 11, 2021
09bcea2
Merge branch 'dev/gfdl' into cpu_clock_sync_bugfix
Hallberg-NOAA Dec 11, 2021
112ac49
+(*)Revised offline tracer algorithms
Hallberg-NOAA Dec 11, 2021
0895fe3
Merge branch 'dev/gfdl' into offline_tracer_fix
Hallberg-NOAA Dec 11, 2021
fbafcb1
Merge branch 'dev/gfdl' into mandatory_US_args
Hallberg-NOAA Dec 11, 2021
86b91dc
Merge pull request #29 from Hallberg-NOAA/mandatory_US_args
marshallward Dec 12, 2021
e452a29
Merge branch 'dev/gfdl' into cpu_clock_sync_bugfix
Hallberg-NOAA Dec 12, 2021
7ae28b8
Merge pull request #27 from marshallward/cpu_clock_sync_bugfix
Hallberg-NOAA Dec 13, 2021
8824671
Merge branch 'dev/gfdl' into consortium_fig_update
Hallberg-NOAA Dec 13, 2021
8f5dc28
Merge pull request #31 from marshallward/consortium_fig_update
Hallberg-NOAA Dec 13, 2021
cf931b1
Eliminate unneeded diagnostic arrays
Hallberg-NOAA Dec 9, 2021
170fffd
MOM_sponge cleanup
Hallberg-NOAA Dec 9, 2021
6feadd0
Use G%Rad_Earth_L in mct and NUOPC cap code
Hallberg-NOAA Dec 11, 2021
bbb9753
+Rescale some sea-surface height variables to [Z]
Hallberg-NOAA Dec 11, 2021
86eb106
Correct the units in two comments
Hallberg-NOAA Dec 15, 2021
049241c
+Rescaled optics%opacity_band
Hallberg-NOAA Dec 16, 2021
08cd63b
Merge branch 'dev/gfdl' into opacity_rescale
Hallberg-NOAA Dec 16, 2021
0544f9f
+(*)Avoid segmentation faults if PEN_SW_NBANDS = 0
Hallberg-NOAA Dec 16, 2021
50df270
Ice dynamics (#35)
OlgaSergienko Dec 17, 2021
12f29f6
Adding temperature restore capability for SPEAR. (#36)
wfcooke Dec 18, 2021
a902e75
+Add US args and rescale dt arg to generic tracers
Hallberg-NOAA Dec 13, 2021
9cb9304
EMC stochastic candidate 20211028 (#1538)
jiandewang Dec 20, 2021
986bc8c
Corrected the unit documentation for 31 variables
Hallberg-NOAA Dec 14, 2021
d244246
+Rescale tides and ramp-up times
Hallberg-NOAA Dec 14, 2021
9a5e218
Merge branch 'main' into main_to_dev_gfdl
marshallward Dec 21, 2021
bf43fd8
Merge pull request #47 from marshallward/main_to_dev_gfdl
adcroft Dec 21, 2021
5d4e8a1
(*)Removed problematic offline tracer lines
Hallberg-NOAA Dec 22, 2021
dad675a
Fix badge URL for codecov
adcroft Dec 22, 2021
34554d0
Merge branch 'dev/gfdl' into offline_tracer_fix
Hallberg-NOAA Dec 22, 2021
e3c0b72
Merge branch 'dev/gfdl' into offline_tracer_fix
Hallberg-NOAA Dec 22, 2021
f35edbd
Bugfix - calculate density integrals in ALE mode w/ pressure_reconstr…
MJHarrison-GFDL Dec 17, 2021
f865b24
Update MOM_PressureForce_FV.F90
marshallward Dec 23, 2021
b628748
Correct comments describing generic_tracer args
Hallberg-NOAA Dec 16, 2021
6bcea76
Fixes an uninitialized logical in FMS_cap
adcroft Dec 22, 2021
d9d82e3
Eliminate unneeded diagnostic arrays in CorAdCalc
Hallberg-NOAA Dec 23, 2021
a8a2039
Merge branch 'dev/gfdl' into opacity_rescale
Hallberg-NOAA Dec 27, 2021
1028ee0
Merge pull request #43 from Hallberg-NOAA/opacity_rescale
marshallward Dec 29, 2021
c32ec97
Merge branch 'dev/gfdl' into offline_tracer_fix
Hallberg-NOAA Dec 29, 2021
5ad8a2c
Deleted commented out offline tracer lines
Hallberg-NOAA Dec 29, 2021
2b2214d
(*)Use por_face_area in zonal_face_thickness
Hallberg-NOAA Dec 23, 2021
e5a5407
Merge branch 'dev/gfdl' into offline_tracer_fix
marshallward Dec 29, 2021
71cf831
Merge pull request #37 from Hallberg-NOAA/offline_tracer_fix
marshallward Dec 29, 2021
2d32631
Option to homogenize forces and fluxes (#51)
breichl Jan 3, 2022
df46be4
Hydrostatic initialization in ice cavities (#41)
MJHarrison-GFDL Jan 6, 2022
f7a2254
Rewrite horizontal regridding to use netCDF wrapper functions (#48)
marshallward Jan 8, 2022
d838ccd
Clean up non-standard syntax and whitespace
Hallberg-NOAA Jan 8, 2022
6da5c9b
Standardize code in calc_sfc_displacement
Hallberg-NOAA Jan 8, 2022
9f0018f
+(*)Change the remapping dzInterface argument sign
Hallberg-NOAA Jan 18, 2022
03a247e
Avoid divide by zero in horizontal_viscosity() with better_bound_kh
adcroft Jan 21, 2022
e63c405
Fix soft-conventional index capitalization in horizontal_viscosity()
adcroft Jan 21, 2022
65998cd
Esmg docs (#57)
kshedstrom Jan 26, 2022
3f58f8a
read_variable_2d modified to accept 3 or 4 dims
marshallward Feb 3, 2022
56401b6
+Add MOM_check_scaling.F90 and MOM_scaling_check.F90
Hallberg-NOAA Dec 22, 2021
75bf521
+Move MOM_scaling_check.F90 to MOM_unique_scales.F90
Hallberg-NOAA Jan 24, 2022
64f432f
Diabatic driver: energetic_PBL -> ePBL, flag check
marshallward Feb 16, 2022
fc5253f
(*)Correct memory declarations in MOM_regridding
Hallberg-NOAA Jan 24, 2022
c166358
Add optional argument to FMS2 version of get_field_size
MJHarrison-GFDL Feb 1, 2022
e841609
remove unnecessary optional flag
MJHarrison-GFDL Feb 2, 2022
6f6d4d6
Merge pull request #1556 from NOAA-GFDL/dev-gfdl-main-candidate-2022-…
marshallward Feb 17, 2022
5f56798
Merge branch 'main' into main_to_dev
marshallward Feb 18, 2022
32e1ecf
Fixes issues with the GME code and get_param calls for Leith options …
gustavo-marques Feb 20, 2022
149073f
Remove hard-wired parameter in adjustEtaToFitBathymetry (#69)
gustavo-marques Feb 20, 2022
712ff9e
Merge branch 'dev/gfdl' into main_to_dev
Hallberg-NOAA Feb 20, 2022
2e72b88
Merge pull request #71 from NOAA-GFDL/main_to_dev
Hallberg-NOAA Feb 21, 2022
d46dbc7
Report mean temperature from MOM_state_stats()
Hallberg-NOAA Dec 16, 2021
9c7bf29
+Add global_mass_int_EFP
Hallberg-NOAA Dec 16, 2021
8197cea
Use global_mass_integral in lateral_bdry_diff
Hallberg-NOAA Dec 16, 2021
1bf8220
(*)+Reproducing tracer stocks
Hallberg-NOAA Dec 16, 2021
a0d0238
(*)+Use reproducing stocks for all tracer packages
Hallberg-NOAA Feb 21, 2022
a468bee
Removed trailing white space
Hallberg-NOAA Feb 23, 2022
9caa701
(+) Refactor of MOM_file_parser
marshallward Feb 23, 2022
cf193a8
Merge pull request #74 from marshallward/file_parser_refactor
Hallberg-NOAA Feb 28, 2022
9a01cd5
+Add ALE options mimicking Hycom
Hallberg-NOAA Feb 26, 2022
4640461
(*)Avoid negative thicknesses in mixed_layer_restrat
Hallberg-NOAA Feb 24, 2022
dadd182
add infrastructure for residual term
Nov 29, 2021
b671a87
add residual term loss on flux
Dec 8, 2021
46d292c
clean up/ move to implicit update
Dec 8, 2021
0120792
parenthesis
Mar 9, 2022
6a208f1
Merge branch 'residualIW' of github.com:raphaeldussin/MOM6 into resid…
Mar 9, 2022
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Read The Docs Status](https://readthedocs.org/projects/mom6/badge/?badge=latest)](http://mom6.readthedocs.io/)
[![codecov](https://codecov.io/gh/NOAA-GFDL/MOM6/branch/dev%2Fmaster/graph/badge.svg)](https://codecov.io/gh/NOAA-GFDL/MOM6)
[![codecov](https://codecov.io/gh/NOAA-GFDL/MOM6/branch/dev/gfdl/graph/badge.svg?token=uF8SVydCdp)](https://codecov.io/gh/NOAA-GFDL/MOM6)

# MOM6

Expand Down
24 changes: 21 additions & 3 deletions config_src/drivers/FMS_cap/MOM_surface_forcing_gfdl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ module MOM_surface_forcing_gfdl
real :: Flux_const !< Piston velocity for surface restoring [Z T-1 ~> m s-1]
real :: Flux_const_salt !< Piston velocity for surface salt restoring [Z T-1 ~> m s-1]
real :: Flux_const_temp !< Piston velocity for surface temp restoring [Z T-1 ~> m s-1]
logical :: trestore_SPEAR_ECDA !< If true, modify restoring data wrt local SSS
real :: SPEAR_dTf_dS !< The derivative of the freezing temperature with salinity.
logical :: salt_restore_as_sflux !< If true, SSS restore as salt flux instead of water flux
logical :: adjust_net_srestore_to_zero !< Adjust srestore to zero (for both salt_flux or vprec)
logical :: adjust_net_srestore_by_scaling !< Adjust srestore w/o moving zero contour
Expand Down Expand Up @@ -346,7 +348,7 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
open_ocn_mask(:,:) = 1.0
if (CS%mask_srestore_under_ice) then ! Do not restore under sea-ice
do j=js,je ; do i=is,ie
if (sfc_state%SST(i,j) <= -0.0539*sfc_state%SSS(i,j)) open_ocn_mask(i,j)=0.0
if (sfc_state%SST(i,j) <= CS%SPEAR_dTf_dS*sfc_state%SSS(i,j)) open_ocn_mask(i,j)=0.0
enddo ; enddo
endif
if (CS%salt_restore_as_sflux) then
Expand Down Expand Up @@ -400,6 +402,14 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
! SST restoring logic
if (CS%restore_temp) then
call time_interp_external(CS%id_trestore, Time, data_restore)
if ( CS%trestore_SPEAR_ECDA ) then
do j=js,je ; do i=is,ie
if (abs(data_restore(i,j)+1.8)<0.0001) then
data_restore(i,j) = CS%SPEAR_dTf_dS*sfc_state%SSS(i,j)
endif
enddo ; enddo
endif

do j=js,je ; do i=is,ie
delta_sst = data_restore(i,j)- sfc_state%SST(i,j)
delta_sst = sign(1.0,delta_sst)*min(abs(delta_sst),CS%max_delta_trestore)
Expand Down Expand Up @@ -1168,8 +1178,8 @@ subroutine apply_force_adjustments(G, US, CS, Time, forces)
tempx_at_h(:,:) = 0.0 ; tempy_at_h(:,:) = 0.0
! Either reads data or leaves contents unchanged
overrode_x = .false. ; overrode_y = .false.
call data_override(G%Domain, 'taux_adj', tempx_at_h, Time, override=overrode_x, scale=Pa_conversion)
call data_override(G%Domain, 'tauy_adj', tempy_at_h, Time, override=overrode_y, scale=Pa_conversion)
call data_override(G%Domain, 'taux_adj', tempx_at_h(isc:iec,jsc:jec), Time, override=overrode_x, scale=Pa_conversion)
call data_override(G%Domain, 'tauy_adj', tempy_at_h(isc:iec,jsc:jec), Time, override=overrode_y, scale=Pa_conversion)

if (overrode_x .or. overrode_y) then
if (.not. (overrode_x .and. overrode_y)) call MOM_error(FATAL,"apply_flux_adjustments: "//&
Expand Down Expand Up @@ -1448,7 +1458,15 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, wind_stagger)
"If true, read a file (temp_restore_mask) containing "//&
"a mask for SST restoring.", default=.false.)

call get_param(param_file, mdl, "SPEAR_ECDA_SST_RESTORE_TFREEZE", CS%trestore_SPEAR_ECDA, &
"If true, modify SST restoring field using SSS state. This only modifies the "//&
"restoring data that is within 0.0001degC of -1.8degC.", default=.false.)
else
CS%trestore_SPEAR_ECDA = .false. ! Needed to toggle logging of SPEAR_DTFREEZE_DS
endif
call get_param(param_file, mdl, "SPEAR_DTFREEZE_DS", CS%SPEAR_dTf_dS, &
"The derivative of the freezing temperature with salinity.", &
units="deg C PSU-1", default=-0.054, do_not_log=.not.CS%trestore_SPEAR_ECDA)

! Optionally read tidal amplitude from input file [Z T-1 ~> m s-1] on model grid.
! Otherwise use default tidal amplitude for bottom frictionally-generated
Expand Down
2 changes: 1 addition & 1 deletion config_src/drivers/mct_cap/ocn_comp_mct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ subroutine ocn_domain_mct( lsize, gsMap_ocn, dom_ocn)
call mct_gGrid_importRattr(dom_ocn,"lat",data,lsize)

k = 0
L2_to_rad2 = grid%US%L_to_m**2 / grid%Rad_Earth**2
L2_to_rad2 = 1.0 / grid%Rad_Earth_L**2
do j = grid%jsc, grid%jec
do i = grid%isc, grid%iec
k = k + 1 ! Increment position within gindex
Expand Down
12 changes: 9 additions & 3 deletions config_src/drivers/nuopc_cap/mom_cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ module MOM_cap_mod
use NUOPC_Model, only: model_label_SetRunClock => label_SetRunClock
use NUOPC_Model, only: model_label_Finalize => label_Finalize
use NUOPC_Model, only: SetVM

!$use omp_lib , only : omp_set_num_threads

implicit none; private
Expand Down Expand Up @@ -1111,7 +1112,7 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
k = k + 1 ! Increment position within gindex
if (mask(k) /= 0) then
mesh_areas(k) = dataPtr_mesh_areas(k)
model_areas(k) = ocean_grid%US%L_to_m**2 * ocean_grid%AreaT(i,j) / ocean_grid%Rad_Earth**2
model_areas(k) = ocean_grid%AreaT(i,j) / ocean_grid%Rad_Earth_L**2
mod2med_areacor(k) = model_areas(k) / mesh_areas(k)
med2mod_areacor(k) = mesh_areas(k) / model_areas(k)
end if
Expand Down Expand Up @@ -1524,7 +1525,7 @@ subroutine ModelAdvance(gcomp, rc)
integer :: nc
type(ESMF_Time) :: MyTime
integer :: seconds, day, year, month, hour, minute
character(ESMF_MAXSTR) :: restartname, cvalue
character(ESMF_MAXSTR) :: restartname, cvalue, stoch_restartname
character(240) :: msgString
character(ESMF_MAXSTR) :: casename
integer :: iostat
Expand Down Expand Up @@ -1738,14 +1739,19 @@ subroutine ModelAdvance(gcomp, rc)
! write the final restart without a timestamp
if (ESMF_AlarmIsRinging(stop_alarm, rc=rc)) then
write(restartname,'(A)')"MOM.res"
write(stoch_restartname,'(A)')"ocn_stoch.res.nc"
else
write(restartname,'(A,I4.4,"-",I2.2,"-",I2.2,"-",I2.2,"-",I2.2,"-",I2.2)') &
"MOM.res.", year, month, day, hour, minute, seconds
write(stoch_restartname,'(A,I4.4,"-",I2.2,"-",I2.2,"-",I2.2,"-",I2.2,"-",I2.2,A)') &
"ocn_stoch.res.", year, month, day, hour, minute, seconds,".nc"
endif
call ESMF_LogWrite("MOM_cap: Writing restart : "//trim(restartname), ESMF_LOGMSG_INFO)

! write restart file(s)
call ocean_model_restart(ocean_state, restartname=restartname)
call ocean_model_restart(ocean_state, restartname=restartname, &
stoch_restartname=stoch_restartname)

endif

if (is_root_pe()) then
Expand Down
26 changes: 25 additions & 1 deletion config_src/drivers/nuopc_cap/mom_ocean_model_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ module MOM_ocean_model_nuopc
use MOM_surface_forcing_nuopc, only : convert_IOB_to_forces, ice_ocn_bnd_type_chksum
use MOM_surface_forcing_nuopc, only : ice_ocean_boundary_type, surface_forcing_CS
use MOM_surface_forcing_nuopc, only : forcing_save_restart
use get_stochy_pattern_mod, only : write_stoch_restart_ocn
use iso_fortran_env, only : int64

#include <MOM_memory.h>
Expand Down Expand Up @@ -176,6 +177,10 @@ module MOM_ocean_model_nuopc
!! steps can span multiple coupled time steps.
logical :: diabatic_first !< If true, apply diabatic and thermodynamic
!! processes before time stepping the dynamics.
logical :: do_sppt !< If true, stochastically perturb the diabatic and
!! write restarts
logical :: pert_epbl !< If true, then randomly perturb the KE dissipation and
!! genration termsand write restarts

real :: eps_omesh !< Max allowable difference between ESMF mesh and MOM6
!! domain coordinates
Expand Down Expand Up @@ -425,6 +430,17 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in, gas_fields_ocn, i
endif

call extract_surface_state(OS%MOM_CSp, OS%sfc_state)
! get number of processors and PE list for stocasthci physics initialization
call get_param(param_file, mdl, "DO_SPPT", OS%do_sppt, &
"If true, then stochastically perturb the thermodynamic "//&
"tendencies of T,S, and h. Amplitude and correlations are "//&
"controlled by the nam_stoch namelist in the UFS model only.", &
default=.false.)
call get_param(param_file, mdl, "PERT_EPBL", OS%pert_epbl, &
"If true, then stochastically perturb the kinetic energy "//&
"production and dissipation terms. Amplitude and correlations are "//&
"controlled by the nam_stoch namelist in the UFS model only.", &
default=.false.)

call close_param_file(param_file)
call diag_mediator_close_registration(OS%diag)
Expand Down Expand Up @@ -686,14 +702,17 @@ subroutine update_ocean_model(Ice_ocean_boundary, OS, Ocean_sfc, &
end subroutine update_ocean_model

!> This subroutine writes out the ocean model restart file.
subroutine ocean_model_restart(OS, timestamp, restartname, num_rest_files)
subroutine ocean_model_restart(OS, timestamp, restartname, stoch_restartname, num_rest_files)
type(ocean_state_type), pointer :: OS !< A pointer to the structure containing the
!! internal ocean state being saved to a restart file
character(len=*), optional, intent(in) :: timestamp !< An optional timestamp string that should be
!! prepended to the file name. (Currently this is unused.)
character(len=*), optional, intent(in) :: restartname !< Name of restart file to use
!! This option distinguishes the cesm interface from the
!! non-cesm interface
character(len=*), optional, intent(in) :: stoch_restartname !< Name of restart file to use
!! This option distinguishes the cesm interface from the
!! non-cesm interface
integer, optional, intent(out) :: num_rest_files !< number of restart files written

if (.not.MOM_state_is_synchronized(OS%MOM_CSp)) &
Expand Down Expand Up @@ -733,6 +752,11 @@ subroutine ocean_model_restart(OS, timestamp, restartname, num_rest_files)
endif
endif
endif
if (present(stoch_restartname)) then
if (OS%do_sppt .OR. OS%pert_epbl) then
call write_stoch_restart_ocn('RESTART/'//trim(stoch_restartname))
endif
endif

end subroutine ocean_model_restart
! </SUBROUTINE> NAME="ocean_model_restart"
Expand Down
3 changes: 2 additions & 1 deletion config_src/drivers/solo_driver/MOM_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ program MOM_main
"The default value is given by DT.", units="s", default=dt)
if (offline_tracer_mode) then
call get_param(param_file, mod_name, "DT_OFFLINE", dt_forcing, &
"Time step for the offline time step")
"Length of time between reading in of input fields", &
units='s', fail_if_missing=.true.)
dt = dt_forcing
endif
ntstep = MAX(1,ceiling(dt_forcing/dt - 0.001))
Expand Down
7 changes: 6 additions & 1 deletion config_src/drivers/unit_drivers/MOM_sum_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ program MOM_main
use MOM_io, only : MOM_io_init, file_exists, open_file, close_file
use MOM_io, only : check_nml_error, io_infra_init, io_infra_end
use MOM_io, only : APPEND_FILE, ASCII_FILE, READONLY_FILE, SINGLE_FILE
use MOM_unit_scaling, only : unit_scale_type, unit_no_scaling_init, unit_scaling_end

implicit none

Expand All @@ -39,6 +40,8 @@ program MOM_main
type(hor_index_type) :: HI ! A hor_index_type for array extents
type(param_file_type) :: param_file ! The structure indicating the file(s)
! containing all run-time parameters.
type(unit_scale_type), pointer :: US => NULL() !< A structure containing various unit
! conversion factors, but in this case all are 1.
real :: max_depth ! The maximum ocean depth [m]
integer :: verbosity
integer :: num_sums
Expand Down Expand Up @@ -104,7 +107,8 @@ program MOM_main
allocate(depth_tot_fastR(num_sums)) ; depth_tot_fastR(:) = 0.0

! Set up the parameters of the physical grid
call set_grid_metrics(grid, param_file)
call unit_no_scaling_init(US)
call set_grid_metrics(grid, param_file, US)

! Set up the bottom depth, grid%bathyT either analytically or from file
call get_param(param_file, "MOM", "MAXIMUM_DEPTH", max_depth, &
Expand Down Expand Up @@ -162,6 +166,7 @@ program MOM_main
enddo

call destroy_dyn_horgrid(grid)
call unit_scaling_end(US)
call io_infra_end ; call MOM_infra_end

contains
Expand Down
Loading