sedstp.F90 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. MODULE sedstp
  2. #if defined key_sed
  3. !!======================================================================
  4. !! *** MODULE sedstp ***
  5. !! Sediment model : Sediment model time-stepping
  6. !!======================================================================
  7. USE sed ! sediment global variables
  8. USE seddta ! data read
  9. USE sedchem ! chemical constant
  10. USE sedco3 ! carbonate in sediment pore water
  11. USE seddsr ! dissolution reaction
  12. USE sedbtb ! bioturbation
  13. USE sedadv ! vertical advection
  14. USE sedmbc ! mass balance calculation
  15. USE sedsfc ! sediment surface data
  16. USE sedrst ! restart
  17. USE sedwri ! outputs
  18. IMPLICIT NONE
  19. PRIVATE
  20. !! * Routine accessibility
  21. PUBLIC sed_stp ! called by step.F90
  22. !! $Id: sedstp.F90 2355 2015-05-20 07:11:50Z ufla $
  23. CONTAINS
  24. SUBROUTINE sed_stp ( kt )
  25. !!---------------------------------------------------------------------
  26. !! *** ROUTINE sed_stp ***
  27. !!
  28. !! ** Purpose : Sediment time stepping
  29. !! Simulation of pore water chemistry
  30. !!
  31. !! ** Action :
  32. !!
  33. !!
  34. !! History :
  35. !! ! 98-08 (E. Maier-Reimer, Christoph Heinze ) Original code
  36. !! ! 04-10 (N. Emprin, M. Gehlen ) coupled with PISCES
  37. !! ! 06-04 (C. Ethe) Re-organization
  38. !!----------------------------------------------------------------------
  39. INTEGER, INTENT(in) :: kt ! number of iteration
  40. !!----------------------------------------------------------------------
  41. IF( kt /= nitsed000 ) THEN
  42. CALL sed_dta( kt ) ! Load Data for bot. wat. Chem and fluxes
  43. CALL sed_chem( kt ) ! update of chemical constant to account for salinity, temperature changes
  44. ENDIF
  45. CALL sed_dsr( kt ) ! Dissolution reaction
  46. CALL sed_adv( kt ) ! advection
  47. CALL sed_btb( kt ) ! Bioturbation
  48. IF ( ( MOD( kt, nwrised ) == 0 ) .OR. ( MOD( kt, nstock ) == 0 ) .OR. ( kt == nitsedend ) ) &
  49. CALL sed_co3( kt ) ! pH actualization for saving
  50. CALL sed_mbc( kt ) ! cumulation for mass balance calculation
  51. #if ! defined key_sed_off
  52. CALL sed_sfc( kt ) ! Give back new bottom wat chem to tracer model
  53. #endif
  54. CALL sed_rst_wri( kt ) ! restart file output
  55. CALL sed_wri( kt ) ! outputs
  56. IF( kt == nitsedend ) CLOSE( numsed )
  57. END SUBROUTINE sed_stp
  58. #else
  59. !!======================================================================
  60. !! MODULE sedstp : Dummy module
  61. !!======================================================================
  62. !! $Id: sedstp.F90 2355 2015-05-20 07:11:50Z ufla $
  63. CONTAINS
  64. SUBROUTINE sed_stp( kt ) ! Empty routine
  65. INTEGER, INTENT(in) :: kt
  66. WRITE(*,*) 'sed_stp: You should not have seen this print! error?', kt
  67. END SUBROUTINE sed_stp
  68. #endif
  69. END MODULE sedstp