Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
50fc6dd
move all calls to mpas_pool_get_config in mpas_ocn_diagnostics.F to i…
mattdturner Nov 26, 2019
e0eee93
Replace calls to mpas_allocate_scratch_field with straight allocates …
mattdturner Dec 3, 2019
aabd9d7
Move indexTemperature and indexSalanity retrieval to mod_diagnostics_…
mattdturner Dec 4, 2019
10470b7
Move retrieval of temperature and salinity indices back to subroutine…
mattdturner Dec 4, 2019
0419ab3
Update makefile dependencies in shared/
mattdturner Jan 31, 2020
5efd947
Remove scratch allocation and get_config in shared
mattdturner Feb 10, 2020
6e0ccd6
Remove calls to mpas_pool_get_config in fwd mode
mattdturner Jan 31, 2020
1322be5
Replace scratch allocates in mode_forward/
mattdturner Jan 31, 2020
555b1ce
Remove unused variables in surface_land_ice_fluxes
mattdturner Jan 31, 2020
7dd6d7c
Remove calls to mpas_pool_get_config in driver/
mattdturner Jan 31, 2020
0152772
Remove scratch allocate and get_config in init
mattdturner Jan 31, 2020
1947b21
Remove scratch allocates & get_config in analysis
mattdturner Jan 31, 2020
9f9c14b
Remove scratch variables from Registry
mattdturner Feb 12, 2020
a5e3d37
Remove unused field variables for scratch vars
mattdturner Feb 12, 2020
883e699
Remove unused scratchPool from argument lists
mattdturner Feb 12, 2020
8fffa39
Fix but in mpas_ocn_tendency that caused crashes
mattdturner Feb 14, 2020
a4eee0c
Correct bug in okubo_weiss
mattdturner Feb 18, 2020
47d8aee
Correct bugs in scratch allocation array sizes
mattdturner Feb 19, 2020
8cda5f9
Clean our Registry.xml
mattdturner Feb 27, 2020
2f9388f
Revert mode_init and analysis_members changes
mattdturner Jun 30, 2020
68b631a
Resolve additional merge conflicts
mattdturner Jul 1, 2020
a108011
Replace `=` with `=>` for pointers in eqn of state
mattdturner Jul 2, 2020
88dd08b
Add back Registry variables
mattdturner Jul 6, 2020
26a4788
Bugfixes after rebasing
mattdturner Jul 15, 2020
fcb43a7
Change atmosphericPressure to default 0.0
mark-petersen Jul 19, 2020
bab5758
Revert mode_forward/ and Registry.xml changes
mattdturner Jul 22, 2020
1a7a775
Bugfix after rebase
mattdturner Jul 28, 2020
950575c
Add comments to recent bugfix
mattdturner Jul 28, 2020
cd11746
Make sure nEdges is defined before allocates
mattdturner Jul 28, 2020
82bc4ed
Add private variables in thick_ale
mattdturner Jul 29, 2020
a48645f
Change maxLevelEdgeBot to maxLevelEdgeTop on flux calculations
mark-petersen Aug 3, 2020
296d074
Remove nVertLevel arrays from openmp private
mark-petersen Aug 3, 2020
cd7c385
Remove SSH_ALE_thickness variable
mark-petersen Aug 3, 2020
f198e6f
Add private index variables
mark-petersen Aug 3, 2020
9501f53
Change three variables back to scratch
mark-petersen Aug 3, 2020
e0877d6
Remove scratch variables from Registry
mattdturner Aug 4, 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
268 changes: 0 additions & 268 deletions src/core_ocean/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1752,8 +1752,6 @@
<var name="iceFraction"/>
<var name="windSpeed10m"/>
<var name="nAccumulatedCoupled"/>
<var name="thermalExpansionCoeff"/>
<var name="salineContractionCoeff"/>
<var name="landIceFraction"/>
<var name="landIceMask"/>
<var_array name="landIceInterfaceTracers"/>
Expand Down Expand Up @@ -3125,65 +3123,6 @@
/>
</var_struct>
<var_struct name="scratch" time_levs="1">
<var name="normalThicknessFlux" persistence="scratch" type="real" dimensions="nVertLevels nEdges Time"
units="m^{2} s^{-1}"
description="Flux of thickness through an edge"
/>
<var name="normalThicknessFluxSum" persistence="scratch" type="real" dimensions="nEdges Time"
units="m^{2} s^{-1}"
description="Flux of thickness through an edge over full column, sum(h*u)"
/>
<var name="layerThicknessSumEdge" persistence="scratch" type="real" dimensions="nEdges Time"
units="m"
description="total thickness at edge, sum(h)"
/>
<var name="vorticityGradientTangentialComponent"
persistence="scratch"
type="real" dimensions="nVertLevels nEdges Time"
units="s^{-1} m^{-1}"
description="gradient of vorticity in the tangent direction (positive points from vertex1 to vertex2)"
/>
<var name="vorticityGradientNormalComponent"
persistence="scratch"
type="real" dimensions="nVertLevels nEdges Time"
units="s^{-1} m^{-1}"
description="gradient of vorticity in the normal direction (positive points from cell1 to cell2)"
/>
<var name="normalizedRelativeVorticityVertex"
persistence="scratch"
type="real" dimensions="nVertLevels nVertices Time" units="s^{-1}"
description="curl of horizontal velocity divided by layer thickness, defined at vertices"
/>
<var name="normalizedPlanetaryVorticityVertex"
persistence="scratch"
type="real" dimensions="nVertLevels nVertices Time" units="s^{-1}"
description="earth's rotational rate (Coriolis parameter, f) divided by layer thickness, defined at vertices"
/>
<var name="kineticEnergyVertex"
persistence="scratch"
type="real" dimensions="nVertLevels nVertices Time" units="m^2 s^{-2}"
description="kinetic energy of horizontal velocity defined at vertices"
/>
<var name="kineticEnergyVertexOnCells"
persistence="scratch"
type="real" dimensions="nVertLevels nCells Time" units="m^2 s^{-2}"
description="kinetic energy of horizontal velocity defined at vertices"
/>
<var name="densitySurfaceDisplaced"
persistence="scratch"
type="real" dimensions="nVertLevels nCells Time" units="kg m^{-3}"
description="Density computed by displacing SST and SSS to every vertical layer within the column"
/>
<var name="thermalExpansionCoeff"
persistence="persistent"
type="real" dimensions="nVertLevels nCells Time" units="C^{-1}"
description="Thermal expansion coefficient (alpha), defined as $-1/\rho d\rho/dT$ (note negative sign)."
/>
<var name="salineContractionCoeff"
persistence="persistent"
type="real" dimensions="nVertLevels nCells Time" units="PSU^{-1}"
description="Saline contraction coefficient (beta), defined as $1/\rho d\rho/dS$. This is also called the haline contraction coefficient."
/>

