Skip to content

Conversation

ldfowler58
Copy link
Contributor

This PR adds .gitignore files in directories ./src/external, ./src/core_atmosphere/diagnostics, and ./src/core_atmosphere/utiles to avoid listing *.f90 files with "git status" when compiling MPAS-Model with the option GEN_F90=true.

mgduda and others added 4 commits July 7, 2025 10:06
… top-to-bottom

Note: The changes in this commit mirror those in commit f232665, but this
commit concerns to the code for producing LBCs rather than the code for
producing ICs.

The code in the init_atm_case_lbc routine for vertically interpolating relative
humidity and specific humidity for LBCs assumed that first-guess levels would be
given in bottom-to-top order when attempting to vertically extrapolate to model
levels below the lowest first-guess level. The relevant code for relative
humidity read as follows -- the code for specific humidity is similar.

  if (target_z < z_fg(1,iCell) .and. k < nVertLevels) relhum(k,iCell) = relhum(k+1,iCell)

If first-guess levels are not given in bottom-to-top order, then z_fg(1,iCell)
does not necessarily contain the height of the surface in the first-guess data,
resulting in a copy of vertically interpolated relative humidity level k+1 to
level k.

One possible fix for this issue might be to compare target_z with
sorted_arr(1,1). Since sorted_arr is always sorted in ascending order by its
first index, the check to decide when to copy/extrapolate relative humidity
would be independent of the order in which first-guess levels were provided.
If the comparison were to be made against sorted_arr(1,1) rather than against
z_fg(1,iCell), the effect would be to copy the lowest *interpolated* level
downward to model levels below the first-guess ground.

An alternative fix adopted in this commit is to simply delete the logic to
explicitly copy/extrapolate downward, since both relative humidity and specific
humidity are vertically interpolated with extrap=0, which specifies constant-
value extrapolation. In this case, the lowest *first-guess* level -- rather than
the lowest *interpolated* level -- is copied downward.

Note: The issue being addressed by this commit is a dependence on the order in
which levels are given in the input intermediate file, and not on the direction
in which the first-guess model indexes its levels.
This commit updates the tag to 20250616-MPASv8.3 for the MMM-physics external in
the src/core_atmosphere/Externals.cfg file to address an issue with .F90 files
not being re-compiled to .o files if a .F90 file was modified. With the updated
tag, compiling the atmosphere core, then making changes to any of the .F90 files
in src/core_atmosphere/physics/physics_mmm/, then running 'make' again (without
first cleaning) leads to the modified .F90 files correctly being re-compiled.
…re/diagnostics, and

  ./src/core_atmosphere/utils to avoid listing *.f90 when compiling MPAS-Model with the
  option GEN_F90=true.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants