Skip to content

Add GEOS-MLT upper atmosphere dynamics - #130

Open
Andrew-won-Lee wants to merge 30 commits into
GEOS-11_7_2-MLT-0_0_1from
feature/awlee/geos-mlt
Open

Andrew-won-Lee wants to merge 30 commits into
GEOS-11_7_2-MLT-0_0_1from
feature/awlee/geos-mlt

Conversation

@Andrew-won-Lee

Copy link
Copy Markdown

Summary

This PR merges the GEOS-MLT upper-atmosphere updates into the GEOS-11_7_2-MLT-0_0_1 integration branch.

The changes extend the FV3/GFDL atmospheric dynamics needed for the GEOS-MLT.

Changes

  • Add NRLMSIS 2.1 support and runtime resources for time-dependent F10.7, F10.7A, and Ap forcing.
  • Diagnose O, N2, and O2 composition from MSIS and use it to derive GEOS-MLT thermodynamic properties (gas constant, specific heat, kappa, and conductivity related coefficients).
  • Add pressure-based implicit thermal conduction for the upper atmosphere.
  • Add implicit molecular momentum diffusion with runtime controls and optional dissipative heating.
  • Update upper atmosphere vertical remapping, grid staggering, geopotential handling, and related FV3 dynamics for the GEOS-MLT.
  • Install the MSIS parameter and solar/geomagnetic input files as GEOS runtime resources.

The GEOS-MLT specific behavior is enabled through the GEOS-MLT configuration so that standard GEOS configurations retain their existing path.

Related work

This PR is intended to be used with the corresponding GEOS-MLT updates in FVdycoreCubed_GridComp, GEOSgcm_GridComp, GEOSradiation_GridComp, and GEOSgcm_App.

The target integration branch is based on the GFDL atmospheric component (geos/v2.9.1) used by GEOSgcm v11.7.2.

Andrew W. Lee added 26 commits April 30, 2026 13:55
… friction based, roll back the centeralized MSIS startegy because in that case we reencountered gz issue in geopk.
Update hydrostatic layer thickness from the newly diagnosed geopotential
during FV3 dynamics (n_split) and after Lagrangian-to-Eulerian remapping.

This ensures that MSIS altitude calculations use the evolving hydrostatic
geometry rather than a frozen DZ field inherited from the restart. The
nonhydrostatic update_dz_d pathway is unchanged.
Allow hydrostatic altitude reconstruction to continue over below-sea-level
surfaces in both dyn_core and fv_mapz.

Clamp negative layer-midpoint altitudes to 0 km only for the MSIS input while
preserving the actual interface heights for upward geometric integration.

This prevents valid low elevation columns, such as the Caspian Sea region!!,
from switching the entire column to the pressure-based altitude fallback.
Initialize the dynamics-side MSIS wrapper during FV3 setup and pass the correct UT seconds since midnight from the ESMF clock.

Cache F10.7, F10.7A, and Ap once per model hour to avoid repeatedly searching the space-weather table at every grid point and level. Continue evaluating MSIS independently at each requested location and altitude.

Require exact hourly index records and stop when the forcing table is unavailable or does not cover the current model time.
Correct two grid-staggering inconsistencies affecting the GEOS-MLT
upper-atmosphere calculations.

First, interpolate the hydrostatic top-interface pk from the A grid to
the B grid in one_grad_p. Standard FV3 skips this interpolation because
the top value is horizontally constant. In GEOS-MLT, however, the local
Kappa_MLT field makes the top-interface pk horizontally variable, so
the standard assumption is no longer valid.

Start the interpolation at k=1 for hydrostatic GEOS-MLT config,
while preserving the existing k=2 behavior for all other configurations.

Second, preserve the final A-grid interface geopotential before the
pressure-gradient routines convert the working gz array to the B grid
in place. Molecular momentum diffusion and thermal conduction are
A-grid vertical column operators called after the acoustic split loop.
Pass the preserved A-grid geopotential to these operators instead of
the B-grid-converted working array.
Recomputes geopotential after pt is adjusted to the MLT-aware pkz
Replaces the explicit vertical conduction tendency with a column-wise frozen-coefficient backward-Euler tridiagonal solve.
Replace the explicit GEOS-MLT molecular momentum diffusion calculation
with a backward-Euler implicit vertical solver.