<!-- FIELDS FOR TENSOR OPERATIONS -->
<var name="normalVelocityTest"
Expand Down Expand Up @@ -3251,218 +3190,11 @@
type="real" dimensions="SIX nVertLevels nEdges" units="m^2 s^{-1}"
description="Outer product, $u_e \otimes n_e$, at each edge."
/>
<var name="normalVectorEdge"
persistence="scratch"
type="real" dimensions="nVertLevels nEdges" units="m s^{-1}"
description="Vector component normal to an edge."
/>
<var name="tangentialVectorEdge"
persistence="scratch"
type="real" dimensions="nVertLevels nEdges" units="m s^{-1}"
description="Vector component tangent to an edge."
/>
<var name="windStressFullScratch" type="real" dimensions="nVertLevels nEdges Time" units="N m^{-2}"
persistence="scratch"
description="Wind stress used for reconstructing diagnostic output fields."
/>
<var name="windStressXScratch" type="real" dimensions="nVertLevels nCells Time" units="N m^{-2}"
persistence="scratch"
description="reconstructed surface wind stress in the x direction. Used for diagnostics."
/>
<var name="windStressYScratch" type="real" dimensions="nVertLevels nCells Time" units="N m^{-2}"
persistence="scratch"
description="reconstructed surface wind stress in the y direction. User for diagnostics."
/>
<var name="windStressZScratch" type="real" dimensions="nVertLevels nCells Time" units="N m^{-2}"
persistence="scratch"
description="reconstructed surface wind stress in the z direction. User for diagnostics."
/>
<var name="windStressZonalScratch" type="real" dimensions="nVertLevels nCells Time" units="N m^{-2}"
persistence="scratch"
description="reconstructed surface wind stress in the eastward direction. Used for diagnostics."
/>
<var name="windStressMeridionalScratch" type="real" dimensions="nVertLevels nCells Time" units="N m^{-2}"
persistence="scratch"
description="reconstructed surface wind stress in the northward direction. User for diagnostics."
/>
<var name="gradDensityEdge" persistence="scratch" type="real" dimensions="nVertLevels nEdges Time" units=""
description="Normal gradient of density"
/>
<var name="drhoDzTopOfEdge" persistence="scratch" type="real" dimensions="nVertLevels nEdges Time" units=""
description="Gradient of density in vertical on edges"
/>
<var name="dzdxEdge" persistence="scratch" type="real" dimensions="nVertLevels nEdges Time" units=""
description="gradient of depth at constant cell index"
/>
<var name="dDensityDzTopOfCell" persistence="scratch" type="real" dimensions="nVertLevelsP1 nCells Time" units=""
description="Vertical gradient of potential density"
/>
<var name="dDensityDzTopOfEdge" persistence="scratch" type="real" dimensions="nVertLevelsP1 nEdges Time" units=""
description="Vertical gradient of potential density at edge and top of layer."
/>
<var name="dDispDensityDzTopOfCell" persistence="scratch" type="real" dimensions="nVertLevelsP1 nCells Time" units=""
description="Vertical gradient of density"
/>
<var name="dDispDensityDzTopOfEdge" persistence="scratch" type="real" dimensions="nVertLevelsP1 nEdges Time" units=""
description="Vertical gradient of density at edge and top of layer."
/>
<var name="dTracerdZTopOfCell" persistence="scratch" type="real" dimensions="nVertLevelsP1 nCells Time" units=""
description="Vertical gradient of tracer field at cell centers"
/>
<var name="dTracerdZTopOfEdge" persistence="scratch" type="real" dimensions="nVertLevelsP1 nEdges Time" units=""
description="Vertical gradient of tracer field at cell edges"
/>
<var name="gradZMidEdge" persistence="scratch" type="real" dimensions="nVertLevels nEdges Time" units=""
description="Gradient of zMid"
/>
<var name="gradZMidTopOfEdge" persistence="scratch" type="real" dimensions="nVertLevelsP1 nEdges Time" units=""
description="Gradient of zMid at layer interfaces"
/>
<var name="tridiagA" persistence="scratch" type="real" dimensions="nVertLevels" units=""
description="The lower band of a tridiagonal matrix"
/>
<var name="tridiagB" persistence="scratch" type="real" dimensions="nVertLevels" units=""
description="The central band of a tridiagonal matrix"
/>
<var name="tridiagC" persistence="scratch" type="real" dimensions="nVertLevels" units=""
description="The upper band of a tridiagonal matrix"
/>
<var name="areaCellSum" type="real" dimensions="nVertLevels nCells Time" units="m^{2}"
persistence="scratch"
description="Accumulated cell area for normalization"
/>
<var name="rightHandSide" persistence="scratch" type="real" dimensions="nVertLevels" units=""
description="A vector"
/>
<var name="yRelativeSlopeSolution" persistence="scratch" type="real" dimensions="nVertLevelsP1 nCells Time" units="unitless"
description="Slope of isopycnal surface for analytic solution"
/>
<var name="yGMStreamFuncSolution" persistence="scratch" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2 s^{-1}"
description="GM stream function reconstructed to the cell centers, for analytic solution"
/>
<var name="yGMBolusVelocitySolution" persistence="scratch" type="real" dimensions="nVertLevels nCells Time" units="m s^{-1}"
description="Bolus velocity in Gent-McWilliams eddy parameterization, y-direction, for analytic solution"
/>

