Skip to content
Closed
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
129 changes: 120 additions & 9 deletions src/core_ocean/Registry.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,47 @@
/>
<var name="velocityZonalSquared" type="real" dimensions="nVertLevels nCells Time" units="m^2 s^{-2}"
description="cell-wise square of component of horizontal velocity in the eastward direction"
missing_value="FILLVAL"
/>
<var name="velocityMeridionalSquared" type="real" dimensions="nVertLevels nCells Time" units="m^2 s^{-2}"
description="cell-wise square of component of horizontal velocity in the northward direction"
missing_value="FILLVAL"
/>
<var name="velocityZonalTimesTemperature" type="real" dimensions="nVertLevels nCells Time" units="m s^{-1} C"
description="cell-wise product of component of horizontal velocity in the eastward direction and temperature"
missing_value="FILLVAL"
/>
<var name="velocityMeridionalTimesTemperature" type="real" dimensions="nVertLevels nCells Time" units="m s^{-1} C"
description="cell-wise product of component of horizontal velocity in the northward direction and temperature"
missing_value="FILLVAL"
/>
<var name="normalVelocitySquared" type="real" dimensions="nVertLevels nEdges Time" units="m^2 s^{-2}"
description="edge based square of normal velocity"
missing_value="FILLVAL"
/>
<var name="normalVelocityTimesTemperature" type="real" dimensions="nVertLevels nEdges Time" units="m s^{-1} C"
description="edge based product of normal velocity and temperature"
missing_value="FILLVAL"
/>
<var name="velocityZonalTimesTemperature_GM" type="real" dimensions="nVertLevels nCells Time" units="m s^{-1} C"
description="cell-wise product of component of horizontal bolus velocity in the eastward direction and temperature"
packages="gm"
missing_value="FILLVAL"
/>
<var name="velocityMeridionalTimesTemperature_GM" type="real" dimensions="nVertLevels nCells Time" units="m s^{-1} C"
description="cell-wise product of component of horizontal bolus velocity in the northward direction and temperature"
packages="gm"
missing_value="FILLVAL"
/>
<var name="normalGMBolusVelocitySquared" type="real" dimensions="nVertLevels nEdges Time" units="m^2 s^{-2}"
description="edge based square of normal velocity"
packages="gm"
missing_value="FILLVAL"
/>
<var name="normalGMBolusVelocityTimesTemperature" type="real" dimensions="nVertLevels nEdges Time" units="m s^{-1} C"
description="edge based product of normal velocity and temperature"
packages="gm"
missing_value="FILLVAL"
/>
</var_struct>
<streams>
Expand Down
7 changes: 4 additions & 3 deletions src/core_ocean/shared/mpas_ocn_diagnostics.F
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module ocn_diagnostics
use mpas_vector_reconstruction
use mpas_stream_manager
use mpas_io_units
use mpas_io, only : MPAS_REAL_FILLVAL

use ocn_constants
use ocn_config
Expand Down Expand Up @@ -168,7 +169,7 @@ subroutine ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, diagnostic
! (positive points from vertex1 to vertex2)
! units: s^{-1} m^{-1}
real (kind=RKIND), dimension(:,:), allocatable :: vorticityGradientTangentialComponent


real (kind=RKIND), dimension(:), pointer :: surfaceFluxAttenuationCoefficient
real (kind=RKIND), dimension(:), pointer :: surfaceFluxAttenuationCoefficientRunoff
Expand Down Expand Up @@ -331,8 +332,8 @@ subroutine ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, diagnostic

normalVelocity(:,nEdges+1) = -1e34
layerThickness(:,nCells+1) = -1e34
Comment on lines 333 to 334
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these two should also be replaced with MPAS_REAL_FILLVAL, right?

Suggested change
normalVelocity(:,nEdges+1) = -1e34
layerThickness(:,nCells+1) = -1e34
normalVelocity(:,nEdges+1) = MPAS_REAL_FILLVAL
layerThickness(:,nCells+1) = MPAS_REAL_FILLVAL

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Sorry, in my first version, these two variables have no missing values in the output and no fill_value attributes. So I changed them back to -1e34.

Double-checking other variables: Should I replace the following with MPAS_REAL_FILLVAL as well?

mode_init/mpas_ocn_init_vertical_grids.F:        localMaxRx1Edge = -1e30_RKIND
mode_init/mpas_ocn_init_vertical_grids.F:        localStretchMin = 1e30_RKIND
mode_init/mpas_ocn_init_vertical_grids.F:        localStretchMax = -1e30_RKIND
mode_init/mpas_ocn_init_interpolation.F:         minDist = 1e34

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all of these max and min variables are right as they are. They are very large positive or negative numbers so the first value found will replace them as the new min or max.

