1 | MODULE sol_oce |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE sol_oce *** |
---|
4 | !! Ocean solver : solver variables defined in memory |
---|
5 | !!===================================================================== |
---|
6 | !! |
---|
7 | !! ** Purpose : Define in memory solver variables |
---|
8 | !! |
---|
9 | !! History : |
---|
10 | !! 9.0 ! 02-11 (G. Madec) F90: Free form and module |
---|
11 | !!---------------------------------------------------------------------- |
---|
12 | !! OPA 9.0 , LOCEAN-IPSL (2005) |
---|
13 | !! $Id$ |
---|
14 | !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt |
---|
15 | !!---------------------------------------------------------------------- |
---|
16 | !! * Modules used |
---|
17 | USE par_oce ! ocean parameters |
---|
18 | |
---|
19 | IMPLICIT NONE |
---|
20 | PRIVATE |
---|
21 | |
---|
22 | !!---------------------------- |
---|
23 | !! elliptic solver: SOR or PCG |
---|
24 | !! --------------------------- |
---|
25 | INTEGER , PUBLIC :: & !!: namsol elliptic solver / free surface |
---|
26 | nsolv = 1 , & !: = 1/2 type of elliptic solver |
---|
27 | nsol_arp = 0 , & !: = 0/1 absolute/relative precision convergence test |
---|
28 | nmin = 300 , & !: minimum of iterations for the SOR solver |
---|
29 | nmax = 800 , & !: maximum of iterations for the SOR solver |
---|
30 | nmod = 10 !: frequency of test for the SOR solver |
---|
31 | |
---|
32 | REAL(wp), PUBLIC :: & !!: namsol elliptic solver / free surface |
---|
33 | eps = 1.e-6_wp , & !: absolute precision of the solver |
---|
34 | resmax = 1.e-14_wp , & !: absolute precision for the SOR solver |
---|
35 | sor = 1.92_wp , & !: optimal coefficient for the SOR solver |
---|
36 | rnu = 1.0_wp !: strength of the additional force used in free surface |
---|
37 | |
---|
38 | CHARACTER(len=1), PUBLIC :: & !: |
---|
39 | c_solver_pt = 'T' !: nature of grid-points T (S) for free surface case |
---|
40 | |
---|
41 | INTEGER , PUBLIC :: & !: |
---|
42 | ncut, & !: indicator of solver convergence |
---|
43 | niter !: number of iteration done by the solver |
---|
44 | |
---|
45 | REAL(wp), PUBLIC :: & !: |
---|
46 | epsr, & !: relative precision for SOR & PCG solvers |
---|
47 | rnorme, res, & !: intermediate modulus, solver residu |
---|
48 | alph, & !: coefficient =(gcr,gcr)/(gcx,gccd) |
---|
49 | beta, & !: coefficient =(rn+1,rn+1)/(rn,rn) |
---|
50 | radd, & !: coefficient =(gccd,gcdes) |
---|
51 | rr !: coefficient =(rn,rn) |
---|
52 | |
---|
53 | REAL(wp), PUBLIC, DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj,4) :: & !: |
---|
54 | gcp !: barotropic matrix extra-diagonal elements |
---|
55 | |
---|
56 | REAL(wp), PUBLIC, DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj) :: & !: |
---|
57 | gcx, gcxb, & !: now, before solution of the elliptic equation |
---|
58 | gcdprc, & !: inverse diagonal preconditioning matrix |
---|
59 | gcdmat, & !: diagonal preconditioning matrix |
---|
60 | gcb, & !: second member of the barotropic linear system |
---|
61 | gcr, & !: residu =b-a.x |
---|
62 | gcdes, & !: vector descente |
---|
63 | gccd !: vector such that ca.gccd=a.d (ca-1=gcdprc) |
---|
64 | |
---|
65 | #if defined key_agrif |
---|
66 | REAL(wp), DIMENSION(jpi,jpj) :: laplacu, laplacv |
---|
67 | #endif |
---|
68 | |
---|
69 | !!---------------------------------------------------------------------- |
---|
70 | END MODULE sol_oce |
---|