We should move the unrolling the BC tuple behavior used in AtmosModel [1] and HydrostaticBoussinesqModel [2] upstream into DGMethods so that all models have a unified way of dealing with multiple boundaries. Thus the default behavior of boundary_state! will be to unroll a tuple of boundary condition types for dispatch and the user will just define the boundary condition per type instead of having to hard code numeric bctypes in the boundary_state! functions.
Also, we can move the AtmosModel to only using boundary_state! instead of needing normal_boundary_flux!. This implementation is working for the ocean and land models so far, so it should also work for the AtmosModel.
In addition to making the boundary condition interface simpler for model developers, this will also make it easier for me to write a tutorial on how to implement boundary conditions for a new model.
For CLIMA Developers
[x] This feature can be added (if it cannot be, explain why in a comment below -- lack of technical expertise, not relevant to the scope of this project, too ambitious)
[ ] There is a timeline for when this feature can be implemented
[ ] The feature has been (or will be) implemented (Please link the PR)
Description
We should move the unrolling the BC tuple behavior used in
AtmosModel
[1] andHydrostaticBoussinesqModel
[2] upstream into DGMethods so that all models have a unified way of dealing with multiple boundaries. Thus the default behavior ofboundary_state!
will be to unroll a tuple of boundary condition types for dispatch and the user will just define the boundary condition per type instead of having to hard code numericbctypes
in theboundary_state!
functions. Also, we can move the AtmosModel to only usingboundary_state!
instead of needingnormal_boundary_flux!
. This implementation is working for the ocean and land models so far, so it should also work for the AtmosModel.[1] https://github.com/CliMA/ClimateMachine.jl/blob/master/src/Atmos/Model/boundaryconditions.jl#L45-L80 [2] https://github.com/CliMA/ClimateMachine.jl/blob/master/src/Ocean/HydrostaticBoussinesq/BoundaryConditions.jl#L49-L127
Additional context
In addition to making the boundary condition interface simpler for model developers, this will also make it easier for me to write a tutorial on how to implement boundary conditions for a new model.
For CLIMA Developers