limthd_sal.F90 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. MODULE limthd_sal
  2. !!======================================================================
  3. !! *** MODULE limthd_sal ***
  4. !! LIM-3 sea-ice : computation of salinity variations in the ice
  5. !!======================================================================
  6. !! History : - ! 2003-05 (M. Vancoppenolle) UCL-ASTR first coding for LIM3-1D
  7. !! 3.0 ! 2005-12 (M. Vancoppenolle) adapted to the 3-D version
  8. !! 4.0 ! 2011-02 (G. Madec) dynamical allocation
  9. !!---------------------------------------------------------------------
  10. #if defined key_lim3
  11. !!----------------------------------------------------------------------
  12. !! 'key_lim3' LIM-3 sea-ice model
  13. !!----------------------------------------------------------------------
  14. !! lim_thd_sal : salinity variations in the ice
  15. !!----------------------------------------------------------------------
  16. USE par_oce ! ocean parameters
  17. USE phycst ! physical constants (ocean directory)
  18. USE sbc_oce ! Surface boundary condition: ocean fields
  19. USE ice ! LIM variables
  20. USE thd_ice ! LIM thermodynamics
  21. USE limvar ! LIM variables
  22. USE in_out_manager ! I/O manager
  23. USE lib_mpp ! MPP library
  24. USE wrk_nemo ! work arrays
  25. USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)
  26. IMPLICIT NONE
  27. PRIVATE
  28. PUBLIC lim_thd_sal ! called by limthd module
  29. PUBLIC lim_thd_sal_init ! called by sbc_lim_init
  30. !!----------------------------------------------------------------------
  31. !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011)
  32. !! $Id: limthd_sal.F90 4872 2014-11-18 17:03:00Z clem $
  33. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  34. !!----------------------------------------------------------------------
  35. CONTAINS
  36. SUBROUTINE lim_thd_sal( kideb, kiut )
  37. !!-------------------------------------------------------------------
  38. !! *** ROUTINE lim_thd_sal ***
  39. !!
  40. !! ** Purpose : computes new salinities in the ice
  41. !!
  42. !! ** Method : 3 possibilities
  43. !! -> nn_icesal = 1 -> Sice = cst [ice salinity constant in both time & space]
  44. !! -> nn_icesal = 2 -> Sice = S(z,t) [Vancoppenolle et al. 2005]
  45. !! -> nn_icesal = 3 -> Sice = S(z) [multiyear ice]
  46. !!---------------------------------------------------------------------
  47. INTEGER, INTENT(in) :: kideb, kiut ! thickness category index
  48. !
  49. INTEGER :: ji, jk ! dummy loop indices
  50. REAL(wp) :: iflush, igravdr ! local scalars
  51. !!---------------------------------------------------------------------
  52. !---------------------------------------------------------
  53. ! 0) Update ice salinity from snow-ice and bottom growth
  54. !---------------------------------------------------------
  55. DO ji = kideb, kiut
  56. sm_i_1d(ji) = sm_i_1d(ji) + dsm_i_se_1d(ji) + dsm_i_si_1d(ji)
  57. END DO
  58. !--------------------------------------------------------------------|
  59. ! 1) salinity constant in time |
  60. !--------------------------------------------------------------------|
  61. ! do nothing
  62. !----------------------------------------------------------------------|
  63. ! 2) salinity varying in time |
  64. !----------------------------------------------------------------------|
  65. IF( nn_icesal == 2 ) THEN
  66. DO ji = kideb, kiut
  67. !
  68. ! Switches
  69. !----------
  70. iflush = MAX( 0._wp , SIGN( 1._wp , t_su_1d(ji) - rt0 ) ) ! =1 if summer
  71. igravdr = MAX( 0._wp , SIGN( 1._wp , t_bo_1d(ji) - t_su_1d(ji) ) ) ! =1 if t_su < t_bo
  72. !---------------------
  73. ! Salinity tendencies
  74. !---------------------
  75. ! drainage by gravity drainage
  76. dsm_i_gd_1d(ji) = - igravdr * MAX( sm_i_1d(ji) - rn_sal_gd , 0._wp ) / rn_time_gd * rdt_ice
  77. ! drainage by flushing
  78. dsm_i_fl_1d(ji) = - iflush * MAX( sm_i_1d(ji) - rn_sal_fl , 0._wp ) / rn_time_fl * rdt_ice
  79. !-----------------
  80. ! Update salinity
  81. !-----------------
  82. ! only drainage terms ( gravity drainage and flushing )
  83. ! snow ice / bottom sources are added in lim_thd_ent to conserve energy
  84. sm_i_1d(ji) = sm_i_1d(ji) + dsm_i_fl_1d(ji) + dsm_i_gd_1d(ji)
  85. !----------------------------
  86. ! Salt flux - brine drainage
  87. !----------------------------
  88. sfx_bri_1d(ji) = sfx_bri_1d(ji) - rhoic * a_i_1d(ji) * ht_i_1d(ji) * ( dsm_i_fl_1d(ji) + dsm_i_gd_1d(ji) ) * r1_rdtice
  89. END DO
  90. ! Salinity profile
  91. CALL lim_var_salprof1d( kideb, kiut )
  92. !
  93. ENDIF
  94. !------------------------------------------------------------------------------|
  95. ! 3) vertical profile of salinity, constant in time |
  96. !------------------------------------------------------------------------------|
  97. IF( nn_icesal == 3 ) CALL lim_var_salprof1d( kideb, kiut )
  98. !
  99. END SUBROUTINE lim_thd_sal
  100. SUBROUTINE lim_thd_sal_init
  101. !!-------------------------------------------------------------------
  102. !! *** ROUTINE lim_thd_sal_init ***
  103. !!
  104. !! ** Purpose : initialization of ice salinity parameters
  105. !!
  106. !! ** Method : Read the namicesal namelist and check the parameter
  107. !! values called at the first timestep (nit000)
  108. !!
  109. !! ** input : Namelist namicesal
  110. !!-------------------------------------------------------------------
  111. INTEGER :: ios ! Local integer output status for namelist read
  112. NAMELIST/namicesal/ nn_icesal, rn_icesal, rn_sal_gd, rn_time_gd, rn_sal_fl, rn_time_fl, &
  113. & rn_simax, rn_simin
  114. !!-------------------------------------------------------------------
  115. !
  116. REWIND( numnam_ice_ref ) ! Namelist namicesal in reference namelist : Ice salinity
  117. READ ( numnam_ice_ref, namicesal, IOSTAT = ios, ERR = 901)
  118. 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicesal in reference namelist', lwp )
  119. REWIND( numnam_ice_cfg ) ! Namelist namicesal in configuration namelist : Ice salinity
  120. READ ( numnam_ice_cfg, namicesal, IOSTAT = ios, ERR = 902 )
  121. 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicesal in configuration namelist', lwp )
  122. IF(lwm) WRITE ( numoni, namicesal )
  123. !
  124. IF(lwp) THEN ! control print
  125. WRITE(numout,*)
  126. WRITE(numout,*) 'lim_thd_sal_init : Ice parameters for salinity '
  127. WRITE(numout,*) '~~~~~~~~~~~~~~~~'
  128. WRITE(numout,*) ' switch for salinity nn_icesal = ', nn_icesal
  129. WRITE(numout,*) ' bulk salinity value if nn_icesal = 1 = ', rn_icesal
  130. WRITE(numout,*) ' restoring salinity for GD = ', rn_sal_gd
  131. WRITE(numout,*) ' restoring time for GD = ', rn_time_gd
  132. WRITE(numout,*) ' restoring salinity for flushing = ', rn_sal_fl
  133. WRITE(numout,*) ' restoring time for flushing = ', rn_time_fl
  134. WRITE(numout,*) ' Maximum tolerated ice salinity = ', rn_simax
  135. WRITE(numout,*) ' Minimum tolerated ice salinity = ', rn_simin
  136. ENDIF
  137. !
  138. END SUBROUTINE lim_thd_sal_init
  139. #else
  140. !!----------------------------------------------------------------------
  141. !! Default option Dummy Module No LIM-3 sea-ice model
  142. !!----------------------------------------------------------------------
  143. #endif
  144. !!======================================================================
  145. END MODULE limthd_sal