Skip to content
This repository was archived by the owner on Oct 23, 2020. It is now read-only.

Conversation

@DieMuhkuh
Copy link

Meridional overturning circulation (MOC) stream function analysis member

This analysis member calculates the MOC stream function for the global ocean as well as a configurable set of regions. For the regional MOC, the transport through the southern border, given as a transect, is calculated.

xylar and others added 30 commits January 6, 2016 20:49
A new subroutine has been added for constraining the min. and max.
number of columns during grid generation with rx1 < rx1Max.  At least
config_rx1_min_levels and at most nVertLevels levels must span the
space between z=ssh and z=-bottomDepth in a given column.
Previously, during each smoothing iteration, the layer containing
-bottomDepth was lifted or dropped so zInterface matched -bottomDepth.
This often led to cases where rx1 > rx1Max (though not by huge amounts).
The new method seeks to put the lower zInterface of the layer containing
-bottomDepth as close to -bottomDepth as possible without violating
rx1 <= rx1Max.  The result is that rx1 <= rx1Max always and a partial
cells approach is not needed under ice shelves, since smoothing and
constraints on rx1 ensure that the bottom layer has a reasonable
thickness compared with its horizontal and vertical neighbors.
The Haney number (rx1) is also computed as a diagnostic.
Also update iterative init configuration to use an init template
deltaSSH is now only nonzero where SSH is allowed to be modified
(modifySSHMask == 1)
Was still using the non-standard planar mesh from an earlier
commit of sub_ice_shelf_2D
This variable can be either 'ssh' or 'ssp', depending on which
field the user wishes to iteratively modify to reduce barotropic
waves in the initial condition.

Previously, this namelist variable was a confusing logical,
config_update_ssh_not_ssp
This PR adds a module, ocn_init_ssh_and_ssp, for computing (and
iteratively updating) either the sea-surface height (SSH) based on a
known sea-surface pressure (SSP) or visa versa.

Test cases that use this module should:
1. compute maxLevelCell, bottomDepth and refBottomDepth
2. compute either seaSurfacePressure or refSSH, depending on how the
upper surface is to be determined.
3. call ocn_init_ssh_and_ssp_vertical_grid to compute the appropriate z*
vertical grid (layerThickness, restingThickness and zMid)
4. compute or interpolate activeTracers on the given vertical grid
5. call ocn_init_setup_ssh_and_ssp to compute the SSH from the SSP or
visa versa

The module enables a process for iterative correction of the SSP and/or
SSH in a subsequent comment.
This PR will add a subroutine, ocn_init_vertical_grid_with_max_rx1, that
re-initializes layerThickness and maxLevelCell (as well as zMid) such
that the the Haney number (rx1) remains below a threshold
config_rx1_max. The Haney number is approximately the number of vertical
cells by which a layer is displaced between horizontal neighbors. The
steeper the vertical-coordinate slope and the thinner the vertical
layers, the larger rx1 becomes.

The vertical coordinate is only altered in sub-ice-shelf cavities and in
a buffer region nearby (within config_rx1_horiz_smooth_open_ocean_cells
of an ice-shelf cavity). Elsewhere, the default z-level coordinate is
maintained.
Computes initial conditions for ISOMIP test cases

Adding temperature and salinity restoring to ISOMIP init

Requires a mask on restoring (maskRestore), which has been
initialized to 1.0 in all other init modules that use
restoring.

Added variables for ice sensible heat flux to ISOMIP init

The landIceTemperature is currently initialized to -25 C but
will not actually be used, since landIceHeatTransferVelocity=0,
meaning insulating ice.

including land_ice_fluxes namelist in init mode

Added surface restoring for expt2

This requires adding restoring T and S values
as well as piston velocities to the namelist

