Integrates a spectrum forward in time using a 1st order Euler integration scheme.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(spectrum_type), | intent(in) | :: | initial | Initial spectrum instance |
||
type(spectrum_type), | intent(in) | :: | tendency | Spectrum tendency instance |
||
real(kind=rk), | intent(in) | :: | dt | Time step [s] |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
pure elemental type(spectrum_type) function forward_euler_spectrum(initial,&
tendency,dt) result(spec)
!! Integrates a spectrum forward in time using a 1st order Euler integration
!! scheme.
type(spectrum_type),intent(in) :: initial !! Initial spectrum instance
type(spectrum_type),intent(in) :: tendency !! Spectrum tendency instance
real(kind=rk),intent(in) :: dt !! Time step [s]
spec = initial + tendency * dt
endfunction forward_euler_spectrum