sbc_ice.F90 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. MODULE sbc_ice
  2. !!======================================================================
  3. !! *** MODULE sbc_ice ***
  4. !! Surface module - LIM-3: parameters & variables defined in memory
  5. !!======================================================================
  6. !! History : 3.0 ! 2006-08 (G. Madec) Surface module
  7. !! 3.2 ! 2009-06 (S. Masson) merge with ice_oce
  8. !! 3.3.1! 2011-01 (A. R. Porter, STFC Daresbury) dynamical allocation
  9. !! 3.4 ! 2011-11 (C. Harris) CICE added as an option
  10. !!----------------------------------------------------------------------
  11. #if defined key_lim3 || defined key_lim2 || defined key_cice
  12. !!----------------------------------------------------------------------
  13. !! 'key_lim2' or 'key_lim3' : LIM-2 or LIM-3 sea-ice model
  14. !!----------------------------------------------------------------------
  15. USE par_oce ! ocean parameters
  16. USE sbc_oce ! surface boundary condition: ocean
  17. # if defined key_lim3
  18. USE ice ! LIM-3 parameters
  19. # endif
  20. # if defined key_lim2
  21. USE par_ice_2 ! LIM-2 parameters
  22. USE ice_2
  23. # endif
  24. # if defined key_cice
  25. USE ice_domain_size, only: ncat
  26. #endif
  27. USE lib_mpp ! MPP library
  28. USE in_out_manager ! I/O manager
  29. IMPLICIT NONE
  30. PRIVATE
  31. PUBLIC sbc_ice_alloc ! called in iceini(_2).F90
  32. # if defined key_lim2
  33. LOGICAL , PUBLIC, PARAMETER :: lk_lim2 = .TRUE. !: LIM-2 ice model
  34. LOGICAL , PUBLIC, PARAMETER :: lk_lim3 = .FALSE. !: no LIM-3
  35. LOGICAL , PUBLIC, PARAMETER :: lk_cice = .FALSE. !: no CICE
  36. # if defined key_lim2_vp
  37. CHARACTER(len=1), PUBLIC, PARAMETER :: cp_ice_msh = 'I' !: VP : 'I'-grid ice-velocity (B-grid lower left corner)
  38. # else
  39. CHARACTER(len=1), PUBLIC, PARAMETER :: cp_ice_msh = 'C' !: EVP: 'C'-grid ice-velocity
  40. # endif
  41. # endif
  42. # if defined key_lim3
  43. LOGICAL , PUBLIC, PARAMETER :: lk_lim2 = .FALSE. !: no LIM-2
  44. LOGICAL , PUBLIC, PARAMETER :: lk_lim3 = .TRUE. !: LIM-3 ice model
  45. LOGICAL , PUBLIC, PARAMETER :: lk_cice = .FALSE. !: no CICE
  46. CHARACTER(len=1), PUBLIC, PARAMETER :: cp_ice_msh = 'C' !: 'C'-grid ice-velocity
  47. # endif
  48. # if defined key_cice
  49. LOGICAL , PUBLIC, PARAMETER :: lk_lim2 = .FALSE. !: no LIM-2
  50. LOGICAL , PUBLIC, PARAMETER :: lk_lim3 = .FALSE. !: no LIM-3
  51. LOGICAL , PUBLIC, PARAMETER :: lk_cice = .TRUE. !: CICE ice model
  52. CHARACTER(len=1), PUBLIC :: cp_ice_msh = 'F' !: 'F'-grid ice-velocity
  53. # endif
  54. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qns_ice !: non solar heat flux over ice [W/m2]
  55. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qsr_ice !: solar heat flux over ice [W/m2]
  56. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qla_ice !: latent flux over ice [W/m2]
  57. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: dqla_ice !: latent sensibility over ice [W/m2/K]
  58. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: dqns_ice !: non solar heat flux over ice (LW+SEN+LA) [W/m2/K]
  59. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tn_ice !: ice surface temperature [K]
  60. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: alb_ice !: ice albedo [-]
  61. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: utau_ice !: atmos-ice u-stress. VP: I-pt ; EVP: U,V-pts [N/m2]
  62. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: vtau_ice !: atmos-ice v-stress. VP: I-pt ; EVP: U,V-pts [N/m2]
  63. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fr1_i0 !: Solar surface transmission parameter, thick ice [-]
  64. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fr2_i0 !: Solar surface transmission parameter, thin ice [-]
  65. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_ice !: sublimation - precip over sea ice [kg/m2/s]
  66. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: topmelt !: category topmelt
  67. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: botmelt !: category botmelt
  68. #if defined key_lim3
  69. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: evap_ice !: sublimation [kg/m2/s]
  70. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: devap_ice !: sublimation sensitivity [kg/m2/s/K]
  71. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qns_oce !: non solar heat flux over ocean [W/m2]
  72. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qsr_oce !: non solar heat flux over ocean [W/m2]
  73. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qemp_oce !: heat flux of precip and evap over ocean [W/m2]
  74. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qemp_ice !: heat flux of precip and evap over ice [W/m2]
  75. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qevap_ice !: heat flux of evap over ice [W/m2]
  76. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qprec_ice !: enthalpy of precip over ice [J/m3]
  77. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_oce !: evap - precip over ocean [kg/m2/s]
  78. #endif
  79. #if defined key_lim3 || defined key_lim2
  80. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wndm_ice !: wind speed module at T-point [m/s]
  81. #endif
  82. #if defined key_cice
  83. !
  84. ! for consistency with LIM, these are declared with three dimensions
  85. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qlw_ice !: incoming long-wave
  86. !
  87. ! other forcing arrays are two dimensional
  88. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ss_iou !: x ice-ocean surface stress at NEMO U point
  89. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ss_iov !: y ice-ocean surface stress at NEMO V point
  90. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qatm_ice !: specific humidity
  91. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wndi_ice !: i wind at T point
  92. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wndj_ice !: j wind at T point
  93. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: nfrzmlt !: NEMO frzmlt
  94. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fr_iu !: ice fraction at NEMO U point
  95. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fr_iv !: ice fraction at NEMO V point
  96. ! variables used in the coupled interface
  97. INTEGER , PUBLIC, PARAMETER :: jpl = ncat
  98. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: u_ice, v_ice ! jpi, jpj
  99. #endif
  100. #if defined key_lim2 || defined key_cice
  101. ! already defined in ice.F90 for LIM3
  102. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: a_i
  103. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ht_i, ht_s
  104. #endif
  105. #if defined key_cice
  106. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tatm_ice !: air temperature [K]
  107. #endif
  108. REAL(wp), PUBLIC, SAVE :: cldf_ice = 0.81 !: cloud fraction over sea ice, summer CLIO value [-]
  109. !!----------------------------------------------------------------------
  110. !! NEMO/OPA 4.0 , NEMO Consortium (2011)
  111. !! $Id: sbc_ice.F90 4990 2014-12-15 16:42:49Z timgraham $
  112. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  113. !!----------------------------------------------------------------------
  114. CONTAINS
  115. INTEGER FUNCTION sbc_ice_alloc()
  116. !!----------------------------------------------------------------------
  117. !! *** FUNCTION sbc_ice_alloc ***
  118. !!----------------------------------------------------------------------
  119. INTEGER :: ierr(5)
  120. !!----------------------------------------------------------------------
  121. ierr(:) = 0
  122. #if defined key_lim3 || defined key_lim2
  123. ALLOCATE( qns_ice (jpi,jpj,jpl) , qsr_ice (jpi,jpj,jpl) , &
  124. & qla_ice (jpi,jpj,jpl) , dqla_ice(jpi,jpj,jpl) , &
  125. & dqns_ice(jpi,jpj,jpl) , tn_ice (jpi,jpj,jpl) , alb_ice (jpi,jpj,jpl) , &
  126. & utau_ice(jpi,jpj) , vtau_ice(jpi,jpj) , wndm_ice(jpi,jpj) , &
  127. & fr1_i0 (jpi,jpj) , fr2_i0 (jpi,jpj) , &
  128. #if defined key_lim2
  129. & a_i(jpi,jpj,jpl) , &
  130. #endif
  131. #if defined key_lim3
  132. & evap_ice(jpi,jpj,jpl) , devap_ice(jpi,jpj,jpl) , qprec_ice(jpi,jpj) , &
  133. & qemp_ice(jpi,jpj) , qevap_ice(jpi,jpj,jpl) , qemp_oce (jpi,jpj) , &
  134. & qns_oce (jpi,jpj) , qsr_oce (jpi,jpj) , emp_oce (jpi,jpj) , &
  135. #endif
  136. & emp_ice(jpi,jpj) , STAT= ierr(1) )
  137. #endif
  138. #if defined key_cice
  139. ALLOCATE( qla_ice(jpi,jpj,1) , qlw_ice(jpi,jpj,1) , qsr_ice(jpi,jpj,1) , &
  140. wndi_ice(jpi,jpj) , tatm_ice(jpi,jpj) , qatm_ice(jpi,jpj) , &
  141. wndj_ice(jpi,jpj) , nfrzmlt(jpi,jpj) , ss_iou(jpi,jpj) , &
  142. ss_iov(jpi,jpj) , fr_iu(jpi,jpj) , fr_iv(jpi,jpj) , &
  143. a_i(jpi,jpj,ncat) , topmelt(jpi,jpj,ncat) , botmelt(jpi,jpj,ncat) , &
  144. STAT= ierr(1) )
  145. IF( ln_cpl ) ALLOCATE( u_ice(jpi,jpj) , fr1_i0(jpi,jpj) , tn_ice (jpi,jpj,1) , &
  146. & v_ice(jpi,jpj) , fr2_i0(jpi,jpj) , alb_ice(jpi,jpj,1) , &
  147. & emp_ice(jpi,jpj) , qns_ice(jpi,jpj,1) , dqns_ice(jpi,jpj,1) , &
  148. & STAT= ierr(2) )
  149. #endif
  150. !
  151. #if defined key_cice || defined key_lim2
  152. IF( ln_cpl ) ALLOCATE( ht_i(jpi,jpj,jpl) , ht_s(jpi,jpj,jpl) , STAT=ierr(5) )
  153. #endif
  154. sbc_ice_alloc = MAXVAL( ierr )
  155. IF( lk_mpp ) CALL mpp_sum ( sbc_ice_alloc )
  156. IF( sbc_ice_alloc > 0 ) CALL ctl_warn('sbc_ice_alloc: allocation of arrays failed')
  157. END FUNCTION sbc_ice_alloc
  158. #else
  159. !!----------------------------------------------------------------------
  160. !! Default option NO LIM 2.0 or 3.0 or CICE sea-ice model
  161. !!----------------------------------------------------------------------
  162. USE in_out_manager ! I/O manager
  163. LOGICAL , PUBLIC, PARAMETER :: lk_lim2 = .FALSE. !: no LIM-2 ice model
  164. LOGICAL , PUBLIC, PARAMETER :: lk_lim3 = .FALSE. !: no LIM-3 ice model
  165. LOGICAL , PUBLIC, PARAMETER :: lk_cice = .FALSE. !: no CICE ice model
  166. CHARACTER(len=1), PUBLIC, PARAMETER :: cp_ice_msh = '-' !: no grid ice-velocity
  167. REAL , PUBLIC, PARAMETER :: cldf_ice = 0.81 !: cloud fraction over sea ice, summer CLIO value [-]
  168. INTEGER , PUBLIC, PARAMETER :: jpl = 1
  169. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: u_ice, v_ice,fr1_i0,fr2_i0 ! jpi, jpj
  170. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tn_ice, alb_ice, qns_ice, dqns_ice ! (jpi,jpj,jpl)
  171. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: a_i
  172. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_ice
  173. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qsr_ice
  174. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ht_i, ht_s
  175. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: topmelt, botmelt
  176. #endif
  177. !!======================================================================
  178. END MODULE sbc_ice