activeTracers(indexTemperature,:,nCells+1) = -1e34
activeTracers(indexSalinity,:,nCells+1) = -1e34
activeTracers(indexTemperature,:,nCells+1) = MPAS_REAL_FILLVAL
activeTracers(indexSalinity,:,nCells+1) = MPAS_REAL_FILLVAL

call ocn_relativeVorticity_circulation(relativeVorticity, circulation, meshPool, normalVelocity, err)

Expand Down
7 changes: 4 additions & 3 deletions src/core_ocean/shared/mpas_ocn_init_routines.F
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module ocn_init_routines
use mpas_timer
use mpas_dmpar
use mpas_constants
use mpas_io, only : MPAS_REAL_FILLVAL

use mpas_rbf_interpolation
use mpas_vector_operations
Expand Down Expand Up @@ -539,7 +540,7 @@ subroutine ocn_init_routines_vert_coord(domain)!{{{
do iCell = 1,nCells
if (landIceMask(iCell)==0.and.abs(sum(layerThickness(1:maxLevelCell(iCell),iCell))-bottomDepth(iCell))>20.0_RKIND) then
consistentSSH = .false.
call mpas_log_write(' Warning: Sea surface height is outside of acceptable physical range, i.e. abs(sum(h)-bottomDepth)>20m.', &
call mpas_log_write(' Warning: Sea surface height is outside of acceptable physical range, i.e. abs(sum(h)-bottomDepth)>20m.', &
MPAS_LOG_ERR)
call mpas_log_write(' iCell: $i, maxLevelCell(iCell): $i, bottomDepth(iCell): $r, sum(h): $r', &
intArgs=(/iCell, maxLevelCell(iCell) /), &
Expand All @@ -550,7 +551,7 @@ subroutine ocn_init_routines_vert_coord(domain)!{{{
do iCell = 1,nCells
if (abs(sum(layerThickness(1:maxLevelCell(iCell),iCell))-bottomDepth(iCell))>20.0_RKIND) then
consistentSSH = .false.
call mpas_log_write(' Warning: Sea surface height is outside of acceptable physical range, i.e. abs(sum(h)-bottomDepth)>20m.', &
call mpas_log_write(' Warning: Sea surface height is outside of acceptable physical range, i.e. abs(sum(h)-bottomDepth)>20m.', &
MPAS_LOG_ERR)
call mpas_log_write(' iCell: $i, maxLevelCell(iCell): $i, bottomDepth(iCell): $r, sum(h): $r', &
intArgs=(/iCell, maxLevelCell(iCell) /), &
Expand Down Expand Up @@ -704,7 +705,7 @@ subroutine ocn_init_routines_block(block, dt, err)!{{{
call mpas_pool_get_array(tracersPool, groupItr % memberName, tracersGroup, 1)
if ( associated(tracersGroup) ) then
do iCell=1,nCells
tracersGroup(:, maxLevelCell(iCell)+1:nVertLevels,iCell) = -1.0e34_RKIND
tracersGroup(:, maxLevelCell(iCell)+1:nVertLevels,iCell) = MPAS_REAL_FILLVAL
end do
end if
end if
Expand Down
3 changes: 2 additions & 1 deletion src/core_ocean/shared/mpas_ocn_vmix.F
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module ocn_vmix
use mpas_derived_types
use mpas_pool_routines
use mpas_timer
use mpas_io, only : MPAS_REAL_FILLVAL

use mpas_constants
use ocn_constants
Expand Down Expand Up @@ -986,7 +987,7 @@ subroutine ocn_tracer_vmix_tend_implicit(meshPool, dt, vertDiffTopOfCell, layerT
tracersTemp, N, nVertLevels, num_tracers)

tracers(:,1:N,iCell) = tracersTemp(:,1:N)
tracers(:,N+1:nVertLevels,iCell) = -1e34
tracers(:,N+1:nVertLevels,iCell) = MPAS_REAL_FILLVAL
end do
!$omp end do
!$omp end parallel
Expand Down
6 changes: 3 additions & 3 deletions src/core_ocean/tracer_groups/Registry_activeTracers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

<var_struct name="state" time_levs="2">
<var_struct name="tracers" time_levs="2">
<var_array name="activeTracers" dimensions="nVertLevels nCells Time" type="real" packages="activeTracersPKG" >
<var_array name="activeTracers" dimensions="nVertLevels nCells Time" type="real" packages="activeTracersPKG" missing_value="FILLVAL">
<var name="temperature" array_group="activeGRP" units="degrees Celsius"
description="potential temperature"
/>
Expand Down Expand Up @@ -139,15 +139,15 @@
</var_array>
</var_struct>
<var_struct name="tracersInteriorRestoringFields" time_levs="1">
<var_array name="activeTracersInteriorRestoringRate" type="real" dimensions="nVertLevels nCells Time" packages="activeTracersInteriorRestoringPKG">
<var_array name="activeTracersInteriorRestoringRate" type="real" dimensions="nVertLevels nCells Time" packages="activeTracersInteriorRestoringPKG" missing_value="FILLVAL">
<var name="temperatureInteriorRestoringRate" array_group="activeGRP" units="{s}^-1"
description="A non-negative field controlling the rate at which temperature is restored to temperatureInteriorRestoringValue"
/>
<var name="salinityInteriorRestoringRate" array_group="activeGRP" units="{s}^-1"
description="A non-negative field controlling the rate at which salinity is restored to salinityInteriorRestoringValue"
/>
</var_array>
<var_array name="activeTracersInteriorRestoringValue" type="real" dimensions="nVertLevels nCells Time" packages="activeTracersInteriorRestoringPKG">
<var_array name="activeTracersInteriorRestoringValue" type="real" dimensions="nVertLevels nCells Time" packages="activeTracersInteriorRestoringPKG" missing_value="FILLVAL">
<var name="temperatureInteriorRestoringValue" array_group="activeGRP" units="^\circ C"
description="Temperature is restored toward this field at a rate controlled by temperatureInteriorRestoringRate."
/>
Expand Down
8 changes: 4 additions & 4 deletions src/core_ocean/tracer_groups/Registry_debugTracers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<var_struct name="state" time_levs="2">
<var_struct name="tracers" time_levs="2">
<var_array name="debugTracers" dimensions="nVertLevels nCells Time" type="real" packages="debugTracersPKG" default_value="1.0">
<var_array name="debugTracers" dimensions="nVertLevels nCells Time" type="real" packages="debugTracersPKG" default_value="1.0" missing_value="FILLVAL">
<var name="tracer1" array_group="debugGRP" units="tracer1"
description="tracer for debugging purposes"
/>
Expand All @@ -65,7 +65,7 @@

<var_struct name="tend" time_levs="1">
<var_struct name="tracersTend" time_levs="1">
<var_array name="debugTracersTend" type="real" dimensions="nVertLevels nCells Time" packages="debugTracersPKG">
<var_array name="debugTracersTend" type="real" dimensions="nVertLevels nCells Time" packages="debugTracersPKG" missing_value="FILLVAL">
<var name="tracer1Tend" array_group="debugGRP" units="tracer1"
description="Tendency for tracer1"
/>
Expand Down Expand Up @@ -140,7 +140,7 @@
</var_array>
</var_struct>
<var_struct name="tracersInteriorRestoringFields" time_levs="1">
<var_array name="debugTracersInteriorRestoringRate" type="real" dimensions="nVertLevels nCells Time" packages="debugTracersInteriorRestoringPKG">
<var_array name="debugTracersInteriorRestoringRate" type="real" dimensions="nVertLevels nCells Time" packages="debugTracersInteriorRestoringPKG" missing_value="FILLVAL">
<var name="tracer1InteriorRestoringRate" array_group="debugGRP" units="{s}^-1"
description="A non-negative field controlling the rate at which tracer1 is restored to tracer1InteriorRestoringValue"
/>
Expand All @@ -151,7 +151,7 @@
description="A non-negative field controlling the rate at which tracer3 is restored to tracer3InteriorRestoringValue"
/>
</var_array>
<var_array name="debugTracersInteriorRestoringValue" type="real" dimensions="nVertLevels nCells Time" packages="debugTracersInteriorRestoringPKG">
<var_array name="debugTracersInteriorRestoringValue" type="real" dimensions="nVertLevels nCells Time" missing_value="FILLVAL" packages="debugTracersInteriorRestoringPKG">
<var name="tracer1InteriorRestoringValue" array_group="debugGRP" units="^\circ C"
description="tracer1 is restored toward this field at a rate controlled by tracer1InteriorRestoringRate."
/>
Expand Down