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

add coupler fields based on simulation types #1207

Merged
merged 2 commits into from
Feb 27, 2025
Merged

add coupler fields based on simulation types #1207

merged 2 commits into from
Feb 27, 2025

Conversation

juliasloan25
Copy link
Member

@juliasloan25 juliasloan25 commented Feb 25, 2025

Purpose

closes #1206

This makes the coupler design more flexible to accommodate a wide variety of component models. When we add the full land model, it will add the following coupler fields:

  • SW_d
  • LW_d
  • cos_zenith_angle
  • diffuse_fraction
  • c_co2
  • emissivity
  • d_sfc (displacement height)
  • P_air
  • T_air
  • q_air

Content

  • add default coupler fields required to run coupled simulation
  • add a function that dispatches on model type and adds fields for each model
  • add fields for conservation only if enabled

  • I have read and checked the items on the review checklist.

@@ -185,11 +185,11 @@ Interfacer.get_field(sim::ClimaAtmosSimulation, ::Val{:thermo_state_int}) =
CC.Spaces.level(sim.integrator.p.precomputed.ᶜts, 1)
Interfacer.get_field(atmos_sim::ClimaAtmosSimulation, ::Val{:water}) =
ρq_tot(atmos_sim.integrator.p.atmos.moisture_model, atmos_sim.integrator)
function Interfacer.update_field!(sim::ClimaAtmosSimulation, ::Val{:surface_temperature}, csf)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just unifying this function call with other update_field!s

@Sbozzolo Sbozzolo enabled auto-merge February 27, 2025 00:25
@Sbozzolo Sbozzolo merged commit b30a881 into main Feb 27, 2025
11 checks passed
@Sbozzolo Sbozzolo deleted the js/csf branch February 27, 2025 01:17
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 this pull request may close these issues.

Dispatch on component model types to construct coupler fields
3 participants