The new implementation solves tridiagonal systems for the future
A-grid zonal and meridional winds and returns the implicit increments
through the existing FV3 tendency interface.

Main changes:
- Add the dynamics timestep to the molecular momentum diffusion routine.
- Solve vertical molecular diffusion implicitly for both wind components.
- Reuse one factored tridiagonal matrix for the zonal and meridional winds.
- Apply the pressure taper to interface dynamic viscosity.
- Retain zero-flux upper and lower boundary conditions.
- Calculate dynamic viscosity directly as Pr * lambda / cp.
- Use double precision for the tridiagonal solver workspace.
- Diagnose optional KE-loss heating from the implicitly solved wind gradients.
- Set the default thermal-conduction tendency limit to false.

Remove redundant molecular momentum diffusion controls:
- geos_mlt_momdiff_diag
- geos_mlt_momdiff_kmax
- geos_mlt_momdiff_print_stride
- geos_mlt_momdiff_nu_scale
- geos_mlt_momdiff_rmax
- geos_mlt_momdiff_nu_max

The remaining runtime controls are:
- geos_mlt_momdiff_enable
- geos_mlt_momdiff_heat
- geos_mlt_momdiff_pr
- geos_mlt_momdiff_pmax_pa
Replace the fixed upper-column thermal-conduction level limit with a
pressure-based active mask.

Previously, NRLMSIS sampling for thermal conduction was restricted to the
top 40 model levels. Although this worked reasonably for the current L190
configuration, the cutoff depended on vertical level index rather than a
physical pressure threshold. As a result, changing the vertical grid could
move the effective thermal-conduction lower boundary to a different
pressure and altitude.

This update defines the thermal-conduction domain using the existing
GEOS-MLT pressure cutoff of 1 Pa (0.01 hPa) and passes the same
conduction-active mask through the thermal-conduction driver.

Main changes:

* Remove the fixed `GEOS_MLT_MSIS_LOOKUP_KMAX = 40` limit.
* Remove the separate 70-km minimum-altitude criterion for MSIS sampling.
* Define thermal-conduction activity from layer-center pressure.
* Pass the pressure-based active mask from `dyn_core` to
  `cond_driver_apply`.
* Restrict MSIS composition sampling to active thermal-conduction layers.
* Use the same active mask when applying the resulting temperature
  tendency.
* Keep MSIS altitude validity checks as numerical safety guards.
* Add consistency checks for the active-mask dimensions.

This makes the thermal-conduction implementation independent of the
number and spacing of vertical levels and ensures that the domain used to
calculate the conduction tendency is consistent with the domain where the
tendency is applied.

The lower boundary remains approximately 1 Pa, below which molecular
thermal conduction is assumed to be small enough to neglect in the current
GEOS-MLT configuration.
@Andrew-won-Lee Andrew-won-Lee added the 0 diff The changes in this pull request have verified to be zero-diff with the target branch. label Sep 16, 2026
Use composition dependent Cp and kappa in the GEOS-MLT subgrid mixing energy calculation.

Reuse the final remap MLT thermodynamic state in fv_sg without additional MSIS calls.

Require valid model time inputs for GEOS-MLT MSIS calculations and accumulate GEOS-MLT tendency diagnostics consistently across k_split.

Require molecular diffusion heating to be used with momentum diffusion.

Restrict GEOS-MLT to remap_option=0 and consv_te=0 until the alternative formulations are made composition aware and validated.

Reduce unnecessary GEOS-MLT work-array allocation and remove unused thermodynamic fields.

Print the GEOS-MLT thermal conduction and molecular diffusion configuration once per model execution instead of once per dynamics call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0 diff The changes in this pull request have verified to be zero-diff with the target branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant