The equation tensor for the coupled ocean-atmosphere model with temperature which allows for an extensible set of modes in the ocean and in the atmosphere.
More...
|
| integer function | psi (i) |
| | Translate the \(\psi_{a,i}\) coefficients into effective coordinates. More...
|
| |
| integer function | theta (i) |
| | Translate the \(\theta_{a,i}\) coefficients into effective coordinates. More...
|
| |
| integer function | a (i) |
| | Translate the \(\psi_{o,i}\) coefficients into effective coordinates. More...
|
| |
| integer function | t (i) |
| | Translate the \(\delta T_{o,i}\) coefficients into effective coordinates. More...
|
| |
| integer function | kdelta (i, j) |
| | Kronecker delta function. More...
|
| |
| subroutine | coeff (i, j, k, v) |
| | Subroutine to add element in the aotensor \(\mathcal{T}_{i,j,k}\) structure. More...
|
| |
| subroutine | add_count (i, j, k, v) |
| | Subroutine to count the elements of the aotensor \(\mathcal{T}_{i,j,k}\). Add +1 to count_elems(i) for each value that is added to the tensor i-th component. More...
|
| |
| subroutine | compute_aotensor (func) |
| | Subroutine to compute the tensor aotensor. More...
|
| |
| subroutine, public | init_aotensor |
| | Subroutine to initialise the aotensor tensor. More...
|
| |
|
| integer, dimension(:), allocatable | count_elems |
| | Vector used to count the tensor elements. More...
|
| |
| real(kind=8), parameter | real_eps = 2.2204460492503131e-16 |
| | Epsilon to test equality with 0. More...
|
| |
| type(coolist), dimension(:), allocatable, public | aotensor |
| | \(\mathcal{T}_{i,j,k}\) - Tensor representation of the tendencies. More...
|
| |
The equation tensor for the coupled ocean-atmosphere model with temperature which allows for an extensible set of modes in the ocean and in the atmosphere.
- Copyright
- 2015 Lesley De Cruz & Jonathan Demaeyer. See LICENSE.txt for license information.
| integer function aotensor_def::a |
( |
integer |
i | ) |
|
|
private |
Translate the \(\psi_{o,i}\) coefficients into effective coordinates.
Definition at line 76 of file aotensor_def.f90.
| subroutine aotensor_def::add_count |
( |
integer, intent(in) |
i, |
|
|
integer, intent(in) |
j, |
|
|
integer, intent(in) |
k, |
|
|
real(kind=8), intent(in) |
v |
|
) |
| |
|
private |
Subroutine to count the elements of the aotensor \(\mathcal{T}_{i,j,k}\). Add +1 to count_elems(i) for each value that is added to the tensor i-th component.
- Parameters
-
| i | tensor \(i\) index |
| j | tensor \(j\) index |
| k | tensor \(k\) index |
| v | value that will be added |
Definition at line 124 of file aotensor_def.f90.
124 INTEGER,
INTENT(IN) :: i,j,k
125 REAL(KIND=8),
INTENT(IN) :: v
126 IF (abs(v) .ge. real_eps) count_elems(i)=count_elems(i)+1
| subroutine aotensor_def::coeff |
( |
integer, intent(in) |
i, |
|
|
integer, intent(in) |
j, |
|
|
integer, intent(in) |
k, |
|
|
real(kind=8), intent(in) |
v |
|
) |
| |
|
private |
Subroutine to add element in the aotensor \(\mathcal{T}_{i,j,k}\) structure.
- Parameters
-
| i | tensor \(i\) index |
| j | tensor \(j\) index |
| k | tensor \(k\) index |
| v | value to add |
Definition at line 99 of file aotensor_def.f90.
99 INTEGER,
INTENT(IN) :: i,j,k
100 REAL(KIND=8),
INTENT(IN) :: v
102 IF (.NOT.
ALLOCATED(aotensor)) stop
"*** coeff routine : tensor not yet allocated ***" 103 IF (.NOT.
ALLOCATED(aotensor(i)%elems)) stop
"*** coeff routine : tensor not yet allocated ***" 104 IF (abs(v) .ge. real_eps)
THEN 105 n=(aotensor(i)%nelems)+1
107 aotensor(i)%elems(n)%j=j
108 aotensor(i)%elems(n)%k=k
110 aotensor(i)%elems(n)%j=k
111 aotensor(i)%elems(n)%k=j
113 aotensor(i)%elems(n)%v=v
| subroutine aotensor_def::compute_aotensor |
( |
external |
func | ) |
|
|
private |
Subroutine to compute the tensor aotensor.
- Parameters
-
| func | External function to be used |
Definition at line 132 of file aotensor_def.f90.
| subroutine, public aotensor_def::init_aotensor |
( |
| ) |
|
Subroutine to initialise the aotensor tensor.
Definition at line 202 of file aotensor_def.f90.
209 ALLOCATE(aotensor(ndim),count_elems(ndim),
stat=allocstat)
210 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 213 CALL compute_aotensor(add_count)
216 ALLOCATE(aotensor(i)%elems(count_elems(i)),
stat=allocstat)
217 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 220 DEALLOCATE(count_elems,
stat=allocstat)
221 IF (allocstat /= 0) stop
"*** Deallocation problem ! ***" 223 CALL compute_aotensor(coeff)
225 CALL simplify(aotensor)
227 CALL deallocate_inprod
| integer function aotensor_def::kdelta |
( |
integer |
i, |
|
|
integer |
j |
|
) |
| |
|
private |
Kronecker delta function.
Definition at line 88 of file aotensor_def.f90.
90 IF (i == j) kdelta = 1
| integer function aotensor_def::psi |
( |
integer |
i | ) |
|
|
private |
Translate the \(\psi_{a,i}\) coefficients into effective coordinates.
Definition at line 64 of file aotensor_def.f90.
| integer function aotensor_def::t |
( |
integer |
i | ) |
|
|
private |
Translate the \(\delta T_{o,i}\) coefficients into effective coordinates.
Definition at line 82 of file aotensor_def.f90.
83 t = i + 2 * natm + noc
| integer function aotensor_def::theta |
( |
integer |
i | ) |
|
|
private |
Translate the \(\theta_{a,i}\) coefficients into effective coordinates.
Definition at line 70 of file aotensor_def.f90.
| type(coolist), dimension(:), allocatable, public aotensor_def::aotensor |
\(\mathcal{T}_{i,j,k}\) - Tensor representation of the tendencies.
Definition at line 45 of file aotensor_def.f90.
45 TYPE(coolist),
DIMENSION(:),
ALLOCATABLE,
PUBLIC :: aotensor
| integer, dimension(:), allocatable aotensor_def::count_elems |
|
private |
Vector used to count the tensor elements.
Definition at line 37 of file aotensor_def.f90.
37 INTEGER,
DIMENSION(:),
ALLOCATABLE :: count_elems
| real(kind=8), parameter aotensor_def::real_eps = 2.2204460492503131e-16 |
|
private |
Epsilon to test equality with 0.
Definition at line 40 of file aotensor_def.f90.
40 REAL(KIND=8),
PARAMETER :: real_eps = 2.2204460492503131e-16