thd_ice_2.F90 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. MODULE thd_ice_2
  2. #if defined key_lim2
  3. !!======================================================================
  4. !! *** MODULE thd_ice_2 ***
  5. !! LIM 2.0 sea-ice : Ice thermodynamics in 1D
  6. !!=====================================================================
  7. !! History :
  8. !! 2.0 ! 02-11 (C. Ethe) F90: Free form and module
  9. !!----------------------------------------------------------------------
  10. !! NEMO/LIM2 3.3 , UCL - NEMO Consortium (2010)
  11. !! $Id: thd_ice_2.F90 4306 2013-11-21 14:59:57Z cetlod $
  12. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  13. !!----------------------------------------------------------------------
  14. USE par_ice_2
  15. USE ice_2
  16. IMPLICIT NONE
  17. PRIVATE
  18. PUBLIC thd_ice_alloc_2 ! Routine called by nemogcm.F90
  19. !! * Share Module variables
  20. REAL(wp) , PUBLIC :: & !!! ** ice-thermo namelist (namicethd) **
  21. hmelt , & !: maximum melting at the bottom
  22. hicmin , & !: ice th. corr. to max. ener. in brine pocket
  23. hiclim , & !: minimum ice thickness
  24. amax , & !: maximum lead fraction
  25. swiqst , & !: energy stored in brine pocket (1) or not (0)
  26. sbeta , & !: numerical scheme for diffusion in ice
  27. parlat , & !: percent. of energy used for lateral ablation
  28. hakspl , & !: slope of distr. for Hakkinen-Mellro's lat. melt
  29. hibspl , & !: slope of distribution for Hibler's lat. melt
  30. exld , & !: exponent for leads-closure rate
  31. hakdif , & !: coefficient for diffusions of ice and snow
  32. thth , & !: thick. for comp. of eq. thermal conduct
  33. hnzst , & !: thick. of the surf. layer in temp. comp.
  34. parsub , & !: switch for snow sublimation or not
  35. alphs !: coef. for snow density when snow-ice formation
  36. REAL(wp), PUBLIC, DIMENSION(2) :: & !:
  37. hiccrit !: ice th. for lateral accretion in the NH (SH) (m)
  38. REAL(wp) , PUBLIC :: & !:
  39. uscomi, & !: inverse of minimum lead fraction
  40. cnscg !: ratio rcpsn/rcpic
  41. INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: & !:
  42. npb , & !: number of points where computations has to be done
  43. npac !: correspondance between the points
  44. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: & !:
  45. qldif_1d , & !: corresponding to the 2D var qldif
  46. qcmif_1d , & !: corresponding to the 2D var qcmif
  47. thcm_1d , & !: " " thcm
  48. fstbif_1d , & !: " " fstric
  49. fltbif_1d , & !: " " ffltbif
  50. fscbq_1d , & !: " " fscmcbq
  51. qsr_ice_1d , & !: " " qsr_ice
  52. fr1_i0_1d , & !: " " fr1_i0
  53. fr2_i0_1d , & !: " " fr2_i0
  54. qns_ice_1d , & !: " " qns_ice
  55. qfvbq_1d , & !: " " qfvbq
  56. sist_1d , & !: " " sist
  57. tfu_1d , & !: " " tfu
  58. sprecip_1d , & !: " " sprecip
  59. h_snow_1d , & !: " " h_snow
  60. h_ice_1d , & !: " " h_ice
  61. frld_1d , & !: " " frld
  62. qstbif_1d , & !: " " qstoif
  63. fbif_1d , & !: " " fbif
  64. rdm_ice_1d , & !: " " rdm_ice
  65. rdq_ice_1d , & !: " " rdq_ice
  66. rdm_snw_1d , & !: " " rdm_snw
  67. rdq_snw_1d , & !: " " rdq_snw
  68. qlbbq_1d , & !: " " qlbsbq
  69. dmgwi_1d , & !: " " dmgwi
  70. dvsbq_1d , & !: " " rdvosif
  71. rdvomif_1d , & !: " " rdvomif
  72. dvbbq_1d , & !: " " rdvobif
  73. dvlbq_1d , & !: " " rdvolif
  74. dvnbq_1d , & !: " " rdvolif
  75. dqns_ice_1d , & !: " " dqns_ice
  76. qla_ice_1d , & !: " " qla_ice
  77. dqla_ice_1d !: " " dqla_ice
  78. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: & !:
  79. tbif_1d !: corresponding to the 2D var tbif
  80. !!----------------------------------------------------------------------
  81. !! NEMO/LIM2 3.3 , UCL - NEMO Consortium (2010)
  82. !! $Id: thd_ice_2.F90 4306 2013-11-21 14:59:57Z cetlod $
  83. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  84. !!----------------------------------------------------------------------
  85. CONTAINS
  86. INTEGER FUNCTION thd_ice_alloc_2()
  87. !!----------------------------------------------------------------------
  88. USE lib_mpp ! MPP library
  89. INTEGER :: ierr(5)
  90. !!----------------------------------------------------------------------
  91. !
  92. ierr(:) = 0
  93. !
  94. ALLOCATE( npb(jpij), npac(jpij), &
  95. & qldif_1d(jpij), qcmif_1d(jpij), thcm_1d(jpij), &
  96. & fstbif_1d(jpij), fltbif_1d(jpij), fscbq_1d(jpij), &
  97. & qsr_ice_1d(jpij),fr1_i0_1d(jpij), fr2_i0_1d(jpij), Stat=ierr(1))
  98. !
  99. ALLOCATE( qns_ice_1d(jpij), qfvbq_1d(jpij), sist_1d(jpij), tfu_1d(jpij), &
  100. & sprecip_1d(jpij), h_snow_1d(jpij),h_ice_1d(jpij),frld_1d(jpij),&
  101. & qstbif_1d(jpij), fbif_1d(jpij), Stat=ierr(2))
  102. !
  103. ALLOCATE( rdm_ice_1d(jpij), rdq_ice_1d(jpij) , &
  104. & rdm_snw_1d(jpij), rdq_snw_1d(jpij), qlbbq_1d(jpij) , &
  105. & dmgwi_1d(jpij) , dvsbq_1d(jpij) , rdvomif_1d(jpij), &
  106. & dvbbq_1d(jpij) , dvlbq_1d(jpij) , dvnbq_1d(jpij) , &
  107. & Stat=ierr(3))
  108. !
  109. ALLOCATE( dqns_ice_1d(jpij) ,qla_ice_1d(jpij), dqla_ice_1d(jpij), &
  110. & tbif_1d(jpij, jplayersp1), Stat=ierr(4))
  111. !
  112. thd_ice_alloc_2 = MAXVAL(ierr)
  113. IF( thd_ice_alloc_2 /= 0 ) CALL ctl_warn('thd_ice_alloc_2: failed to allocate arrays')
  114. !
  115. END FUNCTION thd_ice_alloc_2
  116. #endif
  117. !!======================================================================
  118. END MODULE thd_ice_2