Skip to content

Conversation

@mark-petersen
Copy link
Contributor

This PR is an accumulation of PRs into the ocean/coastal branch. We are bringing them in at once for efficiency:
#285, #289, #284, #295, #310, #311, #312, #335, #354, #356, #358, #359, #365, #371

pwolfram and others added 30 commits June 18, 2019 08:48
This ensures that exact tidal boundary can be obtained
Fixes a bug that prevents Rayleigh bottom drag from
being applied if Rayleigh drag isn't being applied.
This merge allows bottom Rayleigh drag to be computed.

 * Fixes a bug that prevents Rayleigh bottom drag from
   being applied if Rayleigh drag isn't being applied.
Previously, Rayleigh drag was implemented explicitly, which
meant it was not coupled with vertical mixing.  Now,
Rayleigh drag is implemented implicitly so that it is directly
coupled to implicit vertical mixing.
…coastal

Migrates Rayleigh drag from explicit to implicit

Previously, Rayleigh drag was implemented explicitly, which
meant it was not coupled with vertical mixing.  Now,
Rayleigh drag is implemented implicitly so that it is directly
coupled to implicit vertical mixing.
Adds option to directly force with tidal boundary

This ensures that exact tidal boundary can be obtained via
the new 'config_tidal_forcing_type'='direct' option, which is
a direct application of the free surface.
 - Remove link to ocean_model

 - Remove link to metis

 - Use gpmetis
Adds a COMPASS test case to simulate Hurricane Sandy for Delaware Bay,
including use of point stats and validation.
* hurricane_squashed:
  Update COMPASS forwad and init config files
  Make concatenate_cfsr.py python 3 compatible
  Fix whitspace issue in mpas_ocn_init_mode.F
  Add Hurricane Sandy test case for Delaware Bay
Merges ocean/develop into ocean/coastal

* ocean/develop:
  Remove wget download of topo.msh
  Fix get_file bugs in global_ocean config_base_mesh files
  BGC tag to short version
  add variables to devault streams.
  change spaces to tabs
  Fixes LIGHT potential densitiy initialization
  Read in cellWidth netCDF file in inject_meshDensity.py
  Write cellWidth variable to netCDF file in build_mesh.py
  Save cellWidth.mat file in build_mesh.py
  Add 1e-15 to denominator
  Switch jigsaw call in jigsaw_driver.py
  Fix minor bugs in jigsaw_driver.py
  Remove jigsaw_driver.m links in config_base_mesh.xml files
  Switch form jigsaw-geo-matlab to jigsawpy
  Change name coriolis to hadv_coriolis
  Update README for COMPASS ocean with latest mpas_tools
  Ocean tracer advection CPU optimizations
Merge to get #297 into coastal

* develop: (78 commits)
  Fixes byte to string conversion python3 error
  Add log message for lbc updates
  Update the descriptions of several initialization options for init case 9
  Change default value for config_blend_bdy_terrain to false
  Change default "lbc" stream's filename template to include minutes and seconds
  Communicate effective radii for cloud, ice, and snow between MPAS and WSM6
  Only access config_pio_stride and config_pio_num_iotasks when necessary
  Return error from read_stream() when inexact stream time not found
  Avoid calling mpas_atm_update_bdy_tend whenever config_apply_lbcs = false
  Fix race condition in file tests when clobber_mode = 'append' or 'overwrite'
  Remove broken log write of cf1,cf2,cf3 from init_atm_case_gfs
  When using specified zeta levels, set 'zt' for correct coordinate surface smoothing
  Introduce early check on whether boundary terrain blending will succeed or not
  Enable soundings to handle non-existence of config_sounding_interval option
  Check for a valid vertical grid in init_case 9 (LBC setup case)
  Update version number to 7.0
  Migrate code for modifying relhum into its own function, convert_relhum_wrt_ice
  Recompute initial RH w.r.t. ice below freezing for consistency with model output
  Verify that config_apply_lbcs is consistent with values in bdyMaskCell field
  Verify that the input_interval for the 'lbc_in' stream is not 'none'
  ...
Top layer did not have implicit Rayleigh drag applied
and this commit fixes that omission.
This ensures that the applied pressure gradient is strictly from
the barotropic term, e.g., - g d eta / dx.
Insteady of a term like

du
-- = -r U + ...
dt

this applies

du      r
-- = - --- U
dt      H

where r is the Rayleigh drag parameter.  Note, this is done
on a total depth basis; H is not the layer thickness.
Moves Rayleigh drag version to its own subroutine, which includes
the depth-variable option.
Adds an option to explicitly apply only the barotropic pressure gradient.

* ocean/coastal_ssh_gradient:
  Adds barotropic pressure graident: ssh_graident
Fixes a typo in the upper layer related to implict Rayleigh drag.

* ocean/coastal_fix_rayleigh:
  Fixes typo in implicit Rayleigh drag
Adds depth-averaged Rayleigh drag option and cleans up implicit
Rayleigh drag into its own subroutine.

* ocean/coastal_depth_avg_rayleigh:
  Cleans up implicit vertical solve
  Adds option to apply depth-dependent Rayleigh drag
* MPAS-Dev/ocean/develop: (22 commits)
  Remove max of activeTracers
  bug fixes for KPP nonlocal source term.
  Add flag for two different types of ALE thickness weighting
  Change weight flag to 'tapered', add two new flags for tapering depths.
  Add tapered weights options for z-star
  Fix weighting in ALE SSH thickness distribution
  Switching to camelCase
  Changed appropriate locations with variables named rkWeight to rk_substep_weight to clarify the process of the rk4 time stepping.
  fill out docstring
  updates to argparse
  Run black on script (PEP8) and change constants to all caps
  make CFLmin an argument
  perturb cell-center particles in 3 unique directions for each cell
  add Gaussian noise function for cell-center seeding
  Allow user to seed both cell-center and off-vertex via argparse
  Switch to nonlinear EOS for time-varying run
  Add Haney number (rx1) to viz
  Change the way sea-level is damped with evap
  Fix ISOMIP+ viz
  Add time_varying_Ocean0 test case
  ...
