You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For better CI, we want to set up unit tests in the dependent component model repos that exercise our adapter functions that are required by Interfacer and FluxCalculator, ConservationChecker, and Checkpointer. For now, these test will live in ClimaCoupler, but they should be independent of the coupler source code and able to be moved into component model repos. Namely, we want tests for the following methods:
Atmosphere requirements
get_field(atmos_sim::ClimaAtmosSimulation, ::Val{:field})
where field is in (:radiative_energy_flux, :liquid_precipitation, :snow_precipitation, :turbulent_energy_flux, :turbulent_moisture_flux,
:thermo_state_int, :height_int, :height_sfc, :uv_int, :air_density, :air_temperature, :cv_m, :gas_constant_air, :F_radiative_TOA, :energy, :water) get_thermo_params(sim::AtmosModelSimulation) # this is required by the FluxCalculator, and should be generalized get_surface_params(sim::AtmosModelSimulation) # this is required by the FluxCalculator, and should be extracted using SF.jl directly update_field!(atmos_sim::ClimaAtmosSimulation, ::Val{:field}, field)
(:co2_gm, :surface_temperature, :albedo, :turbulent_fluxes) step!(sim::AtmosModelSimulation, t) reinit!(sim::AtmosModelSimulation) atmos_turbulent_fluxes!(atmos_sim::ClimaAtmosSimulation, csf) # if using the CombinedStateFluxes (i.e. atmos functions to calculate turbulent fluxes) get_model_state_vector(sim::ClimaAtmosSimulation) # required by Checkpointer
@LenkaNovak the description here says we want to add these tests in the component models' individual repos, but all the things we would be testing are inside ClimaCoupler (ClimaAtmosSimulation, get_field, get_thermo_params, etc). Would it make more sense to add the tests in ClimaCoupler?
Following #644, we output warnings/errors if the functions we require aren't implemented. That fills the same role that the tests described in this issue would, so we can close this issue without implementing anything new
For better CI, we want to set up unit tests in the dependent component model repos that exercise our adapter functions that are required by Interfacer and FluxCalculator, ConservationChecker, and Checkpointer. For now, these test will live in ClimaCoupler, but they should be independent of the coupler source code and able to be moved into component model repos. Namely, we want tests for the following methods:
Atmosphere requirements
get_field(atmos_sim::ClimaAtmosSimulation, ::Val{:field})
where field is in (:radiative_energy_flux, :liquid_precipitation, :snow_precipitation, :turbulent_energy_flux, :turbulent_moisture_flux,
:thermo_state_int, :height_int, :height_sfc, :uv_int, :air_density, :air_temperature, :cv_m, :gas_constant_air, :F_radiative_TOA, :energy, :water)
get_thermo_params(sim::AtmosModelSimulation)
# this is required by the FluxCalculator, and should be generalizedget_surface_params(sim::AtmosModelSimulation)
# this is required by the FluxCalculator, and should be extracted using SF.jl directlyupdate_field!(atmos_sim::ClimaAtmosSimulation, ::Val{:field}, field)
(:co2_gm, :surface_temperature, :albedo, :turbulent_fluxes)
step!(sim::AtmosModelSimulation, t)
reinit!(sim::AtmosModelSimulation)
atmos_turbulent_fluxes!(atmos_sim::ClimaAtmosSimulation, csf)
# if using the CombinedStateFluxes (i.e. atmos functions to calculate turbulent fluxes)get_model_state_vector(sim::ClimaAtmosSimulation)
# required by Checkpointer2. Surface model requirements
get_field(atmos_sim::ClimaAtmosSimulation, ::Val{:field})
(:surface_temperature, :surface_humidity, :roughness_momentum, :roughness_buoyancy, :beta, :albedo, :area_fraction, :air_density, :energy, :water)
update_field!(atmos_sim::ClimaAtmosSimulation, ::Val{:field}, field)
(:turbulent_energy_flux, :turbulent_moisture_flux, :radiative_energy_flux, :liquid_precipitation, :snow_precipitation, :air_density)
step!(sim::SurfaceModelSimulation, t)
reinit!(sim::SurfaceModelSimulation)
update_turbulent_fluxes_point!(sim::SurfaceModelSimulation, fields::NamedTuple, colidx::Fields.ColumnIndex)
# if using PartitionedStateFluxesget_model_state_vector(sim::SurfaceModelSimulation)
# required by CheckpointerComponents
The text was updated successfully, but these errors were encountered: