Skip to content
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

Add flux-corrected transport scheme to MALI #70

Merged
merged 46 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
119cfd9
Add calls to higher order advection scheme
trhille Oct 10, 2022
7532330
Copy higher-order ocean advection routines
trhille Oct 11, 2022
aac672a
Update Makefile to include fct modules
trhille Mar 8, 2023
47d6154
Initialize fct from tracer_setup
trhille Mar 8, 2023
5dd26c6
Add li_mesh module
trhille Mar 9, 2023
e549c55
Comment out irrelevant parameters and routine in li_mesh
trhille Mar 9, 2023
f97dd56
Add li_config module
trhille Mar 9, 2023
ab8ec14
Add fct variables to Registry
trhille Mar 9, 2023
494d092
Remove ocean variables from li_advection_fct and li_advection_fct_shared
trhille Mar 9, 2023
d9f9317
Update shared Makefile to include li_config
trhille Mar 9, 2023
9518f49
Fix call to li_advection_fct_tend
trhille Mar 9, 2023
30d387c
Fix typo in call to li_config
trhille Mar 9, 2023
414eac6
Remove call to tracer_advection_vert_flx
trhille Mar 9, 2023
83f5168
Clean up mesh variable definitions in li_mesh
trhille Mar 10, 2023
79edb95
Fix public parameter allocations
trhille Mar 13, 2023
3c42538
Clean up li_advection_fct_tend
trhille Mar 13, 2023
a364f7a
Add support for fo thickness with fct tracer advection
trhille Mar 14, 2023
e85d3fd
Apply tendencies to tracers with fct advection
trhille Mar 16, 2023
6da1573
Pass layerThicknessOld to fct tracer advection routine
trhille Mar 16, 2023
8734303
Add support for fct thickness advection
trhille Mar 16, 2023
8d08525
Use cellMask_dynamicMargin to calculate advMaskHighOrder
trhille Mar 17, 2023
36ea0a4
Use dynamic ice mask to define advMaskHighOrder
trhille Mar 22, 2023
12981f5
Use boundaryCell to define advMaskHighOrder
trhille Mar 22, 2023
2c66078
Update nTracers as tracers are added
trhille Mar 22, 2023
ab87706
Allocate arrays after nTracers has been calculated
trhille Mar 23, 2023
0f66471
Pass array of 1s as dummy tracer for fct thickness advection
trhille Mar 23, 2023
7e3d897
Fix bug in marking boundaryCell
trhille Mar 23, 2023
0e6fbb9
Add passiveTracer to help verify advection schemes
trhille Mar 23, 2023
697f7f9
Increase max number of tracers to accomodate passiveTracer
trhille Mar 23, 2023
dae96e7
Pass layerThickness as tracer instead of array of 1s
trhille Mar 24, 2023
4c87809
Change normalThicknessFlux, layerThickness, and tracer definitions
trhille Mar 27, 2023
aa85232
Try new mask for 2nd order terms
trhille Apr 19, 2023
70ec7bb
Make 2nd order and 3rd-4th order masks mutually exclusive
trhille Apr 19, 2023
4104681
Clean up 2nd order mask
trhille Apr 20, 2023
4f313f1
Call li_tracer_advection_fct_tend for thickness and tracers separately
trhille Apr 20, 2023
5889ba6
Make fct conserve mass
trhille Apr 21, 2023
fd6792b
Fix first order flux at ice edge
trhille Apr 21, 2023
8d2f023
Make conserve tracer volume
trhille Aug 3, 2023
38f3f2b
Simple cleanup after code review
trhille Aug 18, 2023
7cff4b7
Throw error forr fct thickness with fo tracer
trhille Aug 18, 2023
9530ad5
Make activeTracerHorizontalAdvectionEdgeFlux optional
trhille Aug 18, 2023
aa2999a
Fix bug with activeTracerHorizontalAdvectionEdgeFlux
trhille Aug 20, 2023
35a89ae
Fix the case of fo thickness, none tracer advection
trhille Aug 22, 2023
f43c26b
Only pass layer thickness tracer for first call to fct
trhille Aug 28, 2023
8f218c3
Change passiveTracer to passiveTracer2d
trhille Aug 28, 2023
52d9a0b
Enable fct thickness advection without tracer advection
trhille Sep 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions components/mpas-albany-landice/src/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<dim name="nISMIP6OceanLayers" units="unitless"
description="The number of layers in the ISMIP6 ocean temperature dataset."
/>
<dim name="maxTracersAdvect" definition="2" units="unitless"
<dim name="maxTracersAdvect" definition="4" units="unitless"
description="The maximum number of tracers to be advected."
/>
<dim name="nRegions" definition="1" units="unitless"
Expand Down Expand Up @@ -110,12 +110,20 @@
<nml_record name="advection" in_defaults="true">
<nml_option name="config_thickness_advection" type="character" default_value="fo" units="unitless"
description="Selection of the method for advecting thickness ('fo' = first-order upwinding)."
possible_values="'fo', 'none'"
possible_values="'fo', 'fct', 'none'"
/>
<nml_option name="config_tracer_advection" type="character" default_value="none" units="unitless"
description="Selection of the method for advecting tracers."
possible_values="'fo', 'none'"
/>
possible_values="'fo', 'fct', 'none'"
/>
<nml_option name="config_horiz_tracer_adv_order" type="integer" default_value="3" units="unitless"
description="Order of polynomial used for tracer reconstruction at cell edges"
possible_values="2, 3 and 4"
/>
<nml_option name="config_advection_coef_3rd_order" type="real" default_value="0.25" units="unitless"
description="Reconstruction of 3rd-order reconstruction to blend with 4th-order reconstuction. Equivalent to beta in Skamarock and Gassmann (2011) eq. 7. 0 is fully 4th order, 1 is fully 3rd order."
possible_values="any real between 0 and 1"
/>
<nml_option name="config_restore_thickness_after_advection" type="logical" default_value=".false." units="unitless"
description="If true, reset thickness to values at previous timestep after advection occurs. This is used for spinning up tracer fields such as damage. When this is true, geometry changes from surface and basal mass balance (grounded or floating) and facemelting are not retained, but changes from calving are."
possible_values=".true. or .false."
Expand Down Expand Up @@ -638,6 +646,10 @@
description="After velocity is calculated there are a few checks for appropriate values in certain geometric configurations. Setting this option to .true. will cause detailed information about those adjustments to be printed."
possible_values=".true. or .false."
/>
<nml_option name="config_check_tracer_monotonicity" type="logical" default_value=".false."
trhille marked this conversation as resolved.
Show resolved Hide resolved
description="Check tracer monotonicity at the end of the monotonic advection routine and write warnings to log file if not monotonic."
possible_values=".true. or .false."
/>
</nml_record>


