-
Notifications
You must be signed in to change notification settings - Fork 10
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 SoilCanopy diagnostics #699
Conversation
303010d
to
3965bc3
Compare
2f4488a
to
eb00eba
Compare
Could you just look at:
|
There is no requirement for variables defined to be in the model to be in the diagnostics too: only those that are scientifically interesting |
@land_compute "soil_aerodynamic_resistance" SoilCanopyModel p.soil.turbulent_fluxes.r_ae | ||
@land_compute "soil_latent_heat_flux" SoilCanopyModel p.soil.turbulent_flux.lhf | ||
@land_compute "soil_sensible_heat_flux" SoilCanopyModel p.soil.turbulent_fluxes.shf | ||
@land_compute "vapor_flux" SoilCanopyModel p.soil.turbulent_fluxes.vapor_flux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we also have some runoff variables, but where or not they are present depends on the type of RunoffModel we choose. maybe this is something we can accomodate? E.g. NoRunoff() has no additional variables, while TopModel has subsurface, surface runoff in p.soil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine - user decide which diagnostic variable to get, so we can put runoff here, and then user can grab it or not...
For the default, I will think about how to handle this, I am not sure
short_name = "ra", | ||
long_name = "Autotrophic Respiration", | ||
standard_name = "autotrophic_respiration", | ||
units = "mol CO2 m^-2 s^-1", # note throughout: make sure what we express as kg or mol, CO2 or C |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this may be kg of C.
I think we have a bug in the units in the code. Maybe worth fixing in this PR?
https://github.com/CliMA/ClimaLand.jl/blob/main/src/standalone/Vegetation/canopy_parameterizations.jl#L1004 [maintenance is in kg/m^2/s]
but here it is used with An: https://github.com/CliMA/ClimaLand.jl/blob/main/src/standalone/Vegetation/canopy_parameterizations.jl#L1040
and An has units of mol CO2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to decide together what to do with flux of CO2 @braghiere , do we express them is mol CO2
, kg C
, or other?
These are all SI, so we just have to pick one.
Usually, in the literature, we use mol CO2 for fluxes (umol), and kg C for budgets (change in pool size or pool size).
I would vote for mol CO2, but let's all agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. Carbon fluxes is usually in umolCO2.m-2.s-1 (or kgCm-2-day-1) and pools are in kgC.
40fcc0f
to
b409e1a
Compare
a538e04
to
f19144f
Compare
5bb93ea
to
e9b3e15
Compare
123ae0c
to
775c321
Compare
d7446fa
to
0b76a1b
Compare
0b76a1b
to
ae13b0d
Compare
01c3183
to
9f4c20f
Compare
0fd14bf
to
e700a9d
Compare
This PR finalizes the addition of SoilCanopyModel diagnostics. It also adds a macro to generate land compute functions, an optional argument for period averaging for default diagnostics, an optional argument for ":long" (all) or ":short" (a few essentials) for default diagnostics. Diagnostics are now used in global_soil_canopy.jl. EnergyHydrology model diagnostics_compute methods have been added. Plots are now prettier, using GeoMakie. Co-authored-by: AlexisRenchon <a.renchon@gmail.com> Co-authored-by: SBozzolo <gbozzola@caltech.edu> Co-authored-by: kmdeck <kdeck@caltech.edu> Co-authored-by: braghiere <renato.braghiere@gmail.com>
e700a9d
to
9998ef0
Compare
Purpose
This is a second major PR to introduce diagnostics in ClimaLand.
To do:
next PR 1:
next PR 2:
next PR 3: