sedsfc.F90 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. MODULE sedsfc
  2. !!======================================================================
  3. !! *** MODULE sedsfc ***
  4. !! Sediment : Data at sediment surface
  5. !!=====================================================================
  6. #if defined key_sed && ! defined key_sed_off
  7. !! * Modules used
  8. USE sed ! sediment global variable
  9. USE sedarr
  10. USE seddta
  11. PUBLIC sed_sfc
  12. !! $Id: sedsfc.F90 2355 2015-05-20 07:11:50Z ufla $
  13. CONTAINS
  14. SUBROUTINE sed_sfc( kt )
  15. !!---------------------------------------------------------------------
  16. !! *** ROUTINE sed_sfc ***
  17. !!
  18. !! ** Purpose : Give data from sediment model to tracer model
  19. !!
  20. !!
  21. !! History :
  22. !! ! 06-04 (C. Ethe) Orginal code
  23. !!----------------------------------------------------------------------
  24. !!* Arguments
  25. INTEGER, INTENT(in) :: kt ! time step
  26. ! * local variables
  27. INTEGER :: ji, jj, ikt ! dummy loop indices
  28. !------------------------------------------------------------------------
  29. IF( kt == nitsed000 ) THEN
  30. WRITE(numsed,*) ' sed_sfc : Give data from sediment model to tracer model '
  31. WRITE(numsed,*) ' '
  32. ENDIF
  33. ! reading variables
  34. CALL unpack_arr ( jpoce, trc_data(1:jpi,1:jpj,1), iarroce(1:jpoce), pwcp(1:jpoce,1,jwalk) )
  35. CALL unpack_arr ( jpoce, trc_data(1:jpi,1:jpj,2), iarroce(1:jpoce), pwcp(1:jpoce,1,jwdic) )
  36. CALL unpack_arr ( jpoce, trc_data(1:jpi,1:jpj,3), iarroce(1:jpoce), pwcp(1:jpoce,1,jwno3) )
  37. CALL unpack_arr ( jpoce, trc_data(1:jpi,1:jpj,4), iarroce(1:jpoce), pwcp(1:jpoce,1,jwpo4) )
  38. CALL unpack_arr ( jpoce, trc_data(1:jpi,1:jpj,5), iarroce(1:jpoce), pwcp(1:jpoce,1,jwoxy) )
  39. CALL unpack_arr ( jpoce, trc_data(1:jpi,1:jpj,6), iarroce(1:jpoce), pwcp(1:jpoce,1,jwsil) )
  40. DO jj = 1,jpj
  41. DO ji = 1, jpi
  42. ikt = mbkt(ji,jj)
  43. IF ( tmask(ji,jj,ikt) == 1 ) THEN
  44. trn(ji,jj,ikt,jptal) = trc_data(ji,jj,1)
  45. trn(ji,jj,ikt,jpdic) = trc_data(ji,jj,2)
  46. trn(ji,jj,ikt,jpno3) = trc_data(ji,jj,3) * 7.6
  47. trn(ji,jj,ikt,jppo4) = trc_data(ji,jj,4) * 122.
  48. trn(ji,jj,ikt,jpoxy) = trc_data(ji,jj,5)
  49. trn(ji,jj,ikt,jpsil) = trc_data(ji,jj,6)
  50. ENDIF
  51. ENDDO
  52. ENDDO
  53. END SUBROUTINE sed_sfc
  54. #else
  55. !!======================================================================
  56. !! MODULE sedsfc : Dummy module
  57. !!======================================================================
  58. !! $Id: sedsfc.F90 2355 2015-05-20 07:11:50Z ufla $
  59. CONTAINS
  60. SUBROUTINE sed_sfc ( kt )
  61. INTEGER, INTENT(in) :: kt
  62. WRITE(*,*) 'sed_sfc: You should not have seen this print! error?', kt
  63. END SUBROUTINE sed_sfc
  64. #endif
  65. END MODULE sedsfc