Expand Down Expand Up @@ -741,6 +753,7 @@
<var name="uReconstructX" packages="higherOrderVelocity"/>
<var name="uReconstructY" packages="higherOrderVelocity"/>
<var name="basalFrictionFlux"/>
<var name="passiveTracer2d"/>
<var name="damage"/>
<var name="calvingVelocityData"/>
<var name="basalMeltInput" packages="hydro"/>
Expand Down Expand Up @@ -850,6 +863,7 @@
<var name="waterPressure" packages="hydro"/>
<var name="channelArea" packages="hydro"/> <!-- this is only needed if running with channels - could be package-controlled -->
<var name="waterFluxMask" packages="hydro"/>
<var name="passiveTracer2d"/>
<var name="damage"/>
<var name="calvingVelocityData"/>
<var name="damageMax"/>
Expand Down Expand Up @@ -1270,6 +1284,9 @@ is the value of that variable from the *previous* time level!
<var name="calvingVelocityData" type="real" dimensions="nCells Time" units="m s^{-1}" time_levs="1"
description="rate of calving front retreat due to calving, represented as a velocity normal to the calving front (in the x-y plane), given by the input netCDF file."
/>
<var name="passiveTracer2d" type="real" dimensions="nCells Time" units="none" time_levs="1"
description="passive tracer used to verify advection routines"
/>
<var name="damage" type="real" dimensions="nCells Time" units="none" time_levs="1"
description="Damage is parameterized as the local ice thickness divided by the fracture depth, such that unfractured ice has damage=0 and ice fractured through its full thickness has damage=1"
/>
Expand Down
6 changes: 6 additions & 0 deletions components/mpas-albany-landice/src/mode_forward/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ OBJS = mpas_li_core.o \
mpas_li_time_integration_fe.o \
mpas_li_diagnostic_vars.o \
mpas_li_advection.o \
mpas_li_advection_fct_shared.o \
mpas_li_advection_fct.o \
mpas_li_calving.o \
mpas_li_statistics.o \
mpas_li_velocity.o \
Expand Down Expand Up @@ -45,8 +47,12 @@ mpas_li_time_integration_fe.o: mpas_li_advection.o \
mpas_li_bedtopo.o

mpas_li_advection.o: mpas_li_thermal.o \
mpas_li_advection_fct.o \
mpas_li_advection_fct_shared.o \
mpas_li_diagnostic_vars.o

mpas_li_advection_fct.o: mpas_li_advection_fct_shared.o

mpas_li_calving.o: mpas_li_thermal.o \
mpas_li_advection.o

Expand Down
Loading