pyshqg.core.constructors module

Submodule dedicated to constructors.

pyshqg.core.constructors.construct_model(backend, config)

Constructs a model from a given configuration.

In practice, this function constructs:

  1. the spectral transformations (section ‘spectral_transformations’);

  2. the vertical parametrisation (section ‘vertical_parametrisation’);

  3. the orography;

  4. the Poisson solver (section ‘poisson_solver’);

  5. the dissipation processes (section ‘dissipation’);

  6. the forcing processes (section ‘forcing’).

The orography and forcing processes require input data, which is taken from the reference dataset as specified in section ‘reference_data’, and then interpolated as specified in section ‘data_interpolation’.

Parameters:
  • backend (pyshqg.backend.Backend object) – The backend.

  • config (dict) – The configuration.

Returns:

model – The constructed model.

Return type:

pyshqg.core.model.QGModel

pyshqg.core.constructors.construct_integrator(config, model)

Constructs a Runge–Kutta integrator for a given model.

Parameters:
  • config (dict) – The integrator parametrisation.

  • model (pyshqg.core_numpy.model.QGModel) – The model to integrate.

Returns:

integrator – The constructed integrator.

Return type:

pyshqg.core_numpy.integration.RungeKuttaModelIntegrator