Previously, Registry and code was inconsistent with the variable
`config_Rayleigh_damping_coeff_depth_variable` used, which was
inconsistent with the registry value of `config_Rayleigh_damping_depth_variable`.
…ean/coastal

Fixes typo for depth-variable Rayleigh drag
Includes comparison against data for
drying slope case from

Warner, J. C., Defne, Z., Haas, K., & Arango, H. G. (2013). A wetting
and drying scheme for ROMS. Computers & geosciences, 58, 54-61.

for r=0.0025 and r=0.01

Ensure appropriate tidal boundary forcing for wetting/drying.
Previously, tidal forcing could be used to artifically evacuate
a cell.  Now, tidal forcing cannot be applied in such a way
to evacuate a cell.  This requires, however, one to make sure the
tidal forcing applied is as expected.

Has a hybrid zstar/sigma coordinates for drying slope test case and
includes 1km and 250m resolutions.
Fixes this bug for DEBUG=true mode:

```
     *****************************
          ** Starting model run step **
               *****************************

               App launch reported: 1 (out of 1) daemons - 36 (out of
               36) procs
               forrtl: severe (194): Run-Time Check Failure. The
               variable 'ocn_vel_forcing_mp_ocn_vel_forcing_init_$ERR2'
               is being used in 'mpas_ocn_vel_forcing.F(181,7)' without
               being defined
               Image              PC                Routine
               Line        Source
               ocean_model        0000000001CE022B  ocn_vel_forcing_m
               181  mpas_ocn_vel_forcing.F
               ocean_model        0000000001C31723  ocn_forward_mode_
               212  mpas_ocn_forward_mode.F
               ocean_model        0000000001AD921B  ocn_core_mp_ocn_c
               76  mpas_ocn_core.F
               ocean_model        0000000000414289  mpas_subdriver_mp
               331  mpas_subdriver.F
               ocean_model        000000000040F725  MAIN__
               14  mpas.F
               ocean_model        000000000040F6AE  Unknown
               Unknown  Unknown
               libc-2.17.so       00002B93DFB093D5  __libc_start_main
               Unknown  Unknown
```
Fixes debug error with unassigned variable
Ensures that drying isn't allowed to within a neighborhood of
the threshold using namelist option `config_drying_safety_height`.
Adds wetting and drying safety factor for height
 * Updates output reporting for drying cells
 * Fixes output message typo
pwolfram and others added 8 commits September 5, 2019 10:47
Allows initialization of an idealized "hurricane"
via use of a Gaussian hump that does not require
time-varying forcing for testing purposes.
…astal

Adds Gaussian hump initialization to Sandy case
Updates hurricane test case parameters
 - Equilibrium tidal potential for K1, O1, P1, Q1, K2, N2, S2, M2

 - Simple scalar approximation for self attraction and loading

 - Incorporation into Hurricane Sandy test cases
Adds tidal forcing from 8 major constituents and simple self-attraction
and loading.

Includes diurnal constituents: K1, O1, P1, Q1 and semi-diurnal
constituents: K2, N2, S2, M2. A tanh ramp in time is used to gradually
apply the forcing (similar to time-varying atmospheric forcing). It has
been implemented for both split_explicit and RK4 time-stepping. It also
includes a simple self attraction and loading (0.09*eta)
parameterization.

Also, there are several updates to the Hurricane Sandy test case to
provide verification that tides is working propertly:

 * Increase maximum depth to 6000m (from 2000m)
 * Decrease minimum depth to 10m (from 30m)
 * Use 100layerE3SMv1 vertical grid (was 60layerPHC)
 * Decrease forcing ramps to 10 days and shorten simulation duration to
   10/10-11/3 (was 10/1-11/8)
@mark-petersen
Copy link
Contributor Author

@pwolfram and @sbrus89, a PR is not required here for a merge from the coastal branch, but I thought it would serve as good documentation, plus it's a convenient way to look at all the changes at once.

@@ -1,4 +1,4 @@
MPAS-v6.3
MPAS-v7.0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just a note: this change was already on ocean/develop before this PR (from a framework merge), but it shows up here again. Same with all the atmospheric files below. It is strange that they show up here, because they don't show up on a git diff:
git diff origin/ocean/develop origin/ocean/coastal --stat|grep README.md
produces nothing. I don't understand it.

@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="atmosphere" core_abbrev="atm" version="6.3">
<registry model="mpas" core="atmosphere" core_abbrev="atm" version="7.0">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same thing with all these atmospheric files. They shouldn't show up here.

* origin/develop:
  src/core_init_atmosphere/mpas_init_atm_gwd.F: replicate logic from mpas_init_atm_static.F to handle config_geog_data_path with and without trailing slashes
  Fix MPAS-A lw radation tendency Registry description
  * In ./src/core_atmosphere/diagnostics/Makefile, corrected typo. Changed line 27 to   all: $(DIAGNOSTIC_MODULES) $(OBJS)
  Expand the range of unformatted unit numbers to [101,200]
  Reserve some unit numbers for unformatted I/O
  Enable MPAS to be compiled into position-independent code
@mark-petersen
Copy link
Contributor Author

I solved the above problem by merging develop into ocean/coastal. Strangely, the web interface shows conflicts in the last message, but the command line does not report any conflicts.

@pwolfram, given all this confusion, I suspect it is better to do a clean reset of ocean/coastal to ocean/develop after this, so that we start fresh.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants