trcwri_pisces.F90 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. MODULE trcwri_pisces
  2. !!======================================================================
  3. !! *** MODULE trcwri ***
  4. !! PISCES : Output of PISCES tracers
  5. !!======================================================================
  6. !! History : 1.0 ! 2009-05 (C. Ethe) Original code
  7. !!----------------------------------------------------------------------
  8. #if defined key_top && defined key_iomput && ( defined key_pisces || defined key_pisces_reduced )
  9. !!----------------------------------------------------------------------
  10. !! 'key_pisces or key_pisces_reduced' PISCES model
  11. !!----------------------------------------------------------------------
  12. !! trc_wri_pisces : outputs of concentration fields
  13. !!----------------------------------------------------------------------
  14. USE trc ! passive tracers common variables
  15. USE sms_pisces ! PISCES variables
  16. USE iom ! I/O manager
  17. IMPLICIT NONE
  18. PRIVATE
  19. PUBLIC trc_wri_pisces
  20. # include "top_substitute.h90"
  21. CONTAINS
  22. SUBROUTINE trc_wri_pisces
  23. !!---------------------------------------------------------------------
  24. !! *** ROUTINE trc_wri_trc ***
  25. !!
  26. !! ** Purpose : output passive tracers fields
  27. !!---------------------------------------------------------------------
  28. CHARACTER (len=20) :: cltra
  29. REAL(wp) :: zfact
  30. INTEGER :: ji, jj, jk, jn
  31. REAL(wp), DIMENSION(jpi,jpj) :: zdic, zo2min, zdepo2min
  32. !!---------------------------------------------------------------------
  33. ! write the tracer concentrations in the file
  34. ! ---------------------------------------
  35. #if defined key_pisces_reduced
  36. DO jn = jp_pcs0, jp_pcs1
  37. cltra = TRIM( ctrcnm(jn) ) ! short title for tracer
  38. CALL iom_put( cltra, trn(:,:,:,jn) )
  39. END DO
  40. #else
  41. DO jn = jp_pcs0, jp_pcs1
  42. zfact = 1.0e+6
  43. IF( jn == jpno3 .OR. jn == jpnh4 ) zfact = rno3 * 1.0e+6
  44. IF( jn == jppo4 ) zfact = po4r * 1.0e+6
  45. cltra = TRIM( ctrcnm(jn) ) ! short title for tracer
  46. IF( iom_use( cltra ) ) CALL iom_put( cltra, trn(:,:,:,jn) * zfact )
  47. END DO
  48. IF( iom_use( "INTDIC" ) ) THEN ! DIC content in kg/m2
  49. zdic(:,:) = 0.
  50. DO jk = 1, jpkm1
  51. zdic(:,:) = zdic(:,:) + trn(:,:,jk,jpdic) * fse3t(:,:,jk) * tmask(:,:,jk) * 12.
  52. ENDDO
  53. CALL iom_put( 'INTDIC', zdic )
  54. ENDIF
  55. !
  56. IF( iom_use( "O2MIN" ) .OR. iom_use ( "ZO2MIN" ) ) THEN ! Oxygen minimum concentration and depth
  57. zo2min (:,:) = trn(:,:,1,jpoxy) * tmask(:,:,1)
  58. zdepo2min(:,:) = fsdepw(:,:,1) * tmask(:,:,1)
  59. DO jk = 2, jpkm1
  60. DO jj = 1, jpj
  61. DO ji = 1, jpi
  62. IF( tmask(ji,jj,jk) == 1 ) then
  63. IF( trn(ji,jj,jk,jpoxy) < zo2min(ji,jj) ) then
  64. zo2min (ji,jj) = trn(ji,jj,jk,jpoxy)
  65. zdepo2min(ji,jj) = fsdepw(ji,jj,jk)
  66. ENDIF
  67. ENDIF
  68. END DO
  69. END DO
  70. END DO
  71. !
  72. CALL iom_put('O2MIN' , zo2min ) ! oxygen minimum concentration
  73. CALL iom_put('ZO2MIN', zdepo2min ) ! depth of oxygen minimum concentration
  74. !
  75. ENDIF
  76. #endif
  77. !
  78. END SUBROUTINE trc_wri_pisces
  79. #else
  80. !!----------------------------------------------------------------------
  81. !! Dummy module : No passive tracer
  82. !!----------------------------------------------------------------------
  83. PUBLIC trc_wri_pisces
  84. CONTAINS
  85. SUBROUTINE trc_wri_pisces ! Empty routine
  86. END SUBROUTINE trc_wri_pisces
  87. #endif
  88. !!----------------------------------------------------------------------
  89. !! NEMO/TOP 3.3 , NEMO Consortium (2010)
  90. !! $Id: trcwri_pisces.F90 3160 2011-11-20 14:27:18Z cetlod $
  91. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  92. !!======================================================================
  93. END MODULE trcwri_pisces