Changeset 12110 for NEMO/branches/2019/dev_r12072_TOP01_ENHANCE11_CEthe/src/TOP/PISCES/P4Z/p4zsed.F90
 Timestamp:
 20191207T12:44:31+01:00 (8 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

NEMO/branches/2019/dev_r12072_TOP01_ENHANCE11_CEthe/src/TOP/PISCES/P4Z/p4zsed.F90
r10788 r12110 15 15 USE sms_pisces ! PISCES Source Minus Sink variables 16 16 USE p4zlim ! Colimitations of differents nutrients 17 USE p4zsbc ! External source of nutrients18 17 USE p4zint ! interpolation and computation of various fields 19 18 USE sed ! Sediment module … … 25 24 26 25 PUBLIC p4z_sed 26 PUBLIC p4z_sed_init 27 27 PUBLIC p4z_sed_alloc 28 28 29 REAL(wp), PUBLIC :: nitrfix !: Nitrogen fixation rate 30 REAL(wp), PUBLIC :: diazolight !: Nitrogen fixation sensitivty to light 31 REAL(wp), PUBLIC :: concfediaz !: Fe halfsaturation Cste for diazotrophs 32 29 33 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrpot !: Nitrogen fixation 30 34 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,: ) :: sdenit !: Nitrate reduction in the sediments 31 REAL(wp) :: r1_rday !: inverse of rday 32 LOGICAL, SAVE :: lk_sed 35 ! 36 REAL(wp), SAVE :: r1_rday 37 REAL(wp), SAVE :: sedsilfrac, sedcalfrac 33 38 34 39 !! … … 53 58 INTEGER :: ji, jj, jk, ikt 54 59 REAL(wp) :: zrivalk, zrivsil, zrivno3 55 REAL(wp) :: z wflux, zlim, zfact, zfactcal60 REAL(wp) :: zlim, zfact, zfactcal 56 61 REAL(wp) :: zo2, zno3, zflx, zpdenit, z1pdenit, zolimit 57 62 REAL(wp) :: zsiloss, zcaloss, zws3, zws4, zwsc, zdep … … 66 71 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zsoufer, zlight 67 72 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ztrpo4, ztrdop, zirondep, zpdep 68 REAL(wp), ALLOCATABLE, DIMENSION(:,: ) :: zsidep, zironice69 73 !! 70 74 ! 71 75 IF( ln_timing ) CALL timing_start('p4z_sed') 72 76 ! 73 IF( kt == nittrc000 .AND. knt == 1 ) THEN 74 r1_rday = 1. / rday 75 IF (ln_sediment .AND. ln_sed_2way) THEN 76 lk_sed = .TRUE. 77 ELSE 78 lk_sed = .FALSE. 79 ENDIF 80 ENDIF 81 ! 82 IF( kt == nittrc000 .AND. knt == 1 ) r1_rday = 1. / rday 83 ! 77 84 78 ! Allocate temporary workspace 85 79 ALLOCATE( ztrpo4(jpi,jpj,jpk) ) … … 93 87 zsedc (:,:) = 0.e0 94 88 95 ! Iron input/uptake due to sea ice : Crude parameterization based on Lancelot et al. 96 !  97 IF( ln_ironice ) THEN 98 ! 99 ALLOCATE( zironice(jpi,jpj) ) 100 ! 89 IF( .NOT.lk_sed ) THEN 90 ! OA: Warning, the following part is necessary to avoid CFL problems above the sediments 91 !  101 92 DO jj = 1, jpj 102 93 DO ji = 1, jpi 103 zdep = rfact2 / e3t_n(ji,jj,1) 104 zwflux = fmmflx(ji,jj) / 1000._wp 105 zironice(ji,jj) = MAX( 0.99 * trb(ji,jj,1,jpfer), zwflux * icefeinput * zdep ) 106 END DO 107 END DO 108 ! 109 tra(:,:,1,jpfer) = tra(:,:,1,jpfer) + zironice(:,:) 110 ! 111 IF( lk_iomput .AND. knt == nrdttrc .AND. iom_use( "Ironice" ) ) & 112 & CALL iom_put( "Ironice", zironice(:,:) * 1.e+3 * rfact2r * e3t_n(:,:,1) * tmask(:,:,1) ) ! iron flux from ice 113 ! 114 DEALLOCATE( zironice ) 115 ! 116 ENDIF 117 118 ! Add the external input of nutrients from dust deposition 119 !  120 IF( ln_dust ) THEN 121 ! 122 ALLOCATE( zsidep(jpi,jpj), zpdep(jpi,jpj,jpk), zirondep(jpi,jpj,jpk) ) 123 ! ! Iron and Si deposition at the surface 124 IF( ln_solub ) THEN 125 zirondep(:,:,1) = solub(:,:) * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 55.85 + 3.e10 * r1_ryyss 126 ELSE 127 zirondep(:,:,1) = dustsolub * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 55.85 + 3.e10 * r1_ryyss 128 ENDIF 129 zsidep(:,:) = 8.8 * 0.075 * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 28.1 130 zpdep (:,:,1) = 0.1 * 0.021 * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 31. / po4r 131 ! ! Iron solubilization of particles in the water column 132 ! ! dust in kg/m2/s > 1/55.85 to put in mol/Fe ; wdust in m/j 133 zwdust = 0.03 * rday / ( wdust * 55.85 ) / ( 270. * rday ) 134 DO jk = 2, jpkm1 135 zirondep(:,:,jk) = dust(:,:) * mfrac * zwdust * rfact2 * EXP( gdept_n(:,:,jk) / 540. ) 136 zpdep (:,:,jk) = zirondep(:,:,jk) * 0.023 137 END DO 138 ! ! Iron solubilization of particles in the water column 139 tra(:,:,1,jpsil) = tra(:,:,1,jpsil) + zsidep (:,:) 140 DO jk = 1, jpkm1 141 tra(:,:,jk,jppo4) = tra(:,:,jk,jppo4) + zpdep (:,:,jk) 142 tra(:,:,jk,jpfer) = tra(:,:,jk,jpfer) + zirondep(:,:,jk) 143 ENDDO 144 ! 145 IF( lk_iomput ) THEN 146 IF( knt == nrdttrc ) THEN 147 IF( iom_use( "Irondep" ) ) & 148 & CALL iom_put( "Irondep", zirondep(:,:,1) * 1.e+3 * rfact2r * e3t_n(:,:,1) * tmask(:,:,1) ) ! surface downward dust depo of iron 149 IF( iom_use( "pdust" ) ) & 150 & CALL iom_put( "pdust" , dust(:,:) / ( wdust * rday ) * tmask(:,:,1) ) ! dust concentration at surface 151 ENDIF 152 ENDIF 153 DEALLOCATE( zsidep, zpdep, zirondep ) 154 ! 155 ENDIF 156 157 ! Add the external input of nutrients from river 158 !  159 IF( ln_river ) THEN 160 DO jj = 1, jpj 161 DO ji = 1, jpi 162 DO jk = 1, nk_rnf(ji,jj) 163 tra(ji,jj,jk,jppo4) = tra(ji,jj,jk,jppo4) + rivdip(ji,jj) * rfact2 164 tra(ji,jj,jk,jpno3) = tra(ji,jj,jk,jpno3) + rivdin(ji,jj) * rfact2 165 tra(ji,jj,jk,jpfer) = tra(ji,jj,jk,jpfer) + rivdic(ji,jj) * 5.e5 * rfact2 166 tra(ji,jj,jk,jpsil) = tra(ji,jj,jk,jpsil) + rivdsi(ji,jj) * rfact2 167 tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) + rivdic(ji,jj) * rfact2 168 tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) + ( rivalk(ji,jj)  rno3 * rivdin(ji,jj) ) * rfact2 169 tra(ji,jj,jk,jpdoc) = tra(ji,jj,jk,jpdoc) + rivdoc(ji,jj) * rfact2 170 ENDDO 171 ENDDO 172 ENDDO 173 IF (ln_ligand) THEN 174 DO jj = 1, jpj 175 DO ji = 1, jpi 176 DO jk = 1, nk_rnf(ji,jj) 177 tra(ji,jj,jk,jplgw) = tra(ji,jj,jk,jplgw) + rivdic(ji,jj) * 5.e5 * rfact2 178 ENDDO 179 ENDDO 180 ENDDO 181 ENDIF 182 IF( ln_p5z ) THEN 183 DO jj = 1, jpj 184 DO ji = 1, jpi 185 DO jk = 1, nk_rnf(ji,jj) 186 tra(ji,jj,jk,jpdop) = tra(ji,jj,jk,jpdop) + rivdop(ji,jj) * rfact2 187 tra(ji,jj,jk,jpdon) = tra(ji,jj,jk,jpdon) + rivdon(ji,jj) * rfact2 188 ENDDO 189 ENDDO 190 ENDDO 191 ENDIF 192 ENDIF 193 194 ! Add the external input of nutrients from nitrogen deposition 195 !  196 IF( ln_ndepo ) THEN 197 tra(:,:,1,jpno3) = tra(:,:,1,jpno3) + nitdep(:,:) * rfact2 198 tra(:,:,1,jptal) = tra(:,:,1,jptal)  rno3 * nitdep(:,:) * rfact2 199 ENDIF 200 201 ! Add the external input of iron from hydrothermal vents 202 !  203 IF( ln_hydrofe ) THEN 204 tra(:,:,:,jpfer) = tra(:,:,:,jpfer) + hydrofe(:,:,:) * rfact2 205 IF( ln_ligand ) THEN 206 tra(:,:,:,jplgw) = tra(:,:,:,jplgw) + ( hydrofe(:,:,:) * lgw_rath ) * rfact2 207 ENDIF 208 ! 209 IF( lk_iomput .AND. knt == nrdttrc .AND. iom_use( "HYDR" ) ) & 210 & CALL iom_put( "HYDR", hydrofe(:,:,:) * 1.e+3 * tmask(:,:,:) ) ! hydrothermal iron input 211 ENDIF 212 213 ! OA: Warning, the following part is necessary to avoid CFL problems above the sediments 214 !  215 DO jj = 1, jpj 216 DO ji = 1, jpi 217 ikt = mbkt(ji,jj) 218 zdep = e3t_n(ji,jj,ikt) / xstep 219 zwsbio4(ji,jj) = MIN( 0.99 * zdep, wsbio4(ji,jj,ikt) ) 220 zwsbio3(ji,jj) = MIN( 0.99 * zdep, wsbio3(ji,jj,ikt) ) 221 END DO 222 END DO 223 ! 224 IF( .NOT.lk_sed ) THEN 225 ! 226 ! Add the external input of iron from sediment mobilization 227 !  228 IF( ln_ironsed ) THEN 229 tra(:,:,:,jpfer) = tra(:,:,:,jpfer) + ironsed(:,:,:) * rfact2 230 ! 231 IF( lk_iomput .AND. knt == nrdttrc .AND. iom_use( "Ironsed" ) ) & 232 & CALL iom_put( "Ironsed", ironsed(:,:,:) * 1.e+3 * tmask(:,:,:) ) ! iron inputs from sediments 233 ENDIF 94 ikt = mbkt(ji,jj) 95 zdep = e3t_n(ji,jj,ikt) / xstep 96 zwsbio4(ji,jj) = MIN( 0.99 * zdep, wsbio4(ji,jj,ikt) ) 97 zwsbio3(ji,jj) = MIN( 0.99 * zdep, wsbio3(ji,jj,ikt) ) 98 END DO 99 END DO 234 100 235 101 ! Computation of the sediment denitrification proportion: The metamodel from midlleburg (2006) is being used … … 494 360 END SUBROUTINE p4z_sed 495 361 362 SUBROUTINE p4z_sed_init 363 !! 364 !! *** routine p4z_sed_init *** 365 !! 366 !! ** purpose : initialization of some parameters 367 !! 368 !! 369 !! 370 INTEGER :: ji, jj, jk, jm 371 INTEGER :: ios ! Local integer output status for namelist read 372 ! 373 !! 374 NAMELIST/nampissed/ nitrfix, diazolight, concfediaz 375 !! 376 ! 377 IF(lwp) THEN 378 WRITE(numout,*) 379 WRITE(numout,*) 'p4z_sed_init : initialization of sediment mobilisation ' 380 WRITE(numout,*) '~~~~~~~~~~~~ ' 381 ENDIF 382 ! !* set file information 383 REWIND( numnatp_ref ) ! Namelist nampissed in reference namelist : PISCES sediment 384 READ ( numnatp_ref, nampissed, IOSTAT = ios, ERR = 901) 385 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampissed in reference namelist', lwp ) 386 REWIND( numnatp_cfg ) ! Namelist nampissbc in configuration namelist : PISCES sediment 387 READ ( numnatp_cfg, nampissed, IOSTAT = ios, ERR = 902 ) 388 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nampissed in configuration namelist', lwp ) 389 IF(lwm) WRITE ( numonp, nampissed ) 390 391 IF(lwp) THEN 392 WRITE(numout,*) ' Namelist : nampissed ' 393 WRITE(numout,*) ' nitrogen fixation rate nitrfix = ', nitrfix 394 WRITE(numout,*) ' nitrogen fixation sensitivty to light diazolight = ', diazolight 395 WRITE(numout,*) ' Fe halfsaturation cste for diazotrophs concfediaz = ', concfediaz 396 ENDIF 397 ! 398 r1_rday = 1. / rday 399 ! 400 sedsilfrac = 0.03 ! percentage of silica loss in the sediments 401 sedcalfrac = 0.6 ! percentage of calcite loss in the sediments 402 ! 403 lk_sed = ln_sediment .AND. ln_sed_2way 404 ! 405 END SUBROUTINE p4z_sed_init 496 406 497 407 INTEGER FUNCTION p4z_sed_alloc()
Note: See TracChangeset
for help on using the changeset viewer.