-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Runge-Kutta time integration #86
Implement Runge-Kutta time integration #86
Commits on Nov 6, 2023
-
Add RK2 loop in time integration module
Add RK2 loop in time integration module. This is the bare bones of RK2 time stepping. Compiles but likely will not run.
Configuration menu - View commit details
-
Copy full SHA for 4ec4101 - Browse repository at this point
Copy the full SHA 4ec4101View commit details -
Pass rkTend to advection routine
Pass rkTend to advection routine to accumulate tendencies
Configuration menu - View commit details
-
Copy full SHA for bf947b6 - Browse repository at this point
Copy the full SHA bf947b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for c703988 - Browse repository at this point
Copy the full SHA c703988View commit details -
Correct dimensions of rkTend, which was inadvertently 2D instead of 3D.
Configuration menu - View commit details
-
Copy full SHA for bf88eb8 - Browse repository at this point
Copy the full SHA bf88eb8View commit details -
Update halos for rkTend in each step of RK loop
Update halos for rkTend in each step of RK loop
Configuration menu - View commit details
-
Copy full SHA for 220e2a4 - Browse repository at this point
Copy the full SHA 220e2a4View commit details -
Ensure damage >= damageNye after RK integration
Ensure damage >= damageNye after RK integration. Previously, li_finalize_damage_after_advection did not impose the damageNye minumum.
Configuration menu - View commit details
-
Copy full SHA for 9ccdde6 - Browse repository at this point
Copy the full SHA 9ccdde6View commit details -
Generalize RK time integration
Generalize RK time integration to use order defined in namelist. Currently supports config_rk_order = 1, 2, 4. Third order to be added soon.
Configuration menu - View commit details
-
Copy full SHA for 5d1e573 - Browse repository at this point
Copy the full SHA 5d1e573View commit details -
Fix forward Euler time integration
The previous Runge-Kutta commits left forward Euler time integration non-functioning. This makes FE time integration function again.
Configuration menu - View commit details
-
Copy full SHA for 278a5d7 - Browse repository at this point
Copy the full SHA 278a5d7View commit details -
Rename files, modules, and routines to include Runge-Kutta
Rename files, modules, and routines to include Runge-Kutta
Configuration menu - View commit details
-
Copy full SHA for af21705 - Browse repository at this point
Copy the full SHA af21705View commit details -
Add support for config_rk_order = 3, using the Strong Stability- Preserving RK3 method. This follows a slightly different algorithm from the classic RK2 and RK4 methods, and so requires significantl increasing the complexity of the RK loop. See eq 2.48 (pg 56) in Durran (2010): Numerical Methods for Fluid Dynamics for the description of this method.
Configuration menu - View commit details
-
Copy full SHA for 63a169b - Browse repository at this point
Copy the full SHA 63a169bView commit details -
Update RK2 and RK4 substeps using 0th step solution
Previous commits inadvertently updated sub-step solutions incrementally (i.e., using y(k-1) to solve for y(k), where k is the substep), when they should have been using y0. This commit fixes that, although tests show that this treatment is not complete and solutions are unstable.
Configuration menu - View commit details
-
Copy full SHA for b920b33 - Browse repository at this point
Copy the full SHA b920b33View commit details -
Only use SSP RK2 and RK3 methods
Only use SSP RK2 and RK3 methods, and remove support for classical RK2 and RK4.
Configuration menu - View commit details
-
Copy full SHA for dc33a67 - Browse repository at this point
Copy the full SHA dc33a67View commit details -
Rename some local variables, update comments, update log write
Configuration menu - View commit details
-
Copy full SHA for 74c014f - Browse repository at this point
Copy the full SHA 74c014fView commit details -
Add option for 4-stage SSPRK3, which involves four velocities solves instead of three, but also allows for a CFL fraction of 2. To use the 4-stage formulation, set 'config_rk_order = 3' and 'config_rk3_stages = 4'.
Configuration menu - View commit details
-
Copy full SHA for e938e92 - Browse repository at this point
Copy the full SHA e938e92View commit details -
Include SMB and BMB within RK loop
Include SMB and BMB within RK loop by calculating a weighted average based on each specific RK formulation.
Configuration menu - View commit details
-
Copy full SHA for f0c9a1f - Browse repository at this point
Copy the full SHA f0c9a1fView commit details -
Fix SMB and BMB budget for forward euler
Fix SMB and BMB budget for forward euler, as previous commit caused these fields to be written out as all zeroes.
Configuration menu - View commit details
-
Copy full SHA for 79b4635 - Browse repository at this point
Copy the full SHA 79b4635View commit details -
Correct a description in Registry, update comments and log writes.
Configuration menu - View commit details
-
Copy full SHA for 413f304 - Browse repository at this point
Copy the full SHA 413f304View commit details -
Fix bug in groundedSfcMassBalApplied after Runge-Kutta loop
Fix bug in groundedSfcMassBalApplied after Runge-Kutta loop. It was inadvertently being assigned the enitre applied SMB field instead of just the grounded portion.
Configuration menu - View commit details
-
Copy full SHA for 954ecce - Browse repository at this point
Copy the full SHA 954ecceView commit details -
Calculate groundedToFloatingThickness and grounding line flux after RK
Calculate the total groundedToFloatingThickness and fluxAcrossGroundingLine at the end of the RK loop. Budgets do not yet close, but are reasonably close.
Configuration menu - View commit details
-
Copy full SHA for 606cbb0 - Browse repository at this point
Copy the full SHA 606cbb0View commit details -
Reset layerThickness when using config_restore_thickness_after_advection
Reset layerThickness when using config_restore_thickness_after_advection. Restoring thickness alone is not sufficient when using Runge-Kutta time integration because the advected layerThickness gets propagated through all stages of the Runge-Kutta loop, which leads to advection and surface/basal mass balances causing thickness change.
Configuration menu - View commit details
-
Copy full SHA for 35fe8fa - Browse repository at this point
Copy the full SHA 35fe8faView commit details -
Update stresses and strain rates after calving
Update stresses and strain rates after calving. This allows restart test with damage to pass validation, but may not be the most rigorous fix.
Configuration menu - View commit details
-
Copy full SHA for 07fdc99 - Browse repository at this point
Copy the full SHA 07fdc99View commit details -
Update thickness and tracer halos before velocity solve
Update thickness and tracer halos before velocity solve. This allows eismint2 decomposition test to pass validation.
Configuration menu - View commit details
-
Copy full SHA for f875198 - Browse repository at this point
Copy the full SHA f875198View commit details -
Update temperature and waterFrac in RK loop, but not enthalpy
Update temperature and waterFrac in RK loop, but not enthalpy. Updating enthalpy resulted in negative temperatures, which caused an error in li_thermal. Updating temperature and waterFrac instead after enthalpy is advected allows enthalpy tests in full_integration suite to pass execution and validation.
Configuration menu - View commit details
-
Copy full SHA for 20fdec7 - Browse repository at this point
Copy the full SHA 20fdec7View commit details -
Simple clean-up after code review
Simple clean-up after code review, including moving call to mask calculation, initializing waterFracPrev to zeroes, adding return statements after error messages. Also add a halo update on cellMask and edgeMask before calculating groundedToFloatingThickness and fluxAcrossGroundingLineOnCells.
Configuration menu - View commit details
-
Copy full SHA for fbb6d6d - Browse repository at this point
Copy the full SHA fbb6d6dView commit details -
Initialize RK weights to large negative values
Initialize the various RK weights (rkSSPweights, rkTendWeights, rkSubstepWeights) to large negative values which are overwritten for each case. This will make it obvious if a weight is being used when it should not be.
Configuration menu - View commit details
-
Copy full SHA for d7eac5c - Browse repository at this point
Copy the full SHA d7eac5cView commit details -
Restore calving front within RK loop
Restore calving front within RK loop to prevent velocity solutions on extended ice geometry.
Configuration menu - View commit details
-
Copy full SHA for 3bcd1d9 - Browse repository at this point
Copy the full SHA 3bcd1d9View commit details -
Remove support for config_rk_order = 1
Remove support for config_rk_order = 1 to avoid unnecessary redundancy with config_time_integration = forward_euler while maintaining backward compatibility.
Configuration menu - View commit details
-
Copy full SHA for 13f0908 - Browse repository at this point
Copy the full SHA 13f0908View commit details -
Include calving in Runge-Kutta loop
Include calving in Runge-Kutta loop, rather than implementing it afterwards.
Configuration menu - View commit details
-
Copy full SHA for e7e1f30 - Browse repository at this point
Copy the full SHA e7e1f30View commit details -
Calculate layerThickness after calving in RK loop
Calculate layerThickness after calving in RK loop, which is necessary when calculating weighted averages for RK integration.
Configuration menu - View commit details
-
Copy full SHA for add0633 - Browse repository at this point
Copy the full SHA add0633View commit details -
Revert "Calculate layerThickness after calving in RK loop"
This reverts commit 5e23b98.
Configuration menu - View commit details
-
Copy full SHA for 7073b89 - Browse repository at this point
Copy the full SHA 7073b89View commit details -
Revert "Include calving in Runge-Kutta loop"
This reverts commit 813ee05. After testing and discussion, it is apparent that including calving within the Runge-Kutta loop is not desirable because it changes the domain between stages of the Runge-Kutta integration.
Configuration menu - View commit details
-
Copy full SHA for fb0315f - Browse repository at this point
Copy the full SHA fb0315fView commit details -
Average fluxAcrossGroundingLineOnCells in time integration module
Calculate fluxAcrossGroundingLineOnCells in advection module for each RK stage and then take weighted average after RK integration instead of calcuating fluxAcrossGroundingLineOnCells on final state. This is more consistent with how fluxAcrossGroundingLine (on edges) is treated.
Configuration menu - View commit details
-
Copy full SHA for 51802e1 - Browse repository at this point
Copy the full SHA 51802e1View commit details
Commits on Nov 8, 2023
-
Add logic to control whether velocity is solved before and/or after c…
…alving Add logic to control whether velocity is solved before and/or after calving. This allows both for backward compatibility and for the abilility to use self-consistent velocty, stress, and strain-rate fields when calculating calving.
Configuration menu - View commit details
-
Copy full SHA for ca28f5b - Browse repository at this point
Copy the full SHA ca28f5bView commit details -
Make config_update_velocity_before_calving = .false. the default
Make config_update_velocity_before_calving = .false. the default. This is not necessarily the desired behavior for production runs, but it is necessary for baseline comparison when using forward Euler time integration.
Configuration menu - View commit details
-
Copy full SHA for 4cda648 - Browse repository at this point
Copy the full SHA 4cda648View commit details -
Always update velocity after calving if it was not updated before cal…
…ving. Always update velocity after calving if it was not updated before calving.
Configuration menu - View commit details
-
Copy full SHA for 9ac9af2 - Browse repository at this point
Copy the full SHA 9ac9af2View commit details -
Move subglacial hydro and bed topography updates back to their former…
… positions Move subglacial hydro and bed topography updates back to their original positions. These were initially moved due to the complexity of interaction with RK integration, but I think subsequent changes have made that move unnecessary.
Configuration menu - View commit details
-
Copy full SHA for e2a2f0b - Browse repository at this point
Copy the full SHA e2a2f0bView commit details