[10225] | 1 | MODULE sedinitrc |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE sedinitrc *** |
---|
| 4 | !! Sediment : define sediment variables |
---|
| 5 | !!===================================================================== |
---|
| 6 | |
---|
| 7 | !!---------------------------------------------------------------------- |
---|
| 8 | !! sed_init : initialization, namelist read, and parameters control |
---|
| 9 | !!---------------------------------------------------------------------- |
---|
| 10 | !! * Modules used |
---|
| 11 | USE sed ! sediment global variable |
---|
| 12 | USE sed_oce |
---|
| 13 | USE sedini |
---|
| 14 | USE seddta |
---|
| 15 | USE sedrst |
---|
| 16 | USE sedco3 |
---|
| 17 | USE sedchem |
---|
| 18 | USE sedarr |
---|
| 19 | USE lib_mpp ! distribued memory computing library |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | IMPLICIT NONE |
---|
| 23 | PRIVATE |
---|
| 24 | |
---|
| 25 | REAL(wp) :: & |
---|
| 26 | ryear = 365. * 24. * 3600. !: 1 year converted in second |
---|
| 27 | |
---|
| 28 | !! * Routine accessibility |
---|
| 29 | PUBLIC sed_initrc ! routine called by opa.F90 |
---|
| 30 | |
---|
| 31 | !! $Id: sedini.F90 5215 2015-04-15 16:11:56Z nicolasmartin $ |
---|
| 32 | CONTAINS |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | SUBROUTINE sed_initrc |
---|
| 36 | !!---------------------------------------------------------------------- |
---|
| 37 | !! *** ROUTINE sed_init *** |
---|
| 38 | !! |
---|
| 39 | !! ** Purpose : Initialization of sediment module |
---|
| 40 | !! - Reading namelist |
---|
| 41 | !! - Read the deepest water layer thickness |
---|
| 42 | !! ( using as mask ) in Netcdf file |
---|
| 43 | !! - Convert unity if necessary |
---|
| 44 | !! - sets initial sediment composition |
---|
| 45 | !! ( only clay or reading restart file ) |
---|
| 46 | !! - sets sediment grid, porosity and others constants |
---|
| 47 | !! |
---|
| 48 | !! History : |
---|
| 49 | !! ! 04-10 (N. Emprin, M. Gehlen ) Original code |
---|
| 50 | !! ! 06-07 (C. Ethe) Re-organization |
---|
| 51 | !!---------------------------------------------------------------------- |
---|
| 52 | INTEGER :: ji, jj, ikt |
---|
| 53 | !!---------------------------------------------------------------------- |
---|
| 54 | |
---|
| 55 | |
---|
| 56 | ! Initialize the sediment tracers concentrations |
---|
| 57 | !------------------------------------------------ |
---|
| 58 | |
---|
| 59 | IF(lwp) WRITE(numsed,*) ' sed_initrc : Initialization of sediment concentration ' |
---|
| 60 | IF(lwp) WRITE(numsed,*) ' ' |
---|
| 61 | |
---|
| 62 | ! Determination of sediments number of points and allocate global variables |
---|
| 63 | |
---|
| 64 | ! sets initial sediment composition |
---|
| 65 | ! ( only clay or reading restart file ) |
---|
| 66 | !--------------------------------------- |
---|
| 67 | CALL sed_init_data |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | CALL sed_init_wri |
---|
| 71 | |
---|
| 72 | |
---|
| 73 | END SUBROUTINE sed_initrc |
---|
| 74 | |
---|
| 75 | |
---|
| 76 | SUBROUTINE sed_init_data |
---|
| 77 | !!---------------------------------------------------------------------- |
---|
| 78 | !! *** ROUTINE sed_init_data *** |
---|
| 79 | !! |
---|
| 80 | !! ** Purpose : Initialization of sediment module |
---|
| 81 | !! - sets initial sediment composition |
---|
| 82 | !! ( only clay or reading restart file ) |
---|
| 83 | !! |
---|
| 84 | !! History : |
---|
| 85 | !! ! 06-07 (C. Ethe) original |
---|
| 86 | !!---------------------------------------------------------------------- |
---|
| 87 | |
---|
| 88 | ! local variables |
---|
| 89 | INTEGER :: & |
---|
| 90 | ji, jk, zhipor |
---|
| 91 | |
---|
| 92 | !-------------------------------------------------------------------- |
---|
| 93 | |
---|
| 94 | |
---|
| 95 | IF( .NOT. ln_rst_sed ) THEN |
---|
| 96 | |
---|
| 97 | IF (lwp) WRITE(numsed,*) ' Initilization of default values of sediment components' |
---|
| 98 | |
---|
| 99 | ! default values for initial pore water concentrations [mol/l] |
---|
| 100 | pwcp(:,:,:) = 0. |
---|
| 101 | ! default value for initial solid component (fraction of dry weight dim=[0]) |
---|
| 102 | ! clay |
---|
| 103 | solcp(:,:,:) = 0. |
---|
| 104 | solcp(:,2:jpksed,jsclay) = 1.0 * 0.965 |
---|
| 105 | solcp(:,2:jpksed,jsfeo) = 1.0 * 0.035 |
---|
| 106 | |
---|
| 107 | ! Initialization of [h+] and [co3--] |
---|
| 108 | |
---|
| 109 | zhipor = 8.0 |
---|
| 110 | ! Initialization of [h+] in mol/kg |
---|
| 111 | DO jk = 1, jpksed |
---|
| 112 | DO ji = 1, jpoce |
---|
| 113 | hipor (ji,jk) = 10.**( -1. * zhipor ) |
---|
| 114 | ENDDO |
---|
| 115 | ENDDO |
---|
| 116 | |
---|
| 117 | co3por(:,:) = 1E-6 |
---|
| 118 | |
---|
| 119 | ELSE |
---|
| 120 | |
---|
| 121 | IF (lwp) WRITE(numsed,*) ' Initilization of Sediment components from restart' |
---|
| 122 | |
---|
| 123 | CALL sed_rst_cal( nitsed000, 'READ' ) |
---|
| 124 | CALL sed_rst_read |
---|
| 125 | |
---|
| 126 | ENDIF |
---|
| 127 | |
---|
| 128 | |
---|
| 129 | ! Load initial Pisces Data for bot. wat. Chem and fluxes |
---|
| 130 | CALL sed_dta ( nitsed000 ) |
---|
| 131 | |
---|
| 132 | ! Initialization of chemical constants |
---|
| 133 | CALL sed_chem ( nitsed000 ) |
---|
| 134 | |
---|
| 135 | ! Stores initial sediment data for mass balance calculation |
---|
| 136 | pwcp0 (1:jpoce,1:jpksed,1:jpwat ) = pwcp (1:jpoce,1:jpksed,1:jpwat ) |
---|
| 137 | solcp0(1:jpoce,1:jpksed,1:jpsol ) = solcp(1:jpoce,1:jpksed,1:jpsol) |
---|
| 138 | |
---|
| 139 | ! Conversion of [h+] in mol/Kg to get it in mol/l ( multiplication by density) |
---|
| 140 | DO jk = 1, jpksed |
---|
| 141 | hipor(1:jpoce,jk) = hipor(1:jpoce,jk) * densSW(1:jpoce) |
---|
| 142 | ENDDO |
---|
| 143 | |
---|
| 144 | |
---|
| 145 | ! In default case - no restart - sedco3 is run to initiate [h+] and [co32-] |
---|
| 146 | ! Otherwise initiate values of pH and co3 read in restart |
---|
| 147 | IF( .NOT. ln_rst_sed ) THEN |
---|
| 148 | ! sedco3 is run to initiate[h+] [co32-] in mol/l of solution |
---|
| 149 | CALL sed_co3 ( nitsed000 ) |
---|
| 150 | |
---|
| 151 | ENDIF |
---|
| 152 | |
---|
| 153 | END SUBROUTINE sed_init_data |
---|
| 154 | |
---|
| 155 | SUBROUTINE sed_init_wri |
---|
| 156 | |
---|
| 157 | INTEGER :: jk |
---|
| 158 | |
---|
| 159 | IF (lwp) THEN |
---|
| 160 | WRITE(numsed,*)' ' |
---|
| 161 | WRITE(numsed,*)'======== Write summary of sediment char. ============' |
---|
| 162 | WRITE(numsed,*)' ' |
---|
| 163 | WRITE(numsed,*)' ' |
---|
| 164 | WRITE(numsed,*)'-------------------------------------------------------------------' |
---|
| 165 | WRITE(numsed,*)' Initial Conditions ' |
---|
| 166 | WRITE(numsed,*)'-------------------------------------------------------------------' |
---|
| 167 | WRITE(numsed,*)'dzm = dzkbot minimum to calculate ', 0. |
---|
| 168 | WRITE(numsed,*)'Local zone : jpi, jpj, jpksed : ',jpi, jpj, jpksed |
---|
| 169 | WRITE(numsed,*)'jpoce = ',jpoce,' nbtot pts = ',jpij,' nb earth pts = ',jpij - jpoce |
---|
| 170 | WRITE(numsed,*)'sublayer thickness dz(1) [cm] : ', dz(1) |
---|
| 171 | WRITE(numsed,*)'Vertical domain of the sediment' |
---|
| 172 | WRITE(numsed,*)'-------------------------------' |
---|
| 173 | WRITE(numsed,*)' Indice, profsed, dz' |
---|
| 174 | DO jk = 2, jpksed |
---|
| 175 | WRITE(numsed,*) jk,profsed(jk),dz(jk) |
---|
| 176 | END DO |
---|
| 177 | WRITE(numsed,*)' nb solid comp : ',jpsol |
---|
| 178 | WRITE(numsed,*)'(1=opal,2=clay,3=POC,4=CaCO3), 5=POS, 6=POR, 7=FEO, 8=FeS' |
---|
| 179 | WRITE(numsed,*)'weight mol 1,2,3,4,5,6,7' |
---|
| 180 | WRITE(numsed,'(8(F0.2,3X))')mol_wgt(jsopal),mol_wgt(jsclay),mol_wgt(jspoc),mol_wgt(jscal),mol_wgt(jspos),mol_wgt(jspor),mol_wgt(jsfeo),mol_wgt(jsfes) |
---|
| 181 | WRITE(numsed,*)'nb dissolved comp',jpwat |
---|
| 182 | WRITE(numsed,*)'1=silicic acid,,2=O2,3=DIC,4=NO3,5=PO4,6=Alk,7=NH4,8=ODU' |
---|
| 183 | WRITE(numsed,*)'redfield coef C,O,N P Dit ' |
---|
| 184 | WRITE(numsed,'(5(F0.2,3X))')1./spo4r,so2ut/spo4r,srno3/spo4r,spo4r/spo4r,srDnit/spo4r |
---|
| 185 | WRITE(numsed,*) ' ' |
---|
| 186 | WRITE(numsed,*) ' End Of Initialization ' |
---|
| 187 | WRITE(numsed,*) ' ' |
---|
| 188 | ENDIF |
---|
| 189 | ! |
---|
| 190 | END SUBROUTINE sed_init_wri |
---|
| 191 | |
---|
| 192 | END MODULE sedinitrc |
---|