trcini_age.F90 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. MODULE trcini_age
  2. !!======================================================================
  3. !! *** MODULE trcini_age ***
  4. !! TOP : initialisation of the AGE tracer
  5. !!======================================================================
  6. !! History : 2.0 ! 2007-12 (G. Nurser, G. Madec, C. Ethe ) Original code
  7. !!----------------------------------------------------------------------
  8. #if defined key_age
  9. !!----------------------------------------------------------------------
  10. !! 'key_age' AGE tracer
  11. !!----------------------------------------------------------------------
  12. !! trc_ini_age : MY_TRC model initialisation
  13. !!----------------------------------------------------------------------
  14. USE oce_trc
  15. USE trc
  16. USE trcsms_age
  17. IMPLICIT NONE
  18. PRIVATE
  19. PUBLIC trc_ini_age ! called by trcini.F90 module
  20. !!----------------------------------------------------------------------
  21. !! NEMO/TOP 3.3 , NEMO Consortium (2010)
  22. !! $Id: trcini_age.F90 3829 2017-01-13 07:27:36Z ufla $
  23. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  24. !!----------------------------------------------------------------------
  25. CONTAINS
  26. SUBROUTINE trc_ini_age
  27. !!----------------------------------------------------------------------
  28. !! *** trc_ini_age ***
  29. !!
  30. !! ** Purpose : initialization for AGE model
  31. !!
  32. !!----------------------------------------------------------------------
  33. IF(lwp) WRITE(numout,*)
  34. IF(lwp) WRITE(numout,*) ' trc_ini_age: passive tracer age'
  35. IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
  36. rryear = 1._wp / ( nyear_len(1) * rday ) ! recip number of seconds in one year
  37. !! BUG in s-coordinate this does not work!
  38. nlb_age = MINLOC( gdepw_1d, mask = gdepw_1d > rn_age_depth, dim = 1 ) ! shallowest W level Below age_depth
  39. ! = shallowest T level wholly below age_depth
  40. nl_age = nlb_age - 1 ! deepest W level Above age_depth
  41. ! = T level surrounding age_depth
  42. nla_age = nl_age - 1 ! deepest T level wholly above age_depth
  43. frac_kill_age = ( rn_age_depth - gdepw_1d(nl_age) ) / e3t_1d(nl_age) ! fraction of level nl_age above age_depth
  44. frac_add_age = 1._wp - frac_kill_age ! fraction of level nl_age below age_depth
  45. IF( .NOT. ln_rsttr ) trn(:,:,:,jp_age0:jp_age1) = 0.
  46. !
  47. END SUBROUTINE trc_ini_age
  48. #else
  49. !!----------------------------------------------------------------------
  50. !! Dummy module No AGE model
  51. !!----------------------------------------------------------------------
  52. CONTAINS
  53. SUBROUTINE trc_ini_age ! Empty routine
  54. END SUBROUTINE trc_ini_age
  55. #endif
  56. !!======================================================================
  57. END MODULE trcini_age