dvalters / HAIL-CAESAR

The High-Performance Architecture-Independent LISFLOOD-CAESAR model of floodplain, river, and sediment dynamics
http://dvalters.github.io/HAIL-CAESAR
GNU General Public License v3.0
38 stars 12 forks source link

Refactor to clarify use of the main (erosion) timestep and the hydro-model timestep #5

Closed dvalters closed 6 years ago

dvalters commented 6 years ago

Previously the terms global_time_factor and local_time_factor were being used, originally named after the port from dvalters/CAESAR-Lisflood@eb544c035e1ad0cee1c7c6d05707cd40f5f548ef. The model has two timesteps, one for the hydro/flow-routing model and one for the erosion model, which is also the "general" timestep (Originally it was just called time_factor in CL). "Global" and "local" are confusing nomenclature. There is nothing spatially local about the local timestep - it is in fact the timestep for the hydro model/flow routing etc.

From the Coulthard paper (2013):

In CAESAR-Lisflood there are two controls on the model time step. First, for the flow model the CFL condition (Equation 3) and second, for the erosion and deposition components (from CAESAR). The time step is determined by the amount of erosion and deposition in a cell (Coulthard et al., 2002; Van de Wiel et al., 2007).

This leads to situations where the flow model time step is smaller than the erosion/deposition time step (for example during low flows when there is little or no erosion/deposition) and conversely where the erosion/deposition time step is much smaller than the flow model time step (for example during high low events where there is significant erosion/deposition). Therefore, CAESAR-Lisflood automatically chooses the smaller time step from either component.

Equation 3 from Coulthard et al (2013)

This changeset refactors the CFL calculation into its own function to avoid code duplication, and renames the time_step variables to more sensible names.

The general time_step variable is also used as the erosion time step. (I think this is slightly confusing still and may return for further refactoring.)