Skip to content

Adds free surface gradient forcing for idealized 1D turbulence#615

Closed
pwolfram wants to merge 58 commits intoMPAS-Dev:ocean/coastalfrom
pwolfram:coastal/const_pressure_turb_channel
Closed

Adds free surface gradient forcing for idealized 1D turbulence#615
pwolfram wants to merge 58 commits intoMPAS-Dev:ocean/coastalfrom
pwolfram:coastal/const_pressure_turb_channel

Conversation

@pwolfram
Copy link
Contributor

Adds free surface gradient forcing for

  • config_zonal_ssh_grad (x-component for planar)
  • config_meridional_ssh_grad (y-component for planar)

Case is applied in periodic flow in
ocean/periodic_planar/2.5km/default_gotm case, which can be
used to validate vertical momentum balances with constant forcing
due to double periodicity, which is useful to indicate potential
instabilities with constant forcing due to unstructured mesh.

Note, for full case comparison against literature (e.g., section 5.1 of https://www.sciencedirect.com/science/article/pii/S1463500319302082), needs to have Generaliized
Ocean Turbulence Model to be incorporated.

caozd999 and others added 30 commits December 3, 2019 10:22
SedimentFluxIndex - I

SedimentFluxIndex -I
add the following files
- Registry_sediment_flux_index.xml
- mpas_con_sediment_flux_index.F

sedimentFluxIndex - I update
add four variables
- sedimentFluxIndexVAX : Vertically-Averaged sFI in X-direction
- sedimentFluxIndexVAY : Vertically-Averaged sFI in Y-direction
- sedimentFluxIndexBX: Bottom sFI in X-direction
- sedimentFluxIndexBY: Bottom sFI in Y-direction

Adds sediment flux calculation

calculate sediment fall velocity by Goldstein and Coco 2013
calculate ratio "a" of sediment flux Q and U3 by Grawe et al 2014
calculate vertically-averaged and close bottom sediment flux (kg/m/s)
test the AM on the case ziso/2.5km/default

Add Soulsby and Damgaard bedload transport formulae

Goldstein and Coco's fall velocity equation seems to overestimate Ws,
might be repaced by VanRijn [1989] or Zhu &  Cheng [1993] in next commit
Add three bedload transport formulae and four sediment fall velocity formulae

Bedload transport formulae
- Soulbsy-Damgaard [2005]
- Meyer-Peter-Meuller [1948]
- Engelund-Hansen [1967]
Sediment fall velocity formulae
- Goldstein-Coco2013
- VanRijn1993
- Soulsby1997
- Cheng1997

Add Manning equation to calculate Chezy roughnes coefficient
in Engelund-Hansen bedload formula.

The Manning equaiton reads:
Chezy = 1/Manning*(bottomDepth)^(1/6)
Chezy value is manually restricted between [20 ,100]

Add suspended sediment concentration (SSC) algorithms

SSC is solved by bottom reference concentration and Rouse profile
Bottom reference concentration is computed by one of the following formulae
- Lee et al., 2004
- Goldstein et al., 2014
- Zyserman-Fredsoe 1997
Rouse profle assumes the eddy diffusivity to vary parabolically with height

Fixed bugs in calculations of SSC and theta in sediment_transport.F

Fixed two bugs in mpas_ocn_sediment_transport.F

- Corrected SSC Rouse profile equation
  The old equation from Page 138 of Soulsby's book "Dynamics of Marine
  Snads" (1997) is wrong. The right equation(s) can be found in
  (1) van Rijn 1984: Sediment Transport, Phase II: Suspended Load
  Transport. J. Hydraul. Eng.
  (2) Wang 2012: Measuring and Modeling Suspended Sediment Concentration
  Profile in the Surf Zone. Marine Sedimentology
- Corrected z-coordinate calculation
  The global variable zMid is zero at surface and negative downward. The
  water depth from bottom z was mistakely set to -zMid. Now the calculation
  is z=ssh+bottomDepth+zMid

Fixed a bug in mpas_ocn_sediment_transport.F

zMid is the distance from the mean surface layer, with positve upward.
So for each vertical layer center, the distance above the sea bottom is
bottomDepth+zMid, which was wrongly set as ssh+bottomDepth+zMid in the
last commit.

Replaced Rouse profile equation by van Rijn's equations; modified xml
files to output ssh, mesh and velocity in sediment transport output file.

Mannually set a maximum value for Rouse number to avoid "Float-point
exception" error; fixed a bug in the implementation of
'Zyserman-Fredsoe1994' equation.
…coastal

This PR adds sediment transport analysis member (Phase I) to the model,
with the following variables computed:
- sediment settling velocity
- sediment erosion flux
- sediment bedload transport flux
- suspended sediment concentration in water column
Adds examples of JIGSAW workflow for coastal cases.
  Adds HI refined case
  West coast mesh from SF to LA
This currently only affects coastal test cases.
This should let us set $CARTOPY_DIR in a compass activation
script on LANL IC
Fixes analysis script based on new xarray api
…ean/coastal

Near as I can tell, this script is not used and the test case works
without it.

closes MPAS-Dev#431
Adds spatially-variable Cd and Mannings n drag
capabilities.

Adds comparison of different use for Cd:
ocean/drying_slope/zstar_variableCd/1km

Adds variable Manning's n drying slope:
ocean/drying_slope/zstar_variableManningn/1km
Adds spatially variable drag coefficient capability
based on Cd and n.
Fix cartopy issues with tricontourf
Refractors the zstar test case to allow for above-land wetting/drying.
…above_land

Refractors the zstar test case to allow for above-land wetting/drying in a new test case.

 * Adds drying slope wetting and drying above land
Switch COMPASS from basemap to cartopy
 - Add missing +1 offset to cell IDs used in the points.nc file
   generated in the init step of the hurricane Sandy cases.
…oastal

Fix bug in pointwiseStats locations for Sandy cases

Simple 0 vs 1 offset error
 - Includes the hurricane_wind_pressure code from Donatella Pasqualini
   that interpolates a parametric wind field onto the MPAS-O mesh

 - New test case (ocean/hurricane/USDEQU120at30cr10rr2/synthetic_sandy)
   includes a tidal spin-up period before the storm winds begin.

   This is needed because the storm winds only cover a 3 day period prior to
   landfall (not enough time to spin-up tides accurately)

 - Also, adds the ability to delay the ramp for the atmospheric forcing.
   In this case this is used to delay the wind/pressure forcing ramp until
   after the tidal spin-up.
@pwolfram
Copy link
Contributor Author

Code generates the following profile (which is non-physical without an appropriate vertical turbulence model to produce the log-law in the vertical):

velocity_profile

Case follows section 5.1 of https://www.sciencedirect.com/science/article/pii/S1463500319302082

image

@pwolfram
Copy link
Contributor Author

@nairita87, this is a good case that can be used to test your implmentation of z_0 at #606

@pwolfram
Copy link
Contributor Author

@qingli411, can you please try out to see if this provides a log-law in the vertical and parabolic eddy viscosity using GOTM? This should work with just using a standard C_d=1e-3, but to match the paper @nairita87 's z_0 bottom drag implementation will be needed.

Copy link

@qingli411 qingli411 left a comment

Choose a reason for hiding this comment

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

@pwolfram With the pressure gradient term fixed I was able to run GOTM in this test. I computed the bottom friction velocity using a constant drag coefficient c_d=1e-3 and assuming a constant bottom roughness length z_0=1.5e-3 m, both needed by GOTM. However, it stopped after running for about 9 hours. The run using CVMix with a constant viscosity also stopped after 8 hours and the run with both CVMix and GOTM off stopped after 7 hours. Below is the velocity profiles in the three cases at hour 7. Note that for the 'none' case it shows the velocity profile right before it breaks. I'm not sure what is happening at the bottom... Also in all cases the bottom shear is very big -- I think perhaps we need the bottom drag @nairita87 is working on to fix this?

image

pressureGrad = config_zonal_ssh_grad * cos(angleEdge(iEdge)) + config_meridional_ssh_grad * sin(angleEdge(iEdge))

do k=1,maxLevelEdgeTop(iEdge)
tend(k,iEdge) = tend(k,iEdge) - edgeMask(k,iEdge) * density0Inv * pressureGrad

Choose a reason for hiding this comment

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

I think this line should be

tend(k,iEdge) = tend(k,iEdge) - gravity * edgeMask(k,iEdge) * pressureGrad

as pressureGrad seems to be the SSH gradient

Comment on lines +344 to +345
cell1 = cellsOnEdge(1,iEdge)
cell2 = cellsOnEdge(2,iEdge)

Choose a reason for hiding this comment

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

cell1 and cell2 are not used

<namelist name="namelist.ocean" mode="init">
<option name="config_init_configuration">'periodic_planar'</option>
<option name="config_vert_levels">-1</option>
<option name="config_periodic_planar_vert_levels">25</option>

Choose a reason for hiding this comment

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

Should be 250 to match the test in section 5.1 of Kärnä, 2020

@nairita87
Copy link

@pwolfram With the pressure gradient term fixed I was able to run GOTM in this test. I computed the bottom friction velocity using a constant drag coefficient c_d=1e-3 and assuming a constant bottom roughness length z_0=1.5e-3 m, both needed by GOTM. However, it stopped after running for about 9 hours. The run using CVMix with a constant viscosity also stopped after 8 hours and the run with both CVMix and GOTM off stopped after 7 hours. Below is the velocity profiles in the three cases at hour 7. Note that for the 'none' case it shows the velocity profile right before it breaks. I'm not sure what is happening at the bottom... Also in all cases the bottom shear is very big -- I think perhaps we need the bottom drag @nairita87 is working on to fix this?

Hi @qingli411 I am looking through the changes now. Will update soon. Can you tell me what is the 'none' case? CVMix and GOTM are switched off? So bottom friction is off?

@qingli411
Copy link

@nairita87 Yes, both CVMix and GOTM are switched off in the 'none' case (I should have used a better name...). It is basically zero viscosity. In all three cases I didn't change the configuration of the bottom drag. It should all be using config_use_implicit_bottom_drag = .true. and config_implicit_bottom_drag_coeff = 1.0e-3. The bottom friction velocity I computed is separate and is only used in GOTM to compute the viscosity.

@nairita87
Copy link

Okay @qingli411 . I have added a bottom friction case with a variable config_use_implicit_bottom_roughness = .true. Do you have access to that?
I will get back with some updates in a bit

@qingli411
Copy link

@nairita87 Is that in your PR #606? I think I have the access but haven't looked at the code... I will need to merge your changes into my branch.

@nairita87
Copy link

@qingli411 yes. Okay let me have a look at this

@pwolfram
Copy link
Contributor Author

pwolfram commented Jul 2, 2020

@qingli411 and @nairita87, please feel free to take the PR from here and make any edits you'd like. This case really needs combined with GOTM and z_0 in order to do the full validation and thank you both for digging in.

I'll leave it to you both as this is my last full week working on this work. Will be around to help with high-level questions if needed, however.

@qingli411
Copy link

@pwolfram Here are some updates. Please correct me if I'm wrong @nairita87 .

  • @nairita87 sets up a run with the new bottom drag in Add NCOM bottom drag formulation #606 with GOTM. The results look much more reasonable than before. See the figure below. Note that this figure plots the velocity profile at one of the center cells (realized that this test case is periodic in x but not in y) whereas the figure I posted earlier was the velocity profile at one of the boundary cells.
  • With the new bottom drag we can stably run the test case for 12 hours. We will try a longer run to see how fast it can approach equilibrium.

image

A few things to do next:

  • I don't think GOTM knows the updated bottom drag coefficient and roughness length in the present setup. I will work with @nairita87 to make these changes to the GOTM module and have everything consistent.
  • Then we can do a more careful comparison with the case in Kärnä, 2020

@sbrus89
Copy link

sbrus89 commented Aug 18, 2020

@qingli411, I cherry-picked 853756ef7 onto the current ocean/coastal here: https://github.com/sbrus89/MPAS-Model/tree/coastal/const_pressure_turb_channel. I can push it @pwolfram's fork to clean up the conflicts. You can see the differences here: sbrus89#4

@qingli411
Copy link

Thanks, @sbrus89! I will rebase my changes in my GOTM branch to the current ocean/coastal branch and create a PR from there

@sbrus89
Copy link

sbrus89 commented Aug 18, 2020

@qingli411, that sounds great. It may be easier to cherry-pick the specific commits that add the feature rather than do a full rebase since the current ocean/coastal has diverged so much from where you likely started. But either way works.

@qingli411
Copy link

Hi @sbrus89, I find the history of the ocean/coastal branch very confusing... I started cherry-picking my changes to include GOTM on top of the ocean/coastal branch this morning. But now the commit history is completely changed... I notice that you did a force-push on ocean/coastal. I wonder what was the change?

@sbrus89
Copy link

sbrus89 commented Aug 19, 2020

@qingli411, it is very confusing. We are trying to sync up ocean/coastal and ocean/develop to do the #485 merge. I've had to rebase ocean/coastal several times as ocean/develop has been updated with performance PRs over the last couple weeks. I rebased it again this morning and should have let you know. Sorry for the confusion!

@qingli411
Copy link

@sbrus89 OK I see. Thanks! So should I use this version of ocean/coastal or should I wait a little bit?

@sbrus89
Copy link

sbrus89 commented Aug 19, 2020

@qingli411, Maybe just hold off until #485 gets merged. I think this should be happening within the next day or two. That way we avoid any wasted effort.

@qingli411
Copy link

@sbrus89 Sounds good!

@mark-petersen
Copy link
Contributor

@qingli411, this was originally a PR into ocean/coastal, so the history is a bit messed up here. But I think the only relevant commit is 853756e. Looking at that one, I think it is all already included in #704. At least, it definitely includes the same 'constant_forced' version of the pressure gradient. I think the test case additions are in #704 as well, in the directory

testing_and_setup/compass/ocean/periodic_planar/2.5km/default_gotm

Please take a look. If you agree, I will close this PR.

@qingli411
Copy link

@mark-petersen Yes, I think this test case is already included in #704 and I agree that we can close this PR.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants