[934] | 1 | MODULE trcsed |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE p4sed *** |
---|
| 4 | !! TOP : PISCES Compute loss of organic matter in the sediments |
---|
| 5 | !!====================================================================== |
---|
| 6 | !! History : - ! 1995-06 (M. Levy) original code |
---|
| 7 | !! - ! 2000-12 (E. Kestenare) clean up |
---|
| 8 | !! 2.0 ! 2007-12 (C. Deltel, G. Madec) F90 + simplifications |
---|
| 9 | !!---------------------------------------------------------------------- |
---|
| 10 | #if defined key_lobster |
---|
| 11 | !!---------------------------------------------------------------------- |
---|
| 12 | !! 'key_lobster' LOBSTER bio-model |
---|
| 13 | !!---------------------------------------------------------------------- |
---|
| 14 | !! trc_sed : Compute loss of organic matter in the sediments |
---|
| 15 | !!---------------------------------------------------------------------- |
---|
| 16 | USE oce_trc ! |
---|
[1119] | 17 | USE trc |
---|
[1071] | 18 | USE sms_lobster |
---|
[934] | 19 | USE lbclnk |
---|
| 20 | |
---|
| 21 | USE prtctl_trc ! Print control for debbuging |
---|
| 22 | |
---|
| 23 | IMPLICIT NONE |
---|
| 24 | PRIVATE |
---|
| 25 | |
---|
| 26 | PUBLIC trc_sed ! called in ??? |
---|
| 27 | |
---|
| 28 | !!* Substitution |
---|
| 29 | # include "domzgr_substitute.h90" |
---|
| 30 | !!---------------------------------------------------------------------- |
---|
| 31 | !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007) |
---|
| 32 | !! $Id: trcsed.F90 777 2007-12-19 18:40:57Z gm $ |
---|
| 33 | !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) |
---|
| 34 | !!---------------------------------------------------------------------- |
---|
| 35 | |
---|
| 36 | CONTAINS |
---|
| 37 | |
---|
| 38 | SUBROUTINE trc_sed( kt ) |
---|
| 39 | !!--------------------------------------------------------------------- |
---|
| 40 | !! *** ROUTINE trc_sed *** |
---|
| 41 | !! |
---|
| 42 | !! ** Purpose : compute the now trend due to the vertical sedimentation of |
---|
| 43 | !! detritus and add it to the general trend of detritus equations |
---|
| 44 | !! |
---|
| 45 | !! ** Method : this ROUTINE compute not exactly the advection but the |
---|
| 46 | !! transport term, i.e. dz(wt) and dz(ws)., dz(wtr) |
---|
| 47 | !! using an upstream scheme |
---|
| 48 | !! the now vertical advection of tracers is given by: |
---|
| 49 | !! dz(trn wn) = 1/bt dk+1( e1t e2t vsed (trn) ) |
---|
| 50 | !! add this trend now to the general trend of tracer (ta,sa,tra): |
---|
| 51 | !! tra = tra + dz(trn wn) |
---|
| 52 | !! |
---|
| 53 | !! IF 'key_trc_diabio' is defined, the now vertical advection |
---|
| 54 | !! trend of passive tracers is saved for futher diagnostics. |
---|
| 55 | !!--------------------------------------------------------------------- |
---|
| 56 | INTEGER, INTENT( in ) :: kt ! ocean time-step index |
---|
| 57 | !! |
---|
| 58 | INTEGER :: ji, jj, jk |
---|
| 59 | REAL(wp) :: ztra |
---|
| 60 | REAL(wp), DIMENSION(jpi,jpj,jpk) :: zwork |
---|
| 61 | |
---|
| 62 | CHARACTER (len=25) :: charout |
---|
| 63 | !!--------------------------------------------------------------------- |
---|
| 64 | |
---|
| 65 | IF( kt == nit000 ) THEN |
---|
| 66 | IF(lwp) WRITE(numout,*) |
---|
| 67 | IF(lwp) WRITE(numout,*) ' trc_sed: LOBSTER sedimentation' |
---|
| 68 | IF(lwp) WRITE(numout,*) ' ~~~~~~~' |
---|
| 69 | ENDIF |
---|
| 70 | |
---|
| 71 | ! sedimentation of detritus : upstream scheme |
---|
| 72 | ! -------------------------------------------- |
---|
| 73 | |
---|
| 74 | ! for detritus sedimentation only - jpdet |
---|
| 75 | |
---|
| 76 | zwork(:,:,1 ) = 0.e0 ! surface value set to zero |
---|
| 77 | zwork(:,:,jpk) = 0.e0 ! bottom value set to zero |
---|
| 78 | |
---|
| 79 | ! tracer flux at w-point: we use -vsed (downward flux) with simplification : no e1*e2 |
---|
| 80 | |
---|
[1005] | 81 | DO jk = 2, jpk |
---|
[934] | 82 | zwork(:,:,jk) = -vsed * trn(:,:,jk-1,jpdet) |
---|
| 83 | END DO |
---|
| 84 | |
---|
| 85 | ! tracer flux divergence at t-point added to the general trend |
---|
| 86 | |
---|
| 87 | DO jk = 1, jpkm1 |
---|
| 88 | DO jj = 1, jpj |
---|
| 89 | DO ji = 1,jpi |
---|
| 90 | ztra = - ( zwork(ji,jj,jk) - zwork(ji,jj,jk+1) ) / fse3t(ji,jj,jk) |
---|
| 91 | tra(ji,jj,jk,jpdet) = tra(ji,jj,jk,jpdet) + ztra |
---|
| 92 | # if defined key_trc_diabio |
---|
| 93 | trbio(ji,jj,jk,8) = ztra |
---|
| 94 | # endif |
---|
| 95 | # if defined key_trc_diaadd |
---|
| 96 | trc2d(ji,jj,8) = trc2d(ji,jj,8) + ztra * fse3t(ji,jj,jk) * 86400. |
---|
| 97 | # endif |
---|
| 98 | END DO |
---|
| 99 | END DO |
---|
| 100 | END DO |
---|
| 101 | |
---|
| 102 | #if defined key_trc_diabio |
---|
| 103 | CALL lbc_lnk (trbio(:,:,1,8), 'T', 1. ) ! Lateral boundary conditions on trcbio |
---|
| 104 | #endif |
---|
| 105 | #if defined key_trc_diaadd |
---|
| 106 | CALL lbc_lnk( trc2d(:,:,8), 'T', 1. ) ! Lateral boundary conditions on trc2d |
---|
| 107 | #endif |
---|
| 108 | ! |
---|
| 109 | |
---|
| 110 | IF(ln_ctl) THEN ! print mean trends (used for debugging) |
---|
| 111 | WRITE(charout, FMT="('sed')") |
---|
| 112 | CALL prt_ctl_trc_info(charout) |
---|
| 113 | CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm) |
---|
| 114 | ENDIF |
---|
| 115 | |
---|
| 116 | END SUBROUTINE trc_sed |
---|
| 117 | |
---|
| 118 | #else |
---|
| 119 | !!====================================================================== |
---|
| 120 | !! Dummy module : No PISCES bio-model |
---|
| 121 | !!====================================================================== |
---|
| 122 | CONTAINS |
---|
| 123 | SUBROUTINE trc_sed( kt ) ! Empty routine |
---|
| 124 | INTEGER, INTENT( in ) :: kt |
---|
| 125 | WRITE(*,*) 'trc_sed: You should not have seen this print! error?', kt |
---|
| 126 | END SUBROUTINE trc_sed |
---|
| 127 | #endif |
---|
| 128 | |
---|
| 129 | !!====================================================================== |
---|
| 130 | END MODULE trcsed |
---|