p4zint.F90 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. MODULE p4zint
  2. !!======================================================================
  3. !! *** MODULE p4zint ***
  4. !! TOP : PISCES interpolation and computation of various accessory fields
  5. !!======================================================================
  6. !! History : 1.0 ! 2004-03 (O. Aumont) Original code
  7. !! 2.0 ! 2007-12 (C. Ethe, G. Madec) F90
  8. !!----------------------------------------------------------------------
  9. #if defined key_pisces
  10. !!----------------------------------------------------------------------
  11. !! 'key_pisces' PISCES bio-model
  12. !!----------------------------------------------------------------------
  13. !! p4z_int : interpolation and computation of various accessory fields
  14. !!----------------------------------------------------------------------
  15. USE oce_trc ! shared variables between ocean and passive tracers
  16. USE trc ! passive tracers common variables
  17. USE sms_pisces ! PISCES Source Minus Sink variables
  18. USE iom
  19. IMPLICIT NONE
  20. PRIVATE
  21. PUBLIC p4z_int
  22. REAL(wp) :: xksilim = 16.5e-6_wp ! Half-saturation constant for the Si half-saturation constant computation
  23. !!----------------------------------------------------------------------
  24. !! NEMO/TOP 3.3 , NEMO Consortium (2010)
  25. !! $Id: p4zint.F90 2750 2016-01-12 10:42:05Z ufla $
  26. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  27. !!----------------------------------------------------------------------
  28. CONTAINS
  29. SUBROUTINE p4z_int( kt )
  30. !!---------------------------------------------------------------------
  31. !! *** ROUTINE p4z_int ***
  32. !!
  33. !! ** Purpose : interpolation and computation of various accessory fields
  34. !!
  35. !!---------------------------------------------------------------------
  36. !
  37. INTEGER, INTENT( in ) :: kt ! ocean time-step index
  38. !
  39. INTEGER :: ji, jj ! dummy loop indices
  40. REAL(wp) :: zvar ! local variable
  41. !!---------------------------------------------------------------------
  42. !
  43. IF( nn_timing == 1 ) CALL timing_start('p4z_int')
  44. !
  45. ! Computation of phyto and zoo metabolic rate
  46. ! -------------------------------------------
  47. tgfunc (:,:,:) = EXP( 0.063913 * tsn(:,:,:,jp_tem) )
  48. tgfunc2(:,:,:) = EXP( 0.07608 * tsn(:,:,:,jp_tem) )
  49. ! Computation of the silicon dependant half saturation constant for silica uptake
  50. ! ---------------------------------------------------
  51. DO ji = 1, jpi
  52. DO jj = 1, jpj
  53. zvar = trb(ji,jj,1,jpsil) * trb(ji,jj,1,jpsil)
  54. xksimax(ji,jj) = MAX( xksimax(ji,jj), ( 1.+ 7.* zvar / ( xksilim * xksilim + zvar ) ) * 1e-6 )
  55. END DO
  56. END DO
  57. !
  58. IF( nday_year == nyear_len(1) ) THEN
  59. xksi (:,:) = xksimax(:,:)
  60. xksimax(:,:) = 0._wp
  61. ENDIF
  62. !
  63. IF( nn_timing == 1 ) CALL timing_stop('p4z_int')
  64. !
  65. END SUBROUTINE p4z_int
  66. #else
  67. !!======================================================================
  68. !! Dummy module : No PISCES bio-model
  69. !!======================================================================
  70. CONTAINS
  71. SUBROUTINE p4z_int ! Empty routine
  72. WRITE(*,*) 'p4z_int: You should not have seen this print! error?'
  73. END SUBROUTINE p4z_int
  74. #endif
  75. !!======================================================================
  76. END MODULE p4zint