Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
39 changes: 39 additions & 0 deletions src/core_ocean/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,32 @@
possible_values="Real Values greater than zero less than bottomDepth"
/>
</nml_record>
<nml_record name="tidal_forcing" mode="init;forward">
<nml_option name="config_use_tidal_forcing" type="logical" default_value=".false." units="unitless"
description="Controls if tidal forcing is used."
possible_values=".true. or .false."
/>
<nml_option name="config_use_tidal_forcing_tau" type="real" default_value="10000" units="s"
description="Controls time scale for relaxation of tidal forcing."
possible_values="Real non-zero value."
/>
<nml_option name="config_tidal_forcing_type" type="character" default_value="off" units="unitless"
description="Selects the mode in which tidal forcing is computed."
possible_values="'off','monochromatic'"
/>
<nml_option name="config_tidal_forcing_monochromatic_amp" type="real" default_value="2.0" units="m"
description="Value of amplitude of monochromatic tide."
possible_values="Any positive real number."
/>
<nml_option name="config_tidal_forcing_monochromatic_period" type="real" default_value="0.5" units="days"
description="Value of period of monochromatic tide."
possible_values="Any positive real number."
/>
<nml_option name="config_tidal_forcing_monochromatic_baseline" type="real" default_value="0.0" units="days"
description="Value of baseline monochromatic tide, e.g., sea level rise."
possible_values="Any positive real number."
/>
</nml_record>
<nml_record name="frazil_ice" mode="forward">
<nml_option name="config_use_frazil_ice_formation" type="logical" default_value=".false." units="unitless"
description="Controls if fluxes related to frazil ice process are computed."
Expand Down Expand Up @@ -1252,6 +1278,7 @@
<package name="landIceFluxesPKG" description="This package includes varibles required for land ice thickness, momentum and tracer fluxes."/>
<package name="landIceCouplingPKG" description="This package includes varibles required for land ice coupling but not land ice fluxes in standalone mode."/>
<package name="frazilIce" description="This package includes variables required for frazil ice formation."/>
<package name="tidalForcing" description="This package includes variables required for tidal forcing on a boundary."/>
<package name="inSituEOS" description="This package includes variables required for to compute in situ equation of state derivatives, like thermal expansion and haline contraction."/>
<package name="forwardMode" description="This package controls variables that are intended to be used within the forward run mode of the ocean model."/>
<package name="analysisMode" description="This package controls variables that are intended to be used within the analysis run mode of the ocean model."/>
Expand Down Expand Up @@ -3003,6 +3030,18 @@
packages="landIceCouplingPKG"
/>

<!-- Input fields for forcing due to tides -->
<var name="tidalInputMask" type="real" dimensions="nCells" units="unitless"
description="Input mask for application of tidal forcing where 1 is applied tidal forcing"
packages="tidalForcing"
/>

<!-- Output fields for forcing due to tides -->
<var name="tidalLayerThicknessTendency" type="real" dimensions="nVertLevels nCells Time" units="m s^{-1}"
description="layer thickness tendency due to tidal forcing"
packages="tidalForcing"
/>

<!-- Input fields for forcing due to frazil ice -->

