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 , LODYC-IPSL (2003) |
---|
13 | !!---------------------------------------------------------------------- |
---|
14 | !! * Modules used |
---|
15 | USE par_oce ! ocean parameters |
---|
16 | |
---|
17 | IMPLICIT NONE |
---|
18 | PRIVATE |
---|
19 | |
---|
20 | !!----------------------------------- |
---|
21 | !! elliptic solver: SOR, PCG or FETI |
---|
22 | !! ---------------------------------- |
---|
23 | INTEGER , PUBLIC :: & !!: namsol elliptic solver / island / free surface |
---|
24 | nsolv = 1 , & !: = 1/2/3 type of elliptic solver |
---|
25 | nmax = 800 , & !: maximum of iterations for the solver |
---|
26 | nmisl = 4000 !: maximum pcg iterations for island |
---|
27 | |
---|
28 | REAL(wp), PUBLIC :: & !!: namsol elliptic solver / island / free surface |
---|
29 | eps = 1.e-6_wp , & !: absolute precision of the solver |
---|
30 | sor = 1.76_wp , & !: optimal coefficient for sor solver |
---|
31 | epsisl = 1.e-10_wp, & !: absolute precision on stream function solver |
---|
32 | rnu = 1.0_wp !: strength of the additional force used in free surface |
---|
33 | |
---|
34 | CHARACTER(len=1), PUBLIC :: & !: |
---|
35 | c_solver_pt = 'T' !: nature of grid-points T (S) for free surface case |
---|
36 | ! ! F (G) for rigid-lid case |
---|
37 | |
---|
38 | INTEGER , PUBLIC :: & !: |
---|
39 | ncut, & !: indicator of solver convergence |
---|
40 | niter !: number of iteration done by the solver |
---|
41 | |
---|
42 | REAL(wp), PUBLIC :: & !: |
---|
43 | epsr, & !: relative precision for SOR & PCG solvers |
---|
44 | epsilo, & !: precision for the FETI solver |
---|
45 | rnorme, res, & !: intermediate modulus, solver residu |
---|
46 | alph, & !: coefficient =(gcr,gcr)/(gcx,gccd) |
---|
47 | beta, & !: coefficient =(rn+1,rn+1)/(rn,rn) |
---|
48 | radd, & !: coefficient =(gccd,gcdes) |
---|
49 | rr !: coefficient =(rn,rn) |
---|
50 | |
---|
51 | REAL(wp), PUBLIC, DIMENSION(jpi,jpj,4) :: & !: |
---|
52 | gcp !: barotropic matrix extra-diagonal elements |
---|
53 | |
---|
54 | REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: |
---|
55 | gcx, gcxb, & !: now, before solution of the elliptic equation |
---|
56 | gcdprc, & !: inverse diagonal preconditioning matrix |
---|
57 | gcdmat, & !: diagonal preconditioning matrix |
---|
58 | gcb, & !: second member of the barotropic linear system |
---|
59 | gcr, & !: residu =b-a.x |
---|
60 | gcdes, & !: vector descente |
---|
61 | gccd !: vector such that ca.gccd=a.d (ca-1=gcdprc) |
---|
62 | |
---|
63 | #if defined key_feti |
---|
64 | !!---------------------------------------------------------------------- |
---|
65 | !! 'key_feti' : FETI solver |
---|
66 | !!---------------------------------------------------------------------- |
---|
67 | !! noeuds : total number of nodes for a subdomnain |
---|
68 | !! ninterf : neighbour subdomain number |
---|
69 | !! nni : interface point number |
---|
70 | !! ndvois() : neighbour subdomain list |
---|
71 | !! maplistin() : node pointer at each interface |
---|
72 | !! malistin() : concatened list of interface nodes |
---|
73 | |
---|
74 | INTEGER, PUBLIC :: nim,nxm, & |
---|
75 | malxm,malim,malxmax,malimax, & |
---|
76 | nifmat,njfmat,nelem,npe,matopo, & |
---|
77 | noeuds,nmorse,maan, & |
---|
78 | ninterf,ninterfc,nni,nnic,nnih,nnitot,ndir, & |
---|
79 | mandvois,mandvoisc, & |
---|
80 | maplistin,maplistih,malistin, & |
---|
81 | malisdir,npblo,mablo,ndlblo,ndkerep, & |
---|
82 | malisblo,mansp,ndimax, & |
---|
83 | miax,may,maz,mapoids, & |
---|
84 | nmaxd,mjj0,nitmax,ntest, & |
---|
85 | mabitw,mautilu,malambda,mag,mamg,mapg,mawj,madwj,madwwj, & |
---|
86 | magh,maw,madw, & |
---|
87 | mautil,mav,madia,mabufin,mabufout,mawork,maae,magamm, & |
---|
88 | maxnul,maynul,numit0ete,nitmaxete,maeteg,maeteag, & |
---|
89 | maeted,maetead,maeteadd,maetegamm,maetev,maetew, & |
---|
90 | madwork |
---|
91 | |
---|
92 | INTEGER, PUBLIC :: mfet(jpi*jpj+2*jpi+2*jpj+51) |
---|
93 | |
---|
94 | REAL(wp), PUBLIC :: & !: |
---|
95 | wfeti(jpj*jpi*jpi+13*jpi*jpj+19*(jpi+jpj) & |
---|
96 | +4*jpnij+33 & |
---|
97 | +2*(jpi+jpj)*(jpnij-jpni)*jpi & |
---|
98 | +2*(jpi+jpj)*(jpnij-jpnj+jperio)*jpj & |
---|
99 | +3*(jpnij-jpni)*jpi & |
---|
100 | +3*(jpnij-jpnj+jperio)*jpj) |
---|
101 | |
---|
102 | REAL(wp), PUBLIC :: res2, rcompt |
---|
103 | |
---|
104 | #endif |
---|
105 | |
---|
106 | !!---------------------------------------------------------------------- |
---|
107 | END MODULE sol_oce |
---|