<!-- defined to enable openmp -->
<var_array name="delsq_tracer" type="real" dimensions="nVertLevels nCells">
<var name="delsq_temperature" array_group="dynamics" units="degrees Celsius"
description="potential temperature"
/>
<var name="delsq_salinity" array_group="dynamics" units="grams salt per kilogram seawater"
description="salinity"
/>
<var name="delsq_tracer1" array_group="dynamics" units="na"
description="tracer"
/>
</var_array>
<var name="div_hu" persistence="scratch" type="real" dimensions="nVertLevels nCells" units=""
description="div_hu"
/>
<var name="projectedSSH" persistence="scratch" type="real" dimensions="nCells" units=""
description="projectedSSH"
/>
<var name="ALE_Thickness" persistence="scratch" type="real" dimensions="nVertLevels nCells" units=""
description="ALE_Thickness"
/>
<var name="delsq_u" persistence="scratch" type="real" dimensions="nVertLevels nEdgesP1" units=""
description="delsq_u"
/>
<var name="delsq_divergence" persistence="scratch" type="real" dimensions="nVertLevels nCellsP1" units=""
description="delsq_divergence"
/>
<var name="delsq_relativeVorticity" persistence="scratch" type="real" dimensions="nVertLevels nVerticesP1" units=""
description="delsq_relativeVorticity"
/>
<var name="ddensityTopOfCell" persistence="scratch" type="real" dimensions="nVertLevelsP1 nCellsP1" units=""
description="ddensityTopOfCell"
/>
<var name="ddensityTopOfEdge" persistence="scratch" type="real" dimensions="nVertLevelsP1 nEdges" units=""
description="ddensityTopOfEdge"
/>
<var name="du2TopOfCell" persistence="scratch" type="real" dimensions="nVertLevelsP1 nCellsP1" units=""
description="du2TopOfCell"
/>
<var name="du2TopOfEdge" persistence="scratch" type="real" dimensions="nVertLevelsP1 nEdges" units=""
description="du2TopOfEdge"
/>
<var name="tracerCur" persistence="scratch" type="real" dimensions="nVertLevels nCells" units=""
description="Current single tracer value for advection"
/>
<var name="hNewInv" persistence="scratch" type="real" dimensions="nVertLevels nCells" units=""
description="Inverse layer thickness for advection"
/>
<var name="hProv" persistence="scratch" type="real" dimensions="nVertLevels nCells" units=""
description="provisional layer thickness for advection"
/>
<var name="hProvInv" persistence="scratch" type="real" dimensions="nVertLevels nCells" units="m"
description="inverse of provisional layer thickness for advection"
/>
<var name="workTendency" persistence="scratch" type="real" dimensions="nVertLevels nCells" units=""
description="Advective tendency work array"
/>
<var name="tracerMin" persistence="scratch" type="real" dimensions="nVertLevels nCells" units=""
description="Min tracer value for monotonic advection"
/>
<var name="tracerMax" persistence="scratch" type="real" dimensions="nVertLevels nCells" units=""
description="Max tracer value for monotonic advection"
/>
<var name="fluxIncoming" persistence="scratch" type="real" dimensions="nVertLevels nCells" units=""
description="Incoming flux of a tracer for advection"
/>
<var name="fluxOutgoing" persistence="scratch" type="real" dimensions="nVertLevels nCells" units=""
description="Outgoing flux of a tracer for advection"
/>
<var name="lowOrderFlux" persistence="scratch" type="real" dimensions="nVertLevelsP1 nEdges" units=""
description="Low order flux scratch variable for both horizontal and vertical advection."
/>
<var name="highOrderFlux" persistence="scratch" type="real" dimensions="nVertLevelsP1 nEdges" units=""
description="High order flux scratch variable for both horizontal and vertical advection."
/>
<var name="btrvel_temp" persistence="scratch" type="real" dimensions="nEdgesP1" units=""
description="btrvel_temp"
/>
<!-- FIELDS FOR LAND-ICE FORCING -->
<var name="boundaryLayerTemperatureScratch"
persistence="scratch"
type="real" dimensions="nCells" units="^\circ C"
description="temperature averaged vertically over the sub-ice-shelf boundary layer"
/>
<var name="boundaryLayerSalinityScratch"
persistence="scratch"
type="real" dimensions="nCells" units="PSU"
description="salinity averaged vertically over the sub-ice-shelf boundary layer"
/>
<var name="freezeInterfaceSalinityScratch"
persistence="scratch"
type="real" dimensions="nCells" units="PSU"
description="salinity at land ice-ocean interface where freezing is occurring"
/>
<var name="freezeInterfaceTemperatureScratch"
persistence="scratch"
type="real" dimensions="nCells" units="^\circ C"
description="temperature at land ice-ocean interface where freezing is occurring"
/>
<var name="freezeThicknessFluxScratch"
persistence="scratch"
type="real" dimensions="nCells" units="m s^{-1}"
description="thickness flux at land ice-ocean interface where freezing is occurring"
/>
<var name="freezeTemperatureFluxScratch"
persistence="scratch"
type="real" dimensions="nCells" units="^\circ C m s^{-1}"
description="ocean temperature flux at land ice-ocean interface where freezing is occurring"
/>
<var name="freezeIceTemperatureFluxScratch"
persistence="scratch"
type="real" dimensions="nCells" units="^\circ C m s^{-1}"
description="ice temperature flux at land ice-ocean interface where freezing is occurring"
/>
<var name="effectiveDensityScratch"
persistence="scratch"
type="real" dimensions="nCells" units="kg m^{-3}"
description="effective seawater density in land ice before horizontal averaging"
/>
<!-- FIELDS FOR LAND-ICE PRESSURE AND SSH INITIALIZATION -->
<var name="scratchZMid"
persistence="scratch"
Expand Down
3 changes: 1 addition & 2 deletions src/core_ocean/analysis_members/mpas_ocn_eliassen_palm.F
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ subroutine ocn_compute_eliassen_palm(domain, timeLevel, err)!{{{
type (mpas_pool_type), pointer :: am_epftPool
type (mpas_pool_type), pointer :: statePool
type (mpas_pool_type), pointer :: meshPool
type (mpas_pool_type), pointer :: scratchPool
type (mpas_pool_type), pointer :: forcingPool
type (mpas_pool_type), pointer :: diagnosticsPool

Expand Down Expand Up @@ -584,7 +583,7 @@ subroutine ocn_compute_eliassen_palm(domain, timeLevel, err)!{{{
! Compute potentialDensity over the entire block to ensure it's valid for EPFT computation

call ocn_equation_of_state_density(statePool, diagnosticsPool, meshPool, &
scratchPool, nCells, 1, 'absolute', potentialDensity, &
nCells, 1, 'absolute', potentialDensity, &
err) !, timeLevelIn=1)

!--------------------------------------------------
Expand Down
10 changes: 1 addition & 9 deletions src/core_ocean/driver/mpas_ocn_core.F
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module ocn_core
use ocn_forward_mode
use ocn_analysis_mode
use ocn_init_mode
use ocn_config

implicit none
private
Expand Down Expand Up @@ -59,7 +60,6 @@ function ocn_core_init(domain, startTimeStamp) result(ierr)!{{{
character(len=*), intent(out) :: startTimeStamp
integer :: ierr

character (len=StrKIND), pointer :: config_ocean_run_mode
integer :: numThreads

ierr = 0
Expand Down Expand Up @@ -101,12 +101,8 @@ function ocn_core_run(domain) result(iErr)!{{{

integer :: iErr

character(len=StrKIND), pointer :: config_ocean_run_mode

iErr = 0

call mpas_pool_get_config(domain % configs, 'config_ocean_run_mode', config_ocean_run_mode)

if ( trim(config_ocean_run_mode) == 'forward' ) then
ierr = ocn_forward_mode_run(domain)
else if ( trim(config_ocean_run_mode) == 'analysis' ) then
Expand Down Expand Up @@ -134,12 +130,8 @@ function ocn_core_finalize(domain) result(ierr)!{{{
type (domain_type), intent(inout) :: domain
integer :: ierr

character(len=StrKIND), pointer :: config_ocean_run_mode

ierr = 0

call mpas_pool_get_config(domain % configs, 'config_ocean_run_mode', config_ocean_run_mode)

if ( trim(config_ocean_run_mode) == 'forward' ) then
ierr = ocn_forward_mode_finalize(domain)
else if (trim(config_ocean_run_mode) == 'analysis' ) then
Expand Down
1 change: 0 additions & 1 deletion src/core_ocean/driver/mpas_ocn_core_interface.F
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,6 @@ function ocn_get_mesh_stream(configs, stream) result(ierr)!{{{
character(len=StrKIND), intent(out) :: stream
integer :: ierr

logical, pointer :: config_do_restart
character(len=StrKIND), pointer :: config_ocean_run_mode

ierr = 0
Expand Down
Loading