-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change soil albedo to depend of soil moisture (#862)
* Change soil albedo to depend of soil moisture PAR and NIR albedo are moved from the EnergyHydrologyParameters to the auxiliary vars via AtmosDrivenFluxBC. The parameters now hold PAR/NIR wet and dry as a field of float. The old method of creating the parameters with PAR/NIR albedo is marked as deprecated, and the constructor just sets both the wet and dry values to the passed albedo. * Use relative saturation * Make relative saturation in albedo calc not include ice * Add soil albedos to diagnostics * Make experiments use ground albedo maps * Improve diagnostic var names * Update docstring for PrognosticSoilConditions * Make update_albedo! use effective_saturation * Combine par and nir albedo diagnostics * Refactor soil albedo calculation update_albedo is no longer called conditionally. Now it is dispatched to a function that either updates albedo or a function that does nothing. update_albedo takes in model.params instead of each param individually. update_albedo now just uses the top layer of if delta_z is larger than the top depth. top_depth is now a parameter instead of hard coded cache var names are changed. Physically irrelevent vars changed to scratch vars Delete integrated soil-canopy test Previosuly, PAR and NIR albedo were held in a PrognosticSoilConditions struct, which acted as an intermediary between the soil and canopy models. Now, PAR and NIR albedo are stored in the cache, and the struct is only used for dispatch. The integrated soil-canopy test created a PrognosticSoilConditions struct and filled in with a PAR and NIR albedo. Then it called ground_albedo_PAR and ground_albedo_NIR to check the values. Both of those functions now read from the cache. In order to test them, a SoilCanopy model would need to be created, initialized, and then updated. This seems to complex for a test, so this test is deleted. Make run_fluxnet work with new SoilEnergy Make update_albedo! comments better Apply suggestions from code review Co-authored-by: Gabriele Bozzola <gbozzola@caltech.edu> Change top_depth name to alebdo_calc_top_thickness Add convenience constructor for soil albedo maps Fix calls to create_soil_albedo_vars Fix spelling errors Simplify and correct calculate_albedo! Add citation and fix albedo variable constructor error * Remake soil_canopy_lsm test This test was deleted because it would not function with previous changes. As requested, this test was recreated to work with the changes. The previous test simply set an albedo it the top bc struct and then checked it using the ground_albedo functions. With the changes, this would only work with an initialized model. Because this is an integrated model test, I thought it made sense to test the SoilCanopy model instead of just creating a Soil model and checking if the function works. This test, like the old version, calls the ground_albedo functions and checks their value. This does seem very involved for a test, so maybe it should just create a EnergyHydrology model and call the function on its Y and p * Make suggested changes from Gabriele change create_soil_albedo_vars to clm_soil_albedo_properties and use map in it to reduce code duplication made stylistic change when taking mean of PAR and NIR albedo change <:FT to just FT Move salb to short diagnostics Also make other requested changes such as changing surface_liquid_fraction to surface_eff_sat and making docstring more specific Fix albedo constructor and change benchmark sampling Move salb disgnostic and reduce profiling samples revert samples * Merge soil param convenience constructors Fix merge issue fix merge issue 2 * Fix albedo params in snowy_land.jl
- Loading branch information
1 parent
ac3af5f
commit 65a34e0
Showing
26 changed files
with
591 additions
and
185 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
output_0110 |
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.