Changeset 2761 for trunk/NEMOGCM/NEMO/TOP_SRC/SED/sed.F90
- Timestamp:
- 2011-05-03T12:49:22+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/TOP_SRC/SED/sed.F90
r2528 r2761 9 9 !!---------------------------------------------------------------------- 10 10 USE par_sed 11 12 11 USE in_out_manager 13 12 14 USE dom_oce , ONLY : & 15 nidom => nidom , & !: 16 glamt => glamt , & !: longitude of t-point (degre) 17 gphit => gphit , & !: latitude of t-point (degre) 18 e3t_0 => e3t_0 , & !: reference depth of t-points (m) 19 mbkt => mbkt , & !: vertical index of the bottom last T- ocean level 20 tmask => tmask , & !: land/ocean mask at t-points 21 rdt => rdt !: time step for the dynamics 13 IMPLICIT NONE 14 PUBLIC 22 15 23 nyear => nyear , & !: Current year 24 nmonth => nmonth , & !: Current month 25 nday => nday , & !: Current day 26 ndastp => ndastp , & !: time step date in year/month/day aammjj 27 nday_year => nday_year, & !: curent day counted from jan 1st of the current year 28 adatrj => adatrj !: number of elapsed days since the begining of the run 16 PUBLIC sed_alloc 17 18 USE dom_oce , ONLY : nidom => nidom !: 19 USE dom_oce , ONLY : glamt => glamt !: longitude of t-point (degre) 20 USE dom_oce , ONLY : gphit => gphit !: latitude of t-point (degre) 21 USE dom_oce , ONLY : e3t_0 => e3t_0 !: reference depth of t-points (m) 22 USE dom_oce , ONLY : mbkt => mbkt !: vertical index of the bottom last T- ocean level 23 USE dom_oce , ONLY : tmask => tmask !: land/ocean mask at t-points 24 USE dom_oce , ONLY : rdt => rdt !: time step for the dynamics 25 USE dom_oce , ONLY : nyear => nyear !: Current year 26 USE dom_oce , ONLY : nmonth => nmonth !: Current month 27 USE dom_oce , ONLY : nday => nday !: Current day 28 USE dom_oce , ONLY : ndastp => ndastp !: time step date in year/month/day aammjj 29 USE dom_oce , ONLY : nday_year => nday_year !: curent day counted from jan 1st of the current year 30 USE dom_oce , ONLY : adatrj => adatrj !: number of elapsed days since the begining of the run 29 31 ! !: it is the accumulated duration of previous runs 30 32 ! !: that may have been run with different time steps. 31 33 32 33 34 #if ! defined key_sed_off 34 35 35 USE oce , ONLY : & 36 tsn => tsn & !: pot. temperature (celsius) and salinity (psu) 36 USE oce , ONLY : tsn => tsn !: pot. temperature (celsius) and salinity (psu) 37 37 38 USE trc, ONLY : & 39 trn , & !: tracer 40 nwritetrc !: outputs frequency of tracer model 38 USE trc , ONLY : trn => trc !: tracer 39 USE trc , ONLY : nwritetrc => nwritetrc !: outputs frequency of tracer model 41 40 42 USE p4zsink, ONLY : & 43 sinking , & !: sinking flux for POC 41 USE p4zsink , ONLY : sinking => sinking !: sinking flux for POC 44 42 #if ! defined key_kriest 45 sinking2 , &!: sinking flux for GOC43 USE p4zsink , ONLY : sinking2 => sinking2 !: sinking flux for GOC 46 44 #endif 47 sinkcal , & !: sinking flux for calcite48 sinksil!: sinking flux for opal ( dsi )45 USE p4zsink , ONLY : sinkcal => sinkcal !: sinking flux for calcite 46 USE p4zsink , ONLY : sinksil => sinksil !: sinking flux for opal ( dsi ) 49 47 50 USE sms_pisces, ONLY : & 51 akb3 , & 52 ak13 , & 53 ak23 , & 54 akw3 , & 55 aksp , & 56 borat 48 USE sms_pisces, ONLY : akb3 => akb3 !: Chemical constants 49 USE sms_pisces, ONLY : ak13 => ak13 !: Chemical constants 50 USE sms_pisces, ONLY : ak23 => ak23 !: Chemical constants 51 USE sms_pisces, ONLY : akw3 => akw3 !: Chemical constants 52 USE sms_pisces, ONLY : aksp => aksp !: Chemical constants 53 USE sms_pisces, ONLY : borat => borat !: Chemical constants ( borat ) 57 54 58 55 #endif 59 56 60 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpdta) :: &61 trc_data !: tracer data to share with sediment model62 57 63 INTEGER, PUBLIC :: & 64 nitsed000, nitsedend, nwrised, nfreq 58 !! Namelist 59 REAL(wp), PUBLIC, DIMENSION(5) :: reac !: reactivity rc in [l.mol-1.s-1] 60 REAL(wp), PUBLIC :: reac_sil !: reactivity of silicate in [l.mol-1.s-1] 61 REAL(wp), PUBLIC :: reac_clay !: reactivity of clay in [l.mol-1.s-1] 62 REAL(wp), PUBLIC :: reac_poc !: reactivity of poc in [l.mol-1.s-1] 63 REAL(wp), PUBLIC :: reac_no3 !: reactivity of no3 in [l.mol-1.s-1] 64 REAL(wp), PUBLIC :: reac_cal !: reactivity of cal in [l.mol-1.s-1] 65 REAL(wp), PUBLIC :: sat_sil !: saturation concentration for silicate in [mol.l-1] 66 REAL(wp), PUBLIC :: sat_clay !: saturation concentration for clay in [mol.l-1] 67 REAL(wp), PUBLIC :: so2ut 68 REAL(wp), PUBLIC :: srno3 69 REAL(wp), PUBLIC :: spo4r 70 REAL(wp), PUBLIC :: srDnit 71 REAL(wp), PUBLIC :: sthro2 !: threshold O2 concen. in [mol.l-1] 72 REAL(wp), PUBLIC :: pdb = 0.0112372 !: 13C/12C in PD Belemnite 73 REAL(wp), PUBLIC :: rc13P = 0.980 !: 13C/12C in POC = rc13P*PDB 74 REAL(wp), PUBLIC :: rc13Ca = 1.001 !: 13C/12C in CaCO3 = rc13Ca*PDB 75 REAL(wp), PUBLIC :: dtsed !: sedimentation time step 76 REAL(wp), PUBLIC :: db !: bioturb coefficient in [cm2.s-1] 65 77 66 REAL(wp), PUBLIC, DIMENSION(:,:,:) , ALLOCATABLE :: & 67 pwcp , & !: pore water sediment data at given time-step 68 pwcp0 !: pore water sediment data at initial time 69 70 REAL(wp), PUBLIC, DIMENSION(:,:,:) , ALLOCATABLE :: & 71 solcp , & !: solid sediment data at given time-step 72 solcp0 !: solid sediment at initial time 78 INTEGER , PUBLIC :: nitsed000 79 INTEGER , PUBLIC :: nitsedend 80 INTEGER , PUBLIC :: nwrised 81 INTEGER , PUBLIC :: nfreq 82 REAL(wp), PUBLIC :: dens !: density of solid material 83 ! 84 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: pwcp !: pore water sediment data at given time-step 85 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: pwcp0 !: pore water sediment data at initial time 86 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: solcp !: solid sediment data at given time-step 87 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: solcp0 !: solid sediment data at initial time 73 88 74 89 !! * Shared module variables 75 REAL(wp), PUBLIC, DIMENSION(:,:) , ALLOCATABLE :: & 76 pwcp_dta !: pore water data at given time-step 90 REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: pwcp_dta !: pore water data at given time-step 91 REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: rainrm_dta !: rain data at at initial time 92 REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: rainrm !: rain data at given time-step 93 REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: rainrg !: rain of each solid component in [g/(cm**2.s)] 94 REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: fromsed !: 95 REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: tosed !: 96 REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: rloss !: 97 REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: tokbot 98 ! 99 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: temp !: temperature 100 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: salt !: salinity 101 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: press !: pressure 102 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: raintg !: total massic flux rained in each cell (sum of sol. comp.) 103 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: dzdep !: total thickness of solid material rained [cm] in each cell 104 ! 105 REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: hipor !: [h+] in mol/kg*densSW 106 REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: co3por !: [co3--]solid sediment at initial time 107 REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: dz3d !: ??? 108 REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: volw3d !: ??? 109 REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: vols3d !: ??? 77 110 78 REAL(wp), PUBLIC, DIMENSION(:,:) , ALLOCATABLE :: &79 rainrm_dta, & !: rain data at at initial time80 rainrm , & !: rain data at given time-step81 rainrg , & !: rain of each solid component in [g/(cm**2.s)]82 fromsed , & !:83 tosed , & !:84 rloss !:85 86 REAL(wp), PUBLIC, DIMENSION(:,:) , ALLOCATABLE :: &87 tokbot !:88 89 REAL(wp), PUBLIC, DIMENSION(:) , ALLOCATABLE :: &90 temp , & !: temperature91 salt , & !: salinity92 press , & !: pressure93 raintg, & !: total massic flux rained in each cell (sum of sol. comp.)94 dzdep !: total thickness of solid material rained [cm] in each cell95 96 REAL(wp), PUBLIC, DIMENSION(:,:) , ALLOCATABLE :: &97 hipor , & !: [h+] in mol/kg*densSW98 co3por !: [co3--]solid sediment at initial time99 100 REAL(wp), PUBLIC, DIMENSION(jpsol) :: &101 mol_wgt !: molecular weight of solid sediment data102 103 104 !! Geometry105 INTEGER, PUBLIC, SAVE :: &106 jpoce , & !: sediment points107 indoce108 109 INTEGER , PUBLIC, DIMENSION(:) , ALLOCATABLE :: & !:110 iarroce !: ! Computation of 1D array of sediments points111 112 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: &113 epkbot !: ocean bottom layer thickness114 115 REAL(wp), PUBLIC, DIMENSION(:) , ALLOCATABLE :: &116 dzkbot !: ocean bottom layer thickness in meters117 118 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpksed) :: &119 tmasksed !: sediment mask120 121 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: &122 sbathy123 124 REAL(wp), PUBLIC, DIMENSION(jpksed) :: &125 dz , & !: sediment layers thickness126 por , & !: porosity profile127 por1 , & !: 1 - por128 profsed , & !: depth of middle of each layer129 volw , & !: volume of pore water cell fraction130 vols , & !: volume of solid cell fraction131 diff , & !: diffusion ceofficient132 rdtsed !:133 134 REAL(wp), PUBLIC, DIMENSION(:,:) , ALLOCATABLE :: &135 dz3d , & !:136 volw3d , & !:137 vols3d !:138 139 REAL(wp) :: &140 dens !: density of solid material141 142 !! Namelist143 REAL(wp), PUBLIC, DIMENSION(5) :: &144 reac !: reactivity rc in [l.mol-1.s-1]145 146 REAL(wp), PUBLIC :: &147 sat_sil, & !: saturation concentration for silicate in [mol.l-1]148 sat_clay, & !: clay149 reac_sil, & !: reactivity rc in [l.mol-1.s-1]150 reac_clay, &151 reac_poc, &152 reac_no3, &153 reac_cal154 155 REAL(wp), PUBLIC :: &156 so2ut , & !:157 srno3 , & !:158 spo4r , & !:159 srDnit , & !:160 sthro2 !: threshold O2 concen. in [mol.l-1]161 162 REAL(wp), PUBLIC :: &163 pdb = 0.0112372, & !: 13C/12C in PD Belemnite164 rc13P = 0.980 , & !: 13C/12C in POC = rc13P*PDB165 rc13Ca = 1.001 !: 13C/12C in CaCO3 = rc13Ca*PDB166 167 REAL(wp) , PUBLIC :: &168 dtsed , & !: sedimentation time step169 db !: bioturb coefficient in [cm2.s-1]170 111 171 112 !! Chemistry 172 REAL(wp), PUBLIC, DIMENSION(:) , ALLOCATABLE :: & 173 densSW , & 174 borats , & 175 calcon2, & 176 akbs , & 177 ak1s , & 178 ak2s , & 179 akws , & 180 ak12s , & 181 ak1ps , & 182 ak2ps , & 183 ak3ps , & 184 ak12ps , & 185 ak123ps, & 186 aksis , & 187 aksps 113 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: densSW 114 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: borats 115 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: calcon2 116 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: akbs 117 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: ak1s 118 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: ak2s 119 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: akws 120 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: ak12s 121 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: ak1ps 122 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: ak2ps 123 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: ak3ps 124 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: ak12ps 125 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: ak123ps 126 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: aksis 127 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: aksps 188 128 129 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: mol_wgt !: molecular weight of solid sediment data 130 131 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: trc_data !: tracer data to share with sediment model 132 !! Geometry 133 INTEGER , PUBLIC, SAVE :: jpoce, indoce !: Ocean points ( number/indices ) 134 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: iarroce !: Computation of 1D array of sediments points 135 REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: epkbot !: ocean bottom layer thickness 136 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: dzkbot !: ocean bottom layer thickness in meters 137 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: tmasksed !: sediment mask 138 REAL(wp), PUBLIC, DIMENSION(:,: ), ALLOCATABLE :: sbathy !: bathymetry 139 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: dz !: sediment layers thickness 140 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: por !: porosity profile 141 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: por1 !: 1-por 142 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: profsed !: depth of middle of each layer 143 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: volw !: volume of pore water cell fraction 144 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: vols !: volume of solid cell fraction 145 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: diff !: diffusion ceofficient 146 REAL(wp), PUBLIC, DIMENSION(: ), ALLOCATABLE :: rdtsed !: sediment model time-step 147 REAL(wp) :: dens !: density of solid material 189 148 !! Inputs / Outputs 190 CHARACTER( len = 80 ), DIMENSION(jptrased) :: & 191 sedtrcl 192 CHARACTER( len = 20 ), DIMENSION(jptrased) :: & 193 sedtrcd , sedtrcu 149 CHARACTER( len = 80 ), DIMENSION(jptrased ) :: sedtrcl 150 CHARACTER( len = 20 ), DIMENSION(jptrased ) :: sedtrcd , sedtrcu 151 CHARACTER( len = 80 ), DIMENSION(jpdia3dsed) :: seddia3l 152 CHARACTER( len = 20 ), DIMENSION(jpdia3dsed) :: seddia3d, seddia3u 153 CHARACTER( len = 80 ), DIMENSION(jpdia2dsed) :: seddia2l 154 CHARACTER( len = 20 ), DIMENSION(jpdia2dsed) :: seddia2d, seddia2u 155 ! 156 REAL(wp), PUBLIC, DIMENSION(:,:,:,:), ALLOCATABLE :: trcsedi 157 REAL(wp), PUBLIC, DIMENSION(:,:,:,:), ALLOCATABLE :: flxsedi3d 158 REAL(wp), PUBLIC, DIMENSION(:,:,: ), ALLOCATABLE :: flxsedi2d 194 159 195 CHARACTER( len = 80 ), DIMENSION(jpdia3dsed) :: & 196 seddia3l 197 CHARACTER( len = 20 ), DIMENSION(jpdia3dsed) :: & 198 seddia3d , seddia3u 160 INTEGER, PUBLIC :: numsed = 27 ! units 199 161 200 CHARACTER( len = 80 ), DIMENSION(jpdia2dsed) :: & 201 seddia2l 202 CHARACTER( len = 20 ), DIMENSION(jpdia2dsed) :: & 203 seddia2d , seddia2u 162 CONTAINS 204 163 205 REAL(wp), DIMENSION(jpi,jpj,jpksed,jptrased) :: & 206 trcsedi 207 REAL(wp), DIMENSION(jpi,jpj,jpksed,jpdia3dsed) :: & 208 flxsedi3d 209 REAL(wp), DIMENSION(jpi,jpj,jpdia2dsed) :: & 210 flxsedi2d 164 INTEGER FUNCTION sed_alloc() 165 !!------------------------------------------------------------------- 166 !! *** ROUTINE sed_alloc *** 167 !!------------------------------------------------------------------- 168 USE lib_mpp, ONLY: ctl_warn 169 !!------------------------------------------------------------------- 170 ! 171 ALLOCATE( trc_dta(jpi,jpj,jdta) , & 172 & epkbot(jpi,jpj), sbathy(jpi,jpj) , & 173 & tmasksed(jpi,jpj,jpksed) , & 174 & dz(jpksed) , por(jpksed) , por1(jpksed), profsed(jpksed) , & 175 & volw(jpksed), vols(jpksed), diff(jpksed), rdtsed(jpksed) , & 176 & trcsedi (jpi,jpj,jpksed,jptrased) , & 177 & flxsedi3d(jpi,jpj,jpksed,jpdia3dsed) , & 178 & flxsedi2d(jpi,jpj,jpksed,jpdia2dsed) , & 179 & mol_wgt(jpsol), STAT=sed_alloc ) 211 180 212 !! Units 213 INTEGER, PUBLIC :: & 214 numsed = 27 181 IF( sed_alloc /= 0 ) CALL ctl_warn('sed_alloc: failed to allocate arrays') 182 ! 183 END FUNCTION sed_alloc 184 215 185 #else 216 186 !!======================================================================
Note: See TracChangeset
for help on using the changeset viewer.