Adds free surface gradient forcing for idealized 1D turbulence#615
Adds free surface gradient forcing for idealized 1D turbulence#615pwolfram wants to merge 58 commits intoMPAS-Dev:ocean/coastalfrom
Conversation
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.
|
Code generates the following profile (which is non-physical without an appropriate vertical turbulence model to produce the log-law in the vertical): Case follows section 5.1 of https://www.sciencedirect.com/science/article/pii/S1463500319302082 |
|
@nairita87, this is a good case that can be used to test your implmentation of z_0 at #606 |
|
@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. |
qingli411
left a comment
There was a problem hiding this comment.
@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?
| 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 |
There was a problem hiding this comment.
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
| cell1 = cellsOnEdge(1,iEdge) | ||
| cell2 = cellsOnEdge(2,iEdge) |
| <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> |
There was a problem hiding this comment.
Should be 250 to match the test in section 5.1 of Kärnä, 2020
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? |
|
@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 |
|
Okay @qingli411 . I have added a bottom friction case with a variable config_use_implicit_bottom_roughness = .true. Do you have access to that? |
|
@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. |
|
@qingli411 yes. Okay let me have a look at this |
|
@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. |
|
@pwolfram Here are some updates. Please correct me if I'm wrong @nairita87 .
A few things to do next:
|
|
@qingli411, I cherry-picked |
|
Thanks, @sbrus89! I will rebase my changes in my GOTM branch to the current ocean/coastal branch and create a PR from there |
|
@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. |
|
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? |
|
@qingli411, it is very confusing. We are trying to sync up |
|
@sbrus89 OK I see. Thanks! So should I use this version of ocean/coastal or should I wait a little bit? |
|
@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. |
|
@sbrus89 Sounds good! |
|
@qingli411, this was originally a PR into Please take a look. If you agree, I will close this PR. |
|
@mark-petersen Yes, I think this test case is already included in #704 and I agree that we can close this PR. |




Adds free surface gradient forcing for
Case is applied in periodic flow in
ocean/periodic_planar/2.5km/default_gotmcase, which can beused 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.