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
1,741 changes: 1,741 additions & 0 deletions docs/ocean/design_docs/tides/ametsoc.bst

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions docs/ocean/design_docs/tides/tides.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

@incollection{chassignet_primer_2018,
title = {A {Primer} on {Global} {Internal} {Tide} and {Internal} {Gravity} {Wave} {Continuum} {Modeling} in {HYCOM} and {MITgcm}},
isbn = {978-1-72054-997-0},
url = {http://purl.flvc.org/fsu/fd/FSU_libsubv1_scholarship_submission_1536242074_55feafcc},
language = {en},
urldate = {2018-10-23},
booktitle = {New {Frontiers} in {Operational} {Oceanography}},
publisher = {GODAE OceanView},
author = {Arbic, Brian K. and Alford, Matthew H. and Ansong, Joseph K. and Buijsman, Maarten C. and Ciotti, Robert B. and Farrar, J. Thomas and Hallberg, Robert W. and Henze, Christopher E. and Hill, Christopher N. and Luecke, Conrad A. and Menemenlis, Dimitris and Metzger, E. Joseph and Müeller, Malte and Nelson, Arin D. and Nelson, Bron C. and Ngodock, Hans E. and Ponte, Rui M. and Richman, James G. and Savage, Anna C. and Scott, Robert B. and Shriver, Jay F. and Simmons, Harper L. and Souopgui, Innocent and Timko, Patrick G. and Wallcraft, Alan J. and Zamudio, Luis and Zhao, Zhongxiang},
editor = {Chassignet, Eric P. and Pascual, Ananda and Tintoré, Joaquin and Verron, Jacques},
month = aug,
year = {2018},
doi = {10.17125/gov2018.ch13},
file = {Arbic et al. - 2018 - A Primer on Global Internal Tide and Internal Grav.pdf:/Users/pwolfram/Zotero/storage/TEDRP9CP/Arbic et al. - 2018 - A Primer on Global Internal Tide and Internal Grav.pdf:application/pdf}
}

@article{Luettich1992ADCIRC,
author={Luettich, R.A. and Westerink, J.J. and Scheffner, N.W.},
title = {{ADCIRC}: {An} {Advanced} {Three}-{Dimensional} {Circulation} {Model} for {Shelves}, {Coasts}, and {Estuaries}. {Report} 1. {Theory} and {Methodology} of {ADCIRC-2DDI} and {ADCIRC-3DL}.},
language = {en},
pages = {143},
year={1992}
}

@article{arbic2004accuracy,
title={The accuracy of surface elevations in forward global barotropic and baroclinic tide models},
author={Arbic, Brian K and Garner, Stephen T and Hallberg, Robert W and Simmons, Harper L},
journal={Deep Sea Research Part II: Topical Studies in Oceanography},
volume={51},
number={25-26},
pages={3069--3101},
year={2004},
publisher={Elsevier}
}
359 changes: 359 additions & 0 deletions docs/ocean/design_docs/tides/tides.tex

Large diffs are not rendered by default.

109 changes: 109 additions & 0 deletions src/core_ocean/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@
description="Number of forcing groups"
definition="4"
/>
<dim name="maxTidalConstituents"
description="Max number of tidal potential constituents"
definition="37"
/>
</dims>

<!--*************************************-->
Expand Down Expand Up @@ -853,6 +857,56 @@
possible_values="Any positive real number."
/>
</nml_record>
<nml_record name="tidal_potential_forcing" mode="forward">
<nml_option name="config_use_tidal_potential_forcing" type="logical" default_value=".false." units="unitless"
description="Controls if tidal potential forcing is used."
possible_values=".true. or .false."
/>
<nml_option name="config_tidal_potential_reference_time" type="character" default_value="0001-01-01_00:00:00" units="unitless"
description="Timestamp describing the time used to initialize nodal factors."
possible_values="'YYYY-MM-DD_HH:MM:SS'"
/>
<nml_option name="config_use_tidal_potential_forcing_M2" type="logical" default_value=".true." units="unitless"
description="Controls if tidal potential forcing for the M2 constituent is used."
possible_values=".true. or .false."
/>
<nml_option name="config_use_tidal_potential_forcing_S2" type="logical" default_value=".true." units="unitless"
description="Controls if tidal potential forcing for the S2 constituent is used."
possible_values=".true. or .false."
/>
<nml_option name="config_use_tidal_potential_forcing_N2" type="logical" default_value=".true." units="unitless"
description="Controls if tidal potential forcing for the N2 constituent is used."
possible_values=".true. or .false."
/>
<nml_option name="config_use_tidal_potential_forcing_K2" type="logical" default_value=".true." units="unitless"
description="Controls if tidal potential forcing for the K2 constituent is used."
possible_values=".true. or .false."
/>
<nml_option name="config_use_tidal_potential_forcing_K1" type="logical" default_value=".true." units="unitless"
description="Controls if tidal potential forcing for the K1 constituent is used."
possible_values=".true. or .false."
/>
<nml_option name="config_use_tidal_potential_forcing_O1" type="logical" default_value=".true." units="unitless"
description="Controls if tidal potential forcing for the O1 constituent is used."
possible_values=".true. or .false."
/>
<nml_option name="config_use_tidal_potential_forcing_Q1" type="logical" default_value=".true." units="unitless"
description="Controls if tidal potential forcing for the Q1 constituent is used."
possible_values=".true. or .false."
/>
<nml_option name="config_use_tidal_potential_forcing_P1" type="logical" default_value=".true." units="unitless"
description="Controls if tidal potential forcing for the P1 constituent is used."
possible_values=".true. or .false."
/>
<nml_option name="config_tidal_potential_ramp" type="real" default_value="10.0" units="days"
description="Number of days over which the tidal potential forcing is ramped"
possible_values="Any positive real number"
/>
<nml_option name="config_self_attraction_and_loading_beta" type="real" default_value="0.09" units="unitless"
description="Coefficient for SAL scalar approximation"
possible_values="0.0 to turn off, 0.09 is typical value to use for scalar approximation"
/>
</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 @@ -1373,6 +1427,7 @@
<package name="cullCells" description="This package controls variables that provide information on what cells should be culled."/>
<package name="tracerBudget" description="This package controls variables that record the tracer budget."/>
<package name="gm" description="This package is for GM variables, which are only needed at lower resolutions."/>
<package name="tidalPotentialForcingPKG" description="This package controls variables required for tidal potential forcing"/>
</packages>

<streams>
Expand Down Expand Up @@ -3171,6 +3226,60 @@
description="surface pressure forcing due to weight of frazil ice"
packages="frazilIce"
/>

<!-- Fields for tidal potential forcing -->
<var name="tidalPotentialEta" type="real" dimensions="nCells Time" units="m"
description="Equilibrium tidal potential"
packages="forwardMode"
/>
<var name="nTidalPotentialConstituents" type="integer" dimensions="Time" units="unitless"
description="Number of tidal constituents"
packages="tidalPotentialForcingPKG"
/>
<var name="tidalPotentialConstituentFrequency" type="real" dimensions="maxTidalConstituents Time" units="s^{-1}"
description="Frequency of tidal constituents"
packages="tidalPotentialForcingPKG"
/>
<var name="tidalPotentialConstituentAmplitude" type="real" dimensions="maxTidalConstituents Time" units="m"
description="Amplitude of tidal constituents"
packages="tidalPotentialForcingPKG"
/>
<var name="tidalPotentialConstituentLoveNumbers" type="real" dimensions="maxTidalConstituents Time" units="unitless"
description="Love number combinations for tidal constituents"
packages="tidalPotentialForcingPKG"
/>
<var name="tidalPotentialConstituentNodalAmplitude" type="real" dimensions="maxTidalConstituents Time" units="m"
description="Amplitude nodal factor for tidal constituents"
packages="tidalPotentialForcingPKG"
/>
<var name="tidalPotentialConstituentNodalPhase" type="real" dimensions="maxTidalConstituents Time" units="s^{-1}"
description="Phase nodal factor for tidal constituents"
packages="tidalPotentialForcingPKG"
/>
<var name="tidalPotentialConstituentAstronomical" type="real" dimensions="maxTidalConstituents Time" units="s^{-1}"
description="Astronomical argument for tidal constituents"
packages="tidalPotentialForcingPKG"
/>
<var name="tidalPotentialConstituentType" type="integer" dimensions="maxTidalConstituents Time" units="unitless"
description="Spieces code for tidal constituents: long-period = 0, diurnal = 1, semi-diurnal = 2"
packages="tidalPotentialForcingPKG"
/>
<var name="tidalPotentialLatitudeFunction" type="real" dimensions="nCells R3 Time" units="unitless"
description="Latitude function for tidal constituents: long-period = 3\sin^2(\phi)-1, diurnal = \sin(2\phi), semi-diurnal = \cos^2(\phi)"
packages="tidalPotentialForcingPKG"
/>
<var name="tidalPotentialZMid" type="real" dimensions="nVertLevels nCells Time" units="m"
description="zMid - Equilibrium tidal potential in RK4"
packages="tidalPotentialForcingPKG"
/>
<var name="sshSubcycleCurWithTides" type="real" dimensions="nCells Time" units="m"
description="SSH - tidal potential in split explicit "
packages="tidalPotentialForcingPKG"
/>
<var name="sshSubcycleNewWithTides" type="real" dimensions="nCells Time" units="m"
description="SSH - tidal potential in split explicit "
packages="tidalPotentialForcingPKG"
/>
</var_struct>
<var_struct name="timeVaryingForcing" time_levs="1">
<var name="windSpeedU" type="real" dimensions="nCells Time" units="m/s"
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 @@ -120,6 +120,7 @@ function ocn_setup_packages(configPool, packagePool, iocontext) result(ierr)!{{{
logical, pointer :: thicknessBulkPKGActive
logical, pointer :: frazilIceActive
logical, pointer :: tidalForcingActive
logical, pointer :: tidalPotentialForcingPKGActive
logical, pointer :: inSituEOSActive
logical, pointer :: variableShortwaveActive
logical, pointer :: gmActive
Expand Down Expand Up @@ -148,6 +149,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_tidal_potential_forcing
logical, pointer :: config_use_standardGM
logical, pointer :: config_use_time_varying_atmospheric_forcing
logical, pointer :: config_use_time_varying_land_ice_forcing
Expand Down Expand Up @@ -285,6 +287,15 @@ function ocn_setup_packages(configPool, packagePool, iocontext) result(ierr)!{{{
tidalForcingActive = .true.
end if

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

!
! test for form of pressure gradient computation
!
Expand Down
3 changes: 3 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 @@ -55,6 +55,7 @@ module ocn_forward_mode
use ocn_surface_land_ice_fluxes
use ocn_frazil_forcing
use ocn_tidal_forcing
use ocn_tidal_potential_forcing

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

call ocn_tracer_hmix_init(err_tmp)
ierr = ior(ierr, err_tmp)
Expand Down
48 changes: 48 additions & 0 deletions src/core_ocean/mode_forward/mpas_ocn_time_integration_split.F
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,13 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
logical, pointer :: config_use_cvmix_kpp
logical, pointer :: config_use_tracerGroup
logical, pointer :: config_compute_active_tracer_budgets
logical, pointer :: config_use_tidal_potential_forcing

character (len=StrKIND), pointer :: config_land_ice_flux_mode

real (kind=RKIND), pointer :: config_mom_del4, config_btr_gam1_velWt1, config_btr_gam2_SSHWt1
real (kind=RKIND), pointer :: config_btr_gam3_velWt2
real (kind=RKIND), pointer :: config_self_attraction_and_loading_beta

! Dimensions
integer :: nCells, nEdges
Expand All @@ -166,6 +168,7 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{

! State Array Pointers
real (kind=RKIND), dimension(:), pointer :: sshSubcycleCur, sshSubcycleNew
real (kind=RKIND), dimension(:), pointer :: sshSubcycleCurWithTides, sshSubcycleNewWithTides
real (kind=RKIND), dimension(:), pointer :: normalBarotropicVelocitySubcycleCur, normalBarotropicVelocitySubcycleNew
real (kind=RKIND), dimension(:), pointer :: sshCur, sshNew
real (kind=RKIND), dimension(:), pointer :: normalBarotropicVelocityCur, normalBarotropicVelocityNew
Expand Down Expand Up @@ -193,6 +196,7 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
real (kind=RKIND), dimension(:), pointer :: gradSSHX, gradSSHY, gradSSHZ
real (kind=RKIND), dimension(:), pointer :: gradSSHZonal, gradSSHMeridional
real (kind=RKIND), dimension(:,:), pointer :: surfaceVelocity, SSHGradient
real (kind=RKIND), dimension(:), pointer :: tidalPotentialEta

! Diagnostics Field Pointers
type (field2DReal), pointer :: normalizedRelativeVorticityEdgeField, divergenceField, relativeVorticityField
Expand Down Expand Up @@ -243,6 +247,8 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
call mpas_pool_get_config(domain % configs, 'config_disable_vel_all_tend', config_disable_vel_all_tend)
call mpas_pool_get_config(domain % configs, 'config_disable_thick_all_tend', config_disable_thick_all_tend)
call mpas_pool_get_config(domain % configs, 'config_disable_tr_all_tend', config_disable_tr_all_tend)
call mpas_pool_get_config(domain % configs, 'config_use_tidal_potential_forcing', config_use_tidal_potential_forcing)
call mpas_pool_get_config(domain % configs, 'config_self_attraction_and_loading_beta',config_self_attraction_and_loading_beta)

call mpas_pool_get_config(domain % configs, 'config_prescribe_velocity', config_prescribe_velocity)
call mpas_pool_get_config(domain % configs, 'config_prescribe_thickness', config_prescribe_thickness)
Expand Down Expand Up @@ -781,6 +787,7 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
call mpas_pool_get_subpool(block % structs, 'state', statePool)
call mpas_pool_get_subpool(statePool, 'tracers', tracersPool)
call mpas_pool_get_subpool(block % structs, 'diagnostics', diagnosticsPool)
call mpas_pool_get_subpool(block % structs, 'forcing', forcingPool)

call mpas_pool_get_array(meshPool, 'cellsOnEdge', cellsOnEdge)
call mpas_pool_get_array(meshPool, 'nEdgesOnEdge', nEdgesOnEdge)
Expand All @@ -798,6 +805,24 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{

call mpas_pool_get_array(diagnosticsPool, 'barotropicForcing', barotropicForcing)

! Subtract tidal potential from ssh, if needed
! Subtract the tidal potential from the current subcycle ssh and store and a work array.
! Then point sshSubcycleCur to the work array so the tidal potential terms are included
! in the grad operator inside the edge loop.
if (config_use_tidal_potential_forcing) then
call mpas_pool_get_array(forcingPool, 'sshSubcycleCurWithTides', sshSubcycleCurWithTides)
call mpas_pool_get_array(forcingPool, 'tidalPotentialEta', tidalPotentialEta)
call mpas_pool_get_dimension(block % dimensions, 'nCells', nCellsPtr)

nCells = nCellsPtr
do iCell = 1, nCells
sshSubcycleCurWithTides(iCell) = sshSubcycleCur(iCell) - tidalPotentialEta(iCell) &
- config_self_attraction_and_loading_beta * sshSubcycleCur(iCell)
end do

call mpas_pool_get_array(forcingPool, 'sshSubcycleCurWithTides', sshSubcycleCur)
Comment thread
sbrus89 marked this conversation as resolved.
Outdated
end if

nEdges = nEdgesPtr
nEdges = nEdgesArray( edgeHaloComputeCounter )

Expand Down Expand Up @@ -977,6 +1002,7 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
call mpas_pool_get_subpool(block % structs, 'state', statePool)
call mpas_pool_get_subpool(statePool, 'tracers', tracersPool)
call mpas_pool_get_subpool(block % structs, 'mesh', meshPool)
call mpas_pool_get_subpool(block % structs, 'forcing', forcingPool)
call mpas_pool_get_subpool(block % structs, 'diagnostics', diagnosticsPool)
call mpas_pool_get_subpool(block % structs, 'scratch', scratchPool)

Expand All @@ -1000,6 +1026,28 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
call mpas_pool_get_field(scratchPool, 'btrvel_temp', btrvel_tempField)
btrvel_temp => btrvel_tempField % array

! Subtract tidal potential from ssh, if needed
! Subtract the tidal potential from the current and new subcycle ssh and store and a work arrays.
! Then point sshSubcycleCur and ssh SubcycleNew to the work arrays so the tidal potential terms
! are included in the grad operator inside the edge loop.
if (config_use_tidal_potential_forcing) then
call mpas_pool_get_array(forcingPool,'sshSubcycleCurWithTides', sshSubcycleCurWithTides)
call mpas_pool_get_array(forcingPool,'sshSubcycleNewWithTides', sshSubcycleNewWithTides)
call mpas_pool_get_array(forcingPool, 'tidalPotentialEta', tidalPotentialEta)
call mpas_pool_get_dimension(block % dimensions, 'nCells', nCellsPtr)

nCells = nCellsPtr
do iCell = 1, nCells
sshSubcycleCurWithTides(iCell) = sshSubcycleCur(iCell) - tidalPotentialEta(iCell) &
- config_self_attraction_and_loading_beta * sshSubcycleCur(iCell)
sshSubcycleNewWithTides(iCell) = sshSubcycleNew(iCell) - tidalPotentialEta(iCell) &
- config_self_attraction_and_loading_beta * sshSubcycleNew(iCell)
end do

call mpas_pool_get_array(forcingPool,'sshSubcycleCurWithTides', sshSubcycleCur)
call mpas_pool_get_array(forcingPool,'sshSubcycleNewWithTides', sshSubcycleNew)
end if

! Need to initialize btr_vel_temp over the one more halo than we're computing over
nEdges = nEdgesPtr

Expand Down
Loading