-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add getters and setters for variables used to override surface radiat…
…ive fluxes (#244) This PR is tied to ai2cm/fv3gfs-fortran#158. It adds getters and setters for four fields in the fortran model: - `Statein%adjsfcdlw_override` (the downward longwave radiative flux at the surface seen by the land surface model) - `Statein%adjsfcdsw_override` (the downward shortwave radiative flux at the surface seen by the land surface model) - `Statein%adjsfcnsw_override` (the net shortwave radiative flux at the surface seen by the land surface model). - `Radtend%sfalb` (the average surface albedo) The first three are only valid if `gfs_physics_nml.override_surface_radiative_fluxes` is set to `.true.` in the fortran namelist (if it is not set to `.true.`, memory will not be allocated for them). We add a flag to the wrapper to be able to dynamically check this; if it is not set and a user asks to get or set one of these variables, then an informative error will be raised (rather than a model segmentation fault). The test infrastructure for the setters is modified to check this. In adding the new boolean flag, it was discovered that there was a bug in the implementation of earlier boolean flags (#244 (comment)). We fixed this, and added more comprehensive tests of the flags, which did not exist previously. In addition we added a flag for the physics timestep, `dt_atmos`, using the preexisting `get_physics_timestep_subroutine` subroutine. Finally, to check that the fortran diagnostics for the radiative fluxes were updated as expected, we added an additional set of tests (which basically are an automated way of doing what we did in [this notebook](https://github.com/VulcanClimateModeling/explore/blob/master/spencerc/2021-03-04-predicting-radiative-fluxes-online/2021-03-11-verify-diagnostics.ipynb)). We also add a test that ensures that modifying the surface radiative fluxes modifies the temperature after a timestep (indicating that the modifications are being felt by the land surface model).
- Loading branch information
1 parent
1a0679a
commit 1d04999
Showing
18 changed files
with
424 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule external
updated
from d95144 to 94b4ce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.