A Modular Arbitrary-Order Ocean-Atmosphere Model -- Stochastic implementation
test_aotensor.f90
Go to the documentation of this file.
1 
2 ! test_aotensor.f90
3 !
4 !> Small program to print the inner products.
5 !
6 !> @copyright
7 !> 2015 Lesley De Cruz & Jonathan Demaeyer.
8 !> See LICENSE.txt for license information.
9 !
10 !---------------------------------------------------------------------------!
11 
12 
14 
15  USE params, only: ndim
17  USE util, only: str
18 
19  IMPLICIT NONE
20  INTEGER :: i,j,k,n
21  REAL(KIND=8), PARAMETER :: real_eps = 2.2204460492503131e-16
22 
23  ! Program
24 
25  CALL init_aotensor ! Compute the tensor
26 
27  DO i=1,ndim
28  DO n=1,aotensor(i)%nelems
29  j=aotensor(i)%elems(n)%j
30  k=aotensor(i)%elems(n)%k
31  IF( abs(aotensor(i)%elems(n)%v) .GE. real_eps) THEN
32  write(*,"(A,ES12.5)") "aotensor["//trim(str(i))//"]["//trim(str(j)) &
33  &//"]["//trim(str(k))//"] = ",aotensor(i)%elems(n)%v
34  END IF
35  END DO
36  END DO
37 
38 END PROGRAM test_aotensor
integer ndim
Number of variables (dimension of the model)
Definition: params.f90:85
Utility module.
Definition: util.f90:12
The equation tensor for the coupled ocean-atmosphere model with temperature which allows for an exten...
character(len=20) function, public str(k)
Convert an integer to string.
Definition: util.f90:31
program test_aotensor
Small program to print the inner products.
The model parameters module.
Definition: params.f90:18
type(coolist), dimension(:), allocatable, public aotensor
- Tensor representation of the tendencies.
subroutine, public init_aotensor
Subroutine to initialise the aotensor tensor.