1 | MODULE sed |
---|
2 | !!====================================================================== |
---|
3 | !! *** sed *** |
---|
4 | !! Sediment : set sediment global variables |
---|
5 | !!====================================================================== |
---|
6 | !! History : |
---|
7 | !! ! 06-12 (C. Ethe) Orignal |
---|
8 | !!---------------------------------------------------------------------- |
---|
9 | USE oce_sed |
---|
10 | USE in_out_manager |
---|
11 | |
---|
12 | |
---|
13 | IMPLICIT NONE |
---|
14 | PUBLIC |
---|
15 | |
---|
16 | PUBLIC sed_alloc |
---|
17 | |
---|
18 | !! Namelist |
---|
19 | REAL(wp), PUBLIC :: reac_sil !: reactivity of silicate in [l.mol-1.s-1] |
---|
20 | REAL(wp), PUBLIC :: reac_clay !: reactivity of clay in [l.mol-1.s-1] |
---|
21 | REAL(wp), PUBLIC :: reac_ligc !: reactivity of Ligands [l.mol-1.s-1] |
---|
22 | REAL(wp), PUBLIC :: reac_pocl !: reactivity of pocl in [s-1] |
---|
23 | REAL(wp), PUBLIC :: reac_pocs !: reactivity of pocs in [s-1] |
---|
24 | REAL(wp), PUBLIC :: reac_pocr !: reactivity of pocr in [s-1] |
---|
25 | REAL(wp), PUBLIC :: reac_nh4 !: reactivity of NH4 in [l.mol-1.s-1] |
---|
26 | REAL(wp), PUBLIC :: reac_h2s !: reactivity of ODU in [l.mol-1.s-1] |
---|
27 | REAL(wp), PUBLIC :: reac_fe2 !: reactivity of Fe2+ in [l.mol-1.s-1] |
---|
28 | REAL(wp), PUBLIC :: reac_feh2s !: reactivity of Fe2+ in [l.mol-1.s-1] |
---|
29 | REAL(wp), PUBLIC :: reac_fes !: reactivity of Fe with H2S in [l.mol-1.s-1] |
---|
30 | REAL(wp), PUBLIC :: reac_feso !: reactivity of FeS with O2 in [l.mol-1.s-1] |
---|
31 | REAL(wp), PUBLIC :: reac_cal !: reactivity of cal in [l.mol-1.s-1] |
---|
32 | REAL(wp), PUBLIC :: adsnh4 !: adsorption coefficient of NH4 |
---|
33 | REAL(wp), PUBLIC :: ratligc !: C/L ratio in POC |
---|
34 | REAL(wp), PUBLIC :: so2ut |
---|
35 | REAL(wp), PUBLIC :: srno3 |
---|
36 | REAL(wp), PUBLIC :: spo4r |
---|
37 | REAL(wp), PUBLIC :: srDnit |
---|
38 | REAL(wp), PUBLIC :: dtsed !: sedimentation time step |
---|
39 | REAL(wp), PUBLIC :: dtsed2 !: sedimentation time step |
---|
40 | INTEGER , PUBLIC :: nitsed000 |
---|
41 | INTEGER , PUBLIC :: nitsedend |
---|
42 | INTEGER, PUBLIC :: nrseddt |
---|
43 | REAL , PUBLIC :: sedmask |
---|
44 | REAL(wp), PUBLIC :: denssol !: density of solid material |
---|
45 | LOGICAL , PUBLIC :: lrst_sed !: logical to control the trc restart write |
---|
46 | LOGICAL , PUBLIC :: ln_rst_sed = .TRUE. !: initialisation from a restart file or not |
---|
47 | LOGICAL , PUBLIC :: ln_btbz = .FALSE. !: Depth variation of the bioturbation coefficient |
---|
48 | LOGICAL , PUBLIC :: ln_irrig = .FALSE. !: iActivation of the bioirrigation |
---|
49 | LOGICAL , PUBLIC :: ln_sed_2way = .FALSE. !: 2 way coupling with PISCES |
---|
50 | LOGICAL , PUBLIC :: ln_sediment_offline = .FALSE. !: Offline mode for sediment module |
---|
51 | INTEGER , PUBLIC :: nn_rstsed !: control of the time step ( 0 or 1 ) for pass. tr. |
---|
52 | INTEGER , PUBLIC :: nn_dtsed = 1 !: frequency of step on passive tracers |
---|
53 | CHARACTER(len = 80) , PUBLIC :: cn_sedrst_in !: suffix of pass. tracer restart name (input) |
---|
54 | CHARACTER(len = 256), PUBLIC :: cn_sedrst_indir !: restart input directory |
---|
55 | CHARACTER(len = 80) , PUBLIC :: cn_sedrst_out !: suffix of pass. tracer restart name (output) |
---|
56 | CHARACTER(len = 256), PUBLIC :: cn_sedrst_outdir !: restart output directory |
---|
57 | |
---|
58 | ! |
---|
59 | REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: pwcp !: pore water sediment data at given time-step |
---|
60 | REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: pwcp0 !: pore water sediment data at initial time |
---|
61 | REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: solcp !: solid sediment data at given time-step |
---|
62 | REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: solcp0 !: solid sediment data at initial time |
---|
63 | REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: diff |
---|
64 | |
---|
65 | !! * Shared module variables |
---|
66 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: pwcp_dta !: pore water data at given time-step |
---|
67 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: rainrm_dta !: rain data at at initial time |
---|
68 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: rainrm !: rain data at given time-step |
---|
69 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: rainrg !: rain of each solid component in [g/(cm**2.s)] |
---|
70 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: fromsed !: |
---|
71 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: tosed !: |
---|
72 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: rloss !: |
---|
73 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: tokbot |
---|
74 | ! |
---|
75 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: temp !: temperature |
---|
76 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: salt !: salinity |
---|
77 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: press !: pressure |
---|
78 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: raintg !: total massic flux rained in each cell (sum of sol. comp.) |
---|
79 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: fecratio !: Fe/C ratio in falling particles to the sediments |
---|
80 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: dzdep !: total thickness of solid material rained [cm] in each cell |
---|
81 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: zkbot !: total thickness of solid material rained [cm] in each cell |
---|
82 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: wacc !: total thickness of solid material rained [cm] in each cell |
---|
83 | ! |
---|
84 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: hipor !: [h+] in mol/kg*densSW |
---|
85 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: co3por !: [co3--]solid sediment at initial time |
---|
86 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: dz3d !: ??? |
---|
87 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: volw3d !: ??? |
---|
88 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: vols3d !: ??? |
---|
89 | |
---|
90 | |
---|
91 | !! Chemistry |
---|
92 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: densSW |
---|
93 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: borats |
---|
94 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: calcon2 |
---|
95 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: akbs |
---|
96 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: ak1s |
---|
97 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: ak2s |
---|
98 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: akws |
---|
99 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: ak12s |
---|
100 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: ak1ps |
---|
101 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: ak2ps |
---|
102 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: ak3ps |
---|
103 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: ak12ps |
---|
104 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: ak123ps |
---|
105 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: aksis |
---|
106 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: aksps |
---|
107 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: sieqs |
---|
108 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: aks3s |
---|
109 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: akf3s |
---|
110 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: sulfats |
---|
111 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: fluorids |
---|
112 | |
---|
113 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: mol_wgt !: molecular weight of solid sediment data |
---|
114 | |
---|
115 | REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: trc_data !: tracer data to share with sediment model |
---|
116 | !! Geometry |
---|
117 | INTEGER , PUBLIC, SAVE :: jpoce, indoce !: Ocean points ( number/indices ) |
---|
118 | INTEGER , PUBLIC, DIMENSION(: ), ALLOCATABLE :: iarroce !: Computation of 1D array of sediments points |
---|
119 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: epkbot !: ocean bottom layer thickness |
---|
120 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: gdepbot !: Depth of the sediment |
---|
121 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: dzkbot !: ocean bottom layer thickness in meters |
---|
122 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: dz !: sediment layers thickness |
---|
123 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: por !: porosity profile |
---|
124 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: por1 !: 1-por |
---|
125 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: volw !: volume of pore water cell fraction |
---|
126 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: vols !: volume of solid cell fraction |
---|
127 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: db !: bioturbation ceofficient |
---|
128 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: irrig !: bioturbation ceofficient |
---|
129 | REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: rdtsed !: sediment model time-step |
---|
130 | REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: sedligand |
---|
131 | REAL(wp) :: dens !: density of solid material |
---|
132 | !! Inputs / Outputs |
---|
133 | CHARACTER( len = 80 ), DIMENSION(jptrased ) :: sedtrcl |
---|
134 | CHARACTER( len = 20 ), DIMENSION(jptrased ) :: sedtrcd , sedtrcu |
---|
135 | CHARACTER( len = 80 ), DIMENSION(jpdia3dsed) :: seddia3l |
---|
136 | CHARACTER( len = 20 ), DIMENSION(jpdia3dsed) :: seddia3d, seddia3u |
---|
137 | CHARACTER( len = 80 ), DIMENSION(jpdia2dsed) :: seddia2l |
---|
138 | CHARACTER( len = 20 ), DIMENSION(jpdia2dsed) :: seddia2d, seddia2u |
---|
139 | ! |
---|
140 | REAL(wp), PUBLIC, DIMENSION(:,:,:,:), ALLOCATABLE :: trcsedi |
---|
141 | REAL(wp), PUBLIC, DIMENSION(:,:,:,:), ALLOCATABLE :: flxsedi3d |
---|
142 | REAL(wp), PUBLIC, DIMENSION(:,:,: ), ALLOCATABLE :: flxsedi2d |
---|
143 | |
---|
144 | INTEGER, PUBLIC :: numsed = 27 ! units |
---|
145 | |
---|
146 | !! $Id$ |
---|
147 | CONTAINS |
---|
148 | |
---|
149 | INTEGER FUNCTION sed_alloc() |
---|
150 | !!------------------------------------------------------------------- |
---|
151 | !! *** ROUTINE sed_alloc *** |
---|
152 | !!------------------------------------------------------------------- |
---|
153 | USE lib_mpp, ONLY: ctl_stop |
---|
154 | !!------------------------------------------------------------------- |
---|
155 | ! |
---|
156 | ALLOCATE( trc_data(jpi,jpj,jpdta) , & |
---|
157 | & epkbot(jpi,jpj), gdepbot(jpi,jpj) , & |
---|
158 | & dz(jpksed) , por(jpksed) , por1(jpksed) , & |
---|
159 | & volw(jpksed), vols(jpksed), rdtsed(jpksed) , & |
---|
160 | & trcsedi (jpi,jpj,jpksed,jptrased) , & |
---|
161 | & flxsedi3d(jpi,jpj,jpksed,jpdia3dsed) , & |
---|
162 | & flxsedi2d(jpi,jpj,jpdia2dsed) , & |
---|
163 | & mol_wgt(jpsol), STAT=sed_alloc ) |
---|
164 | |
---|
165 | IF( sed_alloc /= 0 ) CALL ctl_stop( 'STOP', 'sed_alloc: failed to allocate arrays' ) |
---|
166 | ! |
---|
167 | END FUNCTION sed_alloc |
---|
168 | |
---|
169 | END MODULE sed |
---|