Skip to content
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

Land model compat update #895

Closed
kmdeck opened this issue Jul 15, 2024 · 0 comments · Fixed by #896
Closed

Land model compat update #895

kmdeck opened this issue Jul 15, 2024 · 0 comments · Fixed by #896
Assignees

Comments

@kmdeck
Copy link
Member

kmdeck commented Jul 15, 2024

Update coupler to use land 0.14

Once the land model releases 0.14, we can delete these lines in the same PR that updates coupler compat to 0.14

# TODO remove this function after ClimaLand v0.8.1 update
function CL.turbulent_fluxes(atmos::CL.CoupledAtmosphere, model::CL.Bucket.BucketModel, Y, p, t)
# coupler has done its thing behind the scenes already
model_name = CL.name(model)
model_cache = getproperty(p, model_name)
return model_cache.turbulent_fluxes
end
function CL.initialize_drivers(a::CL.CoupledAtmosphere{FT}, coords) where {FT}
keys = (:P_liq, :P_snow)
types = ([FT for k in keys]...,)
domain_names = ([:surface for k in keys]...,)
model_name = :drivers
# intialize_vars packages the variables as a Interfacer.named tuple,
# as part of a Interfacer.named tuple with `model_name` as the key.
# Here we just want the variable Interfacer.named tuple itself
vars = CL.initialize_vars(keys, types, domain_names, coords, model_name)
return vars.drivers
end

as the land model already has them:
https://github.com/CliMA/ClimaLand.jl/blob/2c7efd9e21a3108ba79b37fcdb8eb6501ce17e19/src/shared_utilities/drivers.jl#L725
https://github.com/CliMA/ClimaLand.jl/blob/2c7efd9e21a3108ba79b37fcdb8eb6501ce17e19/src/shared_utilities/drivers.jl#L330

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 a pull request may close this issue.

3 participants