CliMA / ClimaCore.jl

CliMA model dycore
https://clima.github.io/ClimaCore.jl/dev
Apache License 2.0
85 stars 8 forks source link

Construction of spaces incorporating topography #284

Open simonbyrne opened 2 years ago

simonbyrne commented 2 years ago

After some discussion with @Zhengyu-Huang and Paul, my general thought is to handle this as follows

  1. Construct the horizontal space (i.e. a sphere or rectangle)
  2. Construct the hybrid product space with a pseudo-vertical coordinate: this can either be η in (0,1), or it could be a reference z* in (0, z_top).
  3. Construct a field z_surface on the horizontal space.
  4. Construct a field z_levels on the product face space (this would be as a function of 3 and the pseudo-verical coordinate in 2.)
  5. Take the horizontal covariant gradient of z_levels to get the metric terms.
  6. Update the LocalGeometry terms to get the new space

At a user level, initially I think the process would be

  1. Construct the horizontal space
  2. Construct z_surface (either as a function, or loading from a data file: figuring out how to do this will be a separate issue)
  3. Some sort of function that takes (z_surface, the vertical stretching, and the terrain adaptation), and returns the hybrid space
jakebolewski commented 2 years ago

After discussion with Paul yesterday we also need a global DSS for the derivative values from topography.