-
Notifications
You must be signed in to change notification settings - Fork 9
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
Global run of complex land model with ERA5 forcing #591
Conversation
7ce2a1e
to
1ad34d0
Compare
0bc1f59
to
df0e2e8
Compare
66ee2f9
to
6fcda22
Compare
4987b31
to
521bb2e
Compare
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.
This is awesome, thank you Kat! It would be nice to reduce some of the code duplication between the land.jl
and global_soil_canopy.jl
drivers (and maybe for the other benchmark runs too), but this is fine for now :)
419eeb4
to
ef442b3
Compare
8b9c637
to
0fc13c5
Compare
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.
LGTM! Thank you for addressing the review so thoroughly :) I left a few more minor comments
df1a7cc
to
c96affc
Compare
thank you for the quick and thorough review! |
SAI = FT(0.0) # m2/m2 | ||
f_root_to_shoot = FT(3.5) | ||
RAI = FT(1.0) | ||
K_sat_plant = 5e-9 # m/s # seems much too small? |
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.
K_sat_plant = 5e-9 # m/s # seems much too small? | |
K_sat_plant = FT(5e-9) # m/s # seems much too small? |
h_stem = 0.0 | ||
h_leaf = 1.0 | ||
zmax = 0.0 |
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.
Are there FT
missing here?
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.
youre right! I will go through the file and update it in this PR #669
|
||
# Set the soil CO2 BC to being atmospheric CO2 | ||
soilco2_top_bc = Soil.Biogeochemistry.AtmosCO2StateBC() | ||
soilco2_bot_bc = Soil.Biogeochemistry.SoilCO2FluxBC((p, t) -> 0.0) # no 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.
There's probably a FT missing around 0.0
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 convert the BC into the FT type internally here:
return FT.(bc.bc(p, t)) .+ FT.(ClimaCore.Fields.zeros(axes(Δz))) |
(these are very allocation heavy and we need to update this code anyways!)
|
||
init_soil(ν, θ_r) = θ_r + (ν - θ_r) / 2 | ||
Y.soil.ϑ_l .= init_soil.(ν, θ_r) | ||
Y.soil.θ_i .= FT(0.0) |
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.
Typically, you don't need FT
when you .=
into a Field
@@ -321,7 +321,7 @@ function ClimaLand.Canopy.set_canopy_prescribed_field!( | |||
t, | |||
) where {FT} | |||
(; LAIfunction, SAI, RAI) = component.parameters.ai_parameterization | |||
evaluate!(p.canopy.hydraulics.area_index.leaf, LAIfunction, t) | |||
evaluate!(p.canopy.hydraulics.area_index.leaf, LAIfunction, floor(t)) |
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.
Maybe using round
is better?
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.
Youre right, but I think LAI data is updated every 8 days, so floor vs round makes no real difference here. I am leaving this as is since we will remove it entirely when the bug fix is in.
Purpose
Carry out global run of soil+canopy model on GPU and CPU
To-do
Content
Note: For the benchmark - currently about 1/4 of the time is in setup rather than solve, so maybe we need to change the setup of the simulation. however, making it longer leads to failures, so Im not sure yet.
Note: The experiment does not run on GPU in CI - on caltech - , but it does on GPU on clima (benchmark). For now I removed the run on caltech