sedbtb.F90 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. MODULE sedbtb
  2. #if defined key_sed
  3. !!======================================================================
  4. !! *** MODULE sedbtb ***
  5. !! Sediment : bioturbation of the solid components
  6. !!=====================================================================
  7. !! * Modules used
  8. USE sed ! sediment global variable
  9. USE sedmat ! linear system of equations
  10. PUBLIC sed_btb
  11. !! $Id: sedbtb.F90 2355 2015-05-20 07:11:50Z ufla $
  12. CONTAINS
  13. SUBROUTINE sed_btb( kt )
  14. !!---------------------------------------------------------------------
  15. !! *** ROUTINE sed_btb ***
  16. !!
  17. !! ** Purpose : performs bioturbation of the solid sediment components
  18. !!
  19. !! ** Method : ``diffusion'' of solid sediment components.
  20. !!
  21. !! History :
  22. !! ! 98-08 (E. Maier-Reimer, Christoph Heinze ) Original code
  23. !! ! 04-10 (N. Emprin, M. Gehlen ) F90
  24. !! ! 06-04 (C. Ethe) Re-organization
  25. !!----------------------------------------------------------------------
  26. !!* Arguments
  27. INTEGER, INTENT(in) :: kt ! time step
  28. ! * local variables
  29. INTEGER :: ji, jk, js
  30. REAL(wp), DIMENSION(:,:,:) , ALLOCATABLE :: zsol ! solution
  31. !------------------------------------------------------------------------
  32. IF( kt == nitsed000 ) THEN
  33. WRITE(numsed,*) ' sed_btb : Bioturbation '
  34. WRITE(numsed,*) ' '
  35. ENDIF
  36. ! Initializations
  37. !----------------
  38. ALLOCATE( zsol(jpoce,jpksedm1,jpsol) )
  39. zsol(:,:,:) = 0.
  40. ! right hand side of coefficient matrix
  41. !--------------------------------------
  42. DO js = 1, jpsol
  43. DO jk = 1, jpksedm1
  44. DO ji = 1, jpoce
  45. zsol(ji,jk,js) = solcp(ji,jk+1,js)
  46. ENDDO
  47. ENDDO
  48. ENDDO
  49. CALL sed_mat( jpsol, jpoce, jpksedm1, zsol )
  50. ! store solution of the tridiagonal system
  51. !------------------------
  52. DO js = 1, jpsol
  53. DO jk = 1, jpksedm1
  54. DO ji = 1, jpoce
  55. solcp(ji,jk+1,js) = zsol(ji,jk,js)
  56. ENDDO
  57. ENDDO
  58. ENDDO
  59. DEALLOCATE( zsol )
  60. END SUBROUTINE sed_btb
  61. #else
  62. !!======================================================================
  63. !! MODULE sedbtb : Dummy module
  64. !!======================================================================
  65. !! $Id: sedbtb.F90 2355 2015-05-20 07:11:50Z ufla $
  66. CONTAINS
  67. SUBROUTINE sed_btb( kt ) ! Empty routine
  68. INTEGER, INTENT(in) :: kt
  69. WRITE(*,*) 'sed_btb: You should not have seen this print! error?', kt
  70. END SUBROUTINE sed_btb
  71. !!======================================================================
  72. #endif
  73. END MODULE sedbtb