<!-- Output fields for forcing due to frazil ice -->
Expand Down
11 changes: 11 additions & 0 deletions src/core_ocean/driver/mpas_ocn_core_interface.F
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ function ocn_setup_packages(configPool, packagePool, iocontext) result(ierr)!{{{
logical, pointer :: landIceCouplingPKGActive
logical, pointer :: thicknessBulkPKGActive
logical, pointer :: frazilIceActive
logical, pointer :: tidalForcingActive
logical, pointer :: inSituEOSActive
logical, pointer :: variableShortwaveActive
logical, pointer :: gmActive
Expand All @@ -145,6 +146,7 @@ function ocn_setup_packages(configPool, packagePool, iocontext) result(ierr)!{{{

logical, pointer :: config_use_freq_filtered_thickness
logical, pointer :: config_use_frazil_ice_formation
logical, pointer :: config_use_tidal_forcing
logical, pointer :: config_use_standardGM
logical, pointer :: config_use_time_varying_atmospheric_forcing

Expand Down Expand Up @@ -272,6 +274,15 @@ function ocn_setup_packages(configPool, packagePool, iocontext) result(ierr)!{{{
frazilIceActive = .true.
end if

!
! test for use of tidal forcing, tidalForcingActive
!
call mpas_pool_get_package(packagePool, 'tidalForcingActive', tidalForcingActive)
call mpas_pool_get_config(configPool, 'config_use_tidal_forcing', config_use_tidal_forcing)
if (config_use_tidal_forcing) then
tidalForcingActive = .true.
end if

!
! test for form of pressure gradient computation
!
Expand Down
5 changes: 5 additions & 0 deletions src/core_ocean/mode_forward/mpas_ocn_forward_mode.F
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ module ocn_forward_mode
use ocn_surface_bulk_forcing
use ocn_surface_land_ice_fluxes
use ocn_frazil_forcing
use ocn_tidal_forcing

use ocn_tracer_hmix
use ocn_tracer_hmix_redi
Expand Down Expand Up @@ -218,6 +219,8 @@ function ocn_forward_mode_init(domain, startTimeStamp) result(ierr)!{{{
ierr = ior(ierr, err_tmp)
call ocn_frazil_forcing_init(err_tmp)
ierr = ior(ierr, err_tmp)
call ocn_tidal_forcing_init(err_tmp)
ierr = ior(ierr, err_tmp)

call ocn_tracer_hmix_init(err_tmp)
ierr = ior(ierr, err_tmp)
Expand Down Expand Up @@ -583,6 +586,8 @@ function ocn_forward_mode_run(domain) result(ierr)!{{{
call mpas_timer_stop("land_ice_build_arrays")

call ocn_frazil_forcing_build_arrays(domain, meshPool, forcingPool, diagnosticsPool, statePool, err)

call ocn_tidal_forcing_build_array(domain, meshPool, forcingPool, diagnosticsPool, statePool, err)

block_ptr => block_ptr % next
end do
Expand Down
5 changes: 4 additions & 1 deletion src/core_ocean/mode_init/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ TEST_CASES = mpas_ocn_init_baroclinic_channel.o \
mpas_ocn_init_sea_mount.o \
mpas_ocn_init_global_ocean.o \
mpas_ocn_init_isomip.o \
mpas_ocn_init_isomip_plus.o
mpas_ocn_init_isomip_plus.o \
mpas_ocn_init_tidal_boundary.o
#mpas_ocn_init_TEMPLATE.o

all: init_mode
Expand Down Expand Up @@ -73,6 +74,8 @@ mpas_ocn_init_isomip_plus.o: $(UTILS)

mpas_ocn_init_ziso.o: $(UTILS)

mpas_ocn_init_tidal_boundary.o: $(UTILS)

#mpas_ocn_init_TEMPLATE.o: $(UTILS)

clean:
Expand Down
1 change: 1 addition & 0 deletions src/core_ocean/mode_init/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
#include "Registry_sea_mount.xml"
#include "Registry_isomip.xml"
#include "Registry_isomip_plus.xml"
#include "Registry_tidal_boundary.xml"
// #include "Registry_TEMPLATE.xml"
30 changes: 30 additions & 0 deletions src/core_ocean/mode_init/Registry_tidal_boundary.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<nml_record name="tidal_boundary" mode="init" configuration="tidal_boundary">
<nml_option name="config_tidal_boundary_vert_levels" type="integer" default_value="100" units="unitless"
description="Number of vertical levels in tidal_boundary test case. Typical values are 40 and 100."
possible_values="Any positive integer number greater than 0."
/>
<nml_option name="config_tidal_boundary_right_bottom_depth" type="real" default_value="10.0" units="m"
description="Depth of the bottom of the ocean in northern-most end.
possible_values="Any positive real value greater than 0."
/>
<nml_option name="config_tidal_boundary_left_bottom_depth" type="real" default_value="10.0" units="m"
description="Depth of the bottom of the ocean in southern-most end.
possible_values="Any positive real value greater than 0."
/>
<nml_option name="config_tidal_boundary_salinity" type="real" default_value="35.0" units="PSU"
description="Salinity of the water in the entire domain."
possible_values="Any real number greater than 0."
/>
<nml_option name="config_tidal_boundary_domain_temperature" type="real" default_value="20.0" units="deg C"
description="Temperature of water outside of the plug."
possible_values="Any real number"
/>
<nml_option name="config_tidal_boundary_plug_temperature" type="real" default_value="20.0" units="deg C"
description="Temperature of water in plug."
possible_values="Any real number"
/>
<nml_option name="config_tidal_boundary_plug_width_frac" type="real" default_value="0.10" units="fraction"
description="Fraction of the domain the plug should take up initially. Only in the y direction."
possible_values="Any real number between 0 and 1."
/>
</nml_record>
4 changes: 4 additions & 0 deletions src/core_ocean/mode_init/mpas_ocn_init_mode.F
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ module ocn_init_mode
use ocn_init_sea_mount
use ocn_init_isomip
use ocn_init_isomip_plus
use ocn_init_tidal_boundary

implicit none
private
Expand Down Expand Up @@ -280,6 +281,7 @@ function ocn_init_mode_run(domain) result(iErr)!{{{
call ocn_init_setup_sea_mount(domain, ierr)
call ocn_init_setup_isomip(domain, ierr)
call ocn_init_setup_isomip_plus(domain, ierr)
call ocn_init_setup_tidal_boundary(domain, ierr)
!call ocn_init_setup_TEMPLATE(domain, ierr)

call mpas_log_write( ' Completed setup of: ' // trim(config_init_configuration))
Expand Down Expand Up @@ -383,6 +385,8 @@ subroutine ocn_init_mode_validate_configuration(configPool, packagePool, ioconte
iErr = ior(iErr, err_tmp)
call ocn_init_validate_isomip_plus(configPool, packagePool, iocontext, iErr=err_tmp)
iErr = ior(iErr, err_tmp)
call ocn_init_validate_tidal_boundary(configPool, packagePool, iocontext, iErr=err_tmp)
iErr = ior(iErr, err_tmp)
! call ocn_init_validate_TEMPLATE(configPool, packagePool, iocontext, iErr=err_tmp)
! iErr = ior(iErr, err_tmp)
end subroutine ocn_init_mode_validate_configuration!}}}
Expand Down
Loading