1 |
rpa |
1.1 |
#ifdef ALLOW_LAYERS |
2 |
|
|
|
3 |
|
|
C-- Header for LAYERS package. By Ryan Abernathey. |
4 |
|
|
C-- For computing volume fluxes in isopyncal layers |
5 |
|
|
|
6 |
|
|
C -- Parms |
7 |
|
|
LOGICAL layers_MNC, layers_MDSIO |
8 |
|
|
COMMON /LAYERS_PARMS/ layers_MNC, layers_MDSIO |
9 |
|
|
|
10 |
|
|
C 3D Layers fields. The vertical dimension in these fields is nLayers, |
11 |
|
|
C i.e. the isopycnal coordinate. |
12 |
|
|
C |
13 |
|
|
C layers_UFlux :: U integrated over layer (m^2/s) |
14 |
|
|
C layers_VFlux :: V integrated over layer (m^2/s) |
15 |
|
|
C layers_HU :: Layer thickness at the U point (m) |
16 |
|
|
C layers_HV :: Layer thickness at the V point (m) |
17 |
|
|
|
18 |
|
|
#ifdef LAYERS_UFLUX |
19 |
|
|
_RL layers_UFlux(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nlayers,nSx,nSy) |
20 |
|
|
#ifdef LAYERS_THICKNESS |
21 |
|
|
_RL layers_HU(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nlayers,nSx,nSy) |
22 |
|
|
#endif /* LAYERS_THICKNESS */ |
23 |
|
|
COMMON /LAYERS_U/ layers_UFlux |
24 |
|
|
#ifdef LAYERS_THICKNESS |
25 |
|
|
& , layers_HU |
26 |
|
|
#endif /* LAYERS_THICKNESS */ |
27 |
|
|
#endif /* LAYERS_UFLUX */ |
28 |
|
|
|
29 |
|
|
#ifdef LAYERS_VFLUX |
30 |
|
|
_RL layers_VFlux(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nlayers,nSx,nSy) |
31 |
|
|
#ifdef LAYERS_THICKNESS |
32 |
|
|
_RL layers_HV(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nlayers,nSx,nSy) |
33 |
|
|
#endif /* LAYERS_THICKNESS */ |
34 |
|
|
COMMON /LAYERS_V/ layers_VFlux |
35 |
|
|
#ifdef LAYERS_THICKNESS |
36 |
|
|
& , layers_HV |
37 |
|
|
#endif /* LAYERS_THICKNESS */ |
38 |
|
|
#endif /* LAYERS_VFLUX */ |
39 |
|
|
|
40 |
|
|
C-- The same variables, time-averaged |
41 |
|
|
|
42 |
|
|
#ifdef ALLOW_TIMEAVE |
43 |
|
|
|
44 |
|
|
C Keep track of time |
45 |
|
|
_RL layers_TimeAve(Nlayers,nSx,nSy) |
46 |
|
|
COMMON /LAYERS_TAVE/ layers_TimeAve |
47 |
|
|
|
48 |
|
|
#ifdef LAYERS_UFLUX |
49 |
|
|
_RL layers_UFlux_T(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nlayers,nSx,nSy) |
50 |
|
|
#ifdef LAYERS_THICKNESS |
51 |
|
|
_RL layers_HU_T(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nlayers,nSx,nSy) |
52 |
|
|
#endif /* LAYERS_THICKNESS */ |
53 |
|
|
COMMON /LAYERS_U_TAVE/ layers_UFlux_T |
54 |
|
|
#ifdef LAYERS_THICKNESS |
55 |
|
|
& , layers_HU_T |
56 |
|
|
#endif /* LAYERS_THICKNESS */ |
57 |
|
|
#endif /* LAYERS_UFLUX */ |
58 |
|
|
|
59 |
|
|
#ifdef LAYERS_VFLUX |
60 |
|
|
_RL layers_VFlux_T(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nlayers,nSx,nSy) |
61 |
|
|
#ifdef LAYERS_THICKNESS |
62 |
|
|
_RL layers_HV_T(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nlayers,nSx,nSy) |
63 |
|
|
#endif /* LAYERS_THICKNESS */ |
64 |
|
|
COMMON /LAYERS_V_TAVE/ layers_VFlux_T |
65 |
|
|
#ifdef LAYERS_THICKNESS |
66 |
|
|
& , layers_HV_T |
67 |
|
|
#endif /* LAYERS_THICKNESS */ |
68 |
|
|
#endif /* LAYERS_VFLUX */ |
69 |
|
|
|
70 |
|
|
#endif /* ALLOW_TIMEAVE */ |
71 |
|
|
|
72 |
|
|
|
73 |
|
|
C Isopycnal grid parameters: |
74 |
|
|
C layers_G :: boundaries of isopycnal layers |
75 |
|
|
C dZZ :: the vertical grid spacing |
76 |
|
|
C NZZ :: the number of levels to use in the fine grid |
77 |
|
|
C MapIndex :: indices for mapping ZZ to Z |
78 |
|
|
C MapFact :: factors for interpolating T(Z) to T(ZZ) |
79 |
|
|
|
80 |
|
|
_RL layers_G(nLayers+1) |
81 |
|
|
_RL dZZ |
82 |
|
|
INTEGER MapIndex(FineGridMax), CellIndex(FineGridMax) |
83 |
|
|
_RL MapFact(FineGridMax) |
84 |
|
|
INTEGER NZZ |
85 |
|
|
COMMON /LAYERS_VERT_GRID/ |
86 |
|
|
& layers_G, dZZ, NZZ, MapIndex, MapFact, CellIndex |
87 |
|
|
|
88 |
|
|
|
89 |
|
|
#endif /* ALLOW_LAYERS */ |