Initialize the effective density in ISOMIP
Also, a few minor updates to the isomip test-case module to make
it compatible with recent changes in the SSH/SSP initialization
module.
This commit fixes an issue with the computation interval for analysis
members when the output stream is set to 'none'.
This merge fixes an issue with the computation interval for analysis
members when the output stream is set to 'none'.
Removes buoyancy surface velocity fields and summed velocities
This commit removes trailing whitespaces which are whitespaces at the
end of a line before the newline.
This commit adds missing _RKIND specifiers on reals that are hard-coded.

NOTE: This might not be BFB on all compilers, as some compilers might
assign hard coded values a different precision than the variable they
are being assigned to.
…/develop

Removes buoyancy surface velocity fields and summed velocities
This commit shortens lines to be within the 132 character limit for the
NAG compiler.
This merge fixes several issues related to attempting to support the NAG
compiler, and some general cleanup.

Only Fortran files are modified in this PR. XML files will be cleaned up
next week.

This merge removes trailing whitespaces, adds _RKIND to all hard coded
real values, and shortens lines that are longer than 132 characters.
…evelop

New option to reconstruct cell-centered low-pass filtered velocities for
output.

This is a straightforward way to do a "gut check" that the time filter
is sufficiently configured and
performing the correct operation on the flow.
Add a variable to conveniently plot time in plots
of global statistics. The new variable, timeInDays,
is a floating point number of days since the start
of the simulation so that this timer will work
across restart files.  The simulation start time
is taken from config_start_time if
config_restart = .false.

* ocean/add_time_globalStats:
  Add variable daysSinceStartOfSim to time loop in forward mode.
  Add a timer to netcdf output of global stats AM
Land ice and grounded ice fractions are also read in, and
the ssh or ssp is computed from ice draft or ice thickness,
respectively.
Adds a mask for the ocean so the criterion
of where there is ocean and where there is land is not just
determined by the topography.  This can be helpful in keeping
a more accurate coastline during smoothing of topography.
Global reduction was happening only one block at a time.  Now, the
subroutine for computing Haney number loops over blocks.

The computation of the Haney Number in isomip and sub_ice_shelf_2D
test cases was modified accordingly
Previously, the interpolation used layers below maxLevelCell based
on the assumption that the input data was well defined in land as
well.

Given that maxLevelCell can change when the vertical coordinate is
modified to accommodate the SSH, the old maxLevelCell must also
be stored in a scratch variable.
This required some reorganization:
* The init. of the restoring fields has been put in a separate
  subroutine because the activeTracers may have been modified
  when the vertical coordinate is re-initialized
* Land ice must be read in before the vertical coordinate is
  initialized
* Tracers must be initialized before ssh/ssp can be balanced
* Interface for computing Haney number was modified, and Haney
  must be computed after vertical coordinate has been modified.

A few unused fields have been removed from the global_ocean registry
Nils Feige and others added 19 commits May 3, 2016 14:24
…ly region

code compiles, but runtime testing still needs to be performed, since the wolf supercomputer is down
testsplots show valid results for atlantic moc (handcrafted geojson file)
results still bogus, though, because no signed edge mask is generated by the mask generator
changed code to use unsigned edge mask instead of signed one (remember to change this back)
This commit a few floating point exception issues within the ocean.
This merge a few floating point exception issues within the ocean.
This commit refactors a loop within GM that was over the wrong element
type to work better with OpenMP (but also make it bit reproducible).
This commit fixes assorted OpenMP directives that had incorrect private
clauses.
This commit fixes two issues in the Ohlman 00 shortwave scheme.  First,
if clearSkyRadiation is ever zero, a segFault will occur, due to division
by zero.  A small positive number is added to prevent this.  Second, there is
presently no check for the necessary data arrays prior to computing extinction
coefficients.  If config_sw_absorption_type is set to ohlman00 and no data arrays
are provided, the code will attempt to compute extinction coefficients.  In this
commit a check is added for these arrays, if any are missing, a warning is
printed and the code is not run.
This commit removes the warning issued if config_sw_absorption_type != none
and activeTracers_bulk_forcing is false. to an error in the sw_absorption_init
routines
This merge makes a few modifications to the OpenMP private clauses to be
more correct, and it refactors a loop within GM and updates the OpenMP
directives for that loop.
This commit fixes makefile dependencies in the ocean core, to enable the
ocean core to be built in parallel.
This PR fixes two issues in the Ohlman 00 shortwave scheme. First, if
clearSkyRadiation is ever zero, a segFault will occur, due to division
by zero. A small positive number is added to prevent this. Second, there
is presently no check for the necessary data arrays prior to computing
extinction coefficients. If config_sw_absorption_type is set to ohlman00
and no data arrays are provided, the code will attempt to compute
extinction coefficients.  In this commit a check is added for these
arrays, if any are missing, a warning is printed and the code is not
run.

* ocean/shortWaveBugFix:
  Changes warning message to error and model abort
  Fixes a bug in variable shortwave scheme
  Fixes a floating point exception when ClearSkyRad is zero
This merge incorporates several framework bug fixes including allowing
fields duplicated through the duplicate_field routines to be used in IO
streams. Additionally, this merge fixes an issue when using single
precision floats in the new exchange group halo exchanges.

* MPAS-Dev/MPAS/develop:
  Fix issue with halo exchanges of integer fields when running with RKIND=4
  Add field tests module and attribute lists test routine
  Update duplicate field routines to duplicate attribute lists
  Add routine to duplicate attribute lists
This merge fixes makefile dependencies in the ocean core, to enable the
ocean core to be built in parallel.
changed some vairable names to clarify their meanings
added configuration entry for transect groups
general cleanups
marked vars in moc_streamfunction registry that have to be removed in the future
marked passages of code in moc_streamfunction.F that will have to be changed once the transect groups are defined
@DieMuhkuh
Copy link
Author

DieMuhkuh commented May 19, 2016

Test run folders

The analysis member has been tested using the QU_120km test case. The run directory is on the turquoise network.
/lustre/scratch1/turquoise/nilsfeige/runMPAStest/ocean/global_ocean/QU_120km/default/forward
To generate the mask file, the short utility script
/lustre/scratch1/turquoise/nilsfeige/runMPAStest/ocean/global_ocean/QU_120km/default/makeMask
has been used. The geojson file needed to generate the north atlantic mask is located in the same directory. Example:
./makeMask forward/init.nc forward/atlanticMocMask.nc SingleRegionAtlantic.geojson
Additionally, the streams have to be set up to load the data from the mask file.
So add this:

<stream name="regionalMasksInput"
        type="input"
        mode="forward;analysis"
        filename_template="atlanticMocMasks.nc"
        input_interval="initial_only"
        runtime_format="single_file">
        <var_struct name="regions"/>
</stream>
<stream name="transect_transport_masks"
        type="input"
        filename_template="atlanticMocMasks.nc"
        immutable="true"
        input_interval="initial_only"
        mode="forward;analysis">

        <var name="transectEdgeMasks"/>
        <var name="transectEdgeMaskSigns"/>
</stream>

to the stream file.

@DieMuhkuh
Copy link
Author

Results

In addition to the Fortran code, an jupyter notebook file is included in this pull request (although it might not belong there). It is used to plot the results of the MOC stream function computations.
Some results are shown below:

Global MOC

plot00700

North atlantic MOC

plot00700

Minimum and Maximum Value against latitude for one timestep (North Atlantic)

region0binvals00700

Transport through the southern boundary of the North atlantic for one timestep

transport700

@pwolfram
Copy link
Contributor

@DieMuhkuh, I think you want to merge onto MPAS-Dev:ocean/develop, not MPAS-Dev:develop.

@mark-petersen
Copy link
Contributor

Please take the Jupyter notebook out of this PR, and post it on a gist, and put a link to that gist in a comment here.

@milenaveneziani
Copy link

This is great, thanks @DieMuhkuh. Would it be possible to print a few plots and bring them to the analysis framework meeting on Monday (10am in the T-DO conf room)?
Also, another plot that is usually made is a time series of the maximum MOC at 26.5N: this can be directly compared with obs and other model results.
Thanks again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.