phycst.F90 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. MODULE phycst
  2. !!======================================================================
  3. !! *** MODULE phycst ***
  4. !! Definition of of both ocean and ice parameters used in the code
  5. !!=====================================================================
  6. !! History : OPA ! 1990-10 (C. Levy - G. Madec) Original code
  7. !! 8.1 ! 1991-11 (G. Madec, M. Imbard) cosmetic changes
  8. !! NEMO 1.0 ! 2002-08 (G. Madec, C. Ethe) F90, add ice constants
  9. !! - ! 2006-08 (G. Madec) style
  10. !! 3.2 ! 2006-08 (S. Masson, G. Madec) suppress useless variables + style
  11. !! 3.4 ! 2011-11 (C. Harris) minor changes for CICE constants
  12. !!----------------------------------------------------------------------
  13. !!----------------------------------------------------------------------
  14. !! phy_cst : define and print physical constant and domain parameters
  15. !!----------------------------------------------------------------------
  16. USE par_oce ! ocean parameters
  17. USE in_out_manager ! I/O manager
  18. IMPLICIT NONE
  19. PRIVATE
  20. PUBLIC phy_cst ! routine called by inipar.F90
  21. REAL(wp), PUBLIC :: rpi = 3.141592653589793_wp !: pi
  22. REAL(wp), PUBLIC :: rad = 3.141592653589793_wp / 180._wp !: conversion from degre into radian
  23. REAL(wp), PUBLIC :: rsmall = 0.5 * EPSILON( 1.e0 ) !: smallest real computer value
  24. REAL(wp), PUBLIC :: rday = 24.*60.*60. !: day [s]
  25. REAL(wp), PUBLIC :: rsiyea !: sideral year [s]
  26. REAL(wp), PUBLIC :: rsiday !: sideral day [s]
  27. REAL(wp), PUBLIC :: raamo = 12._wp !: number of months in one year
  28. REAL(wp), PUBLIC :: rjjhh = 24._wp !: number of hours in one day
  29. REAL(wp), PUBLIC :: rhhmm = 60._wp !: number of minutes in one hour
  30. REAL(wp), PUBLIC :: rmmss = 60._wp !: number of seconds in one minute
  31. REAL(wp), PUBLIC :: omega !: earth rotation parameter [s-1]
  32. REAL(wp), PUBLIC :: ra = 6371229._wp !: earth radius [m]
  33. REAL(wp), PUBLIC :: grav = 9.80665_wp !: gravity [m/s2]
  34. REAL(wp), PUBLIC :: rtt = 273.16_wp !: triple point of temperature [Kelvin]
  35. REAL(wp), PUBLIC :: rt0 = 273.15_wp !: freezing point of fresh water [Kelvin]
  36. #if defined key_lim3
  37. REAL(wp), PUBLIC :: rt0_snow = 273.15_wp !: melting point of snow [Kelvin]
  38. REAL(wp), PUBLIC :: rt0_ice = 273.15_wp !: melting point of ice [Kelvin]
  39. #else
  40. REAL(wp), PUBLIC :: rt0_snow = 273.15_wp !: melting point of snow [Kelvin]
  41. REAL(wp), PUBLIC :: rt0_ice = 273.05_wp !: melting point of ice [Kelvin]
  42. #endif
  43. REAL(wp), PUBLIC :: rau0 !: volumic mass of reference [kg/m3]
  44. REAL(wp), PUBLIC :: r1_rau0 !: = 1. / rau0 [m3/kg]
  45. REAL(wp), PUBLIC :: rcp !: ocean specific heat [J/Kelvin]
  46. REAL(wp), PUBLIC :: r1_rcp !: = 1. / rcp [Kelvin/J]
  47. REAL(wp), PUBLIC :: rau0_rcp !: = rau0 * rcp
  48. REAL(wp), PUBLIC :: r1_rau0_rcp !: = 1. / ( rau0 * rcp )
  49. REAL(wp), PUBLIC :: rhosn = 330._wp !: volumic mass of snow [kg/m3]
  50. REAL(wp), PUBLIC :: emic = 0.97_wp !: emissivity of snow or ice
  51. REAL(wp), PUBLIC :: sice = 6.0_wp !: salinity of ice [psu]
  52. REAL(wp), PUBLIC :: soce = 34.7_wp !: salinity of sea [psu]
  53. REAL(wp), PUBLIC :: cevap = 2.5e+6_wp !: latent heat of evaporation (water)
  54. REAL(wp), PUBLIC :: srgamma = 0.9_wp !: correction factor for solar radiation (Oberhuber, 1974)
  55. REAL(wp), PUBLIC :: vkarmn = 0.4_wp !: von Karman constant
  56. REAL(wp), PUBLIC :: stefan = 5.67e-8_wp !: Stefan-Boltzmann constant
  57. #if defined key_lim3 || defined key_cice
  58. REAL(wp), PUBLIC :: rhoic = 917._wp !: volumic mass of sea ice [kg/m3]
  59. REAL(wp), PUBLIC :: rcdic = 2.034396_wp !: thermal conductivity of fresh ice [W/m/K]
  60. REAL(wp), PUBLIC :: cpic = 2067.0_wp !: specific heat of fresh ice [J/kg/K]
  61. REAL(wp), PUBLIC :: lsub = 2.834e+6_wp !: pure ice latent heat of sublimation [J/kg]
  62. REAL(wp), PUBLIC :: lfus = 0.334e+6_wp !: latent heat of fusion of fresh ice [J/kg]
  63. REAL(wp), PUBLIC :: tmut = 0.054_wp !: decrease of seawater meltpoint with salinity
  64. REAL(wp), PUBLIC :: xlsn !: = lfus*rhosn (volumetric latent heat fusion of snow) [J/m3]
  65. #else
  66. REAL(wp), PUBLIC :: rhoic = 900._wp !: volumic mass of sea ice [kg/m3]
  67. REAL(wp), PUBLIC :: rcdic = 2.034396_wp !: conductivity of the ice [W/m/K]
  68. REAL(wp), PUBLIC :: rcpic = 1.8837e+6_wp !: volumetric specific heat for ice [J/m3/K]
  69. REAL(wp), PUBLIC :: cpic !: = rcpic / rhoic (specific heat for ice) [J/Kg/K]
  70. REAL(wp), PUBLIC :: rcdsn = 0.22_wp !: conductivity of the snow [W/m/K]
  71. REAL(wp), PUBLIC :: rcpsn = 6.9069e+5_wp !: volumetric specific heat for snow [J/m3/K]
  72. REAL(wp), PUBLIC :: xlsn = 110.121e+6_wp !: volumetric latent heat fusion of snow [J/m3]
  73. REAL(wp), PUBLIC :: lfus !: = xlsn / rhosn (latent heat of fusion of fresh ice) [J/Kg]
  74. REAL(wp), PUBLIC :: xlic = 300.33e+6_wp !: volumetric latent heat fusion of ice [J/m3]
  75. REAL(wp), PUBLIC :: xsn = 2.8e+6_wp !: volumetric latent heat of sublimation of snow [J/m3]
  76. #endif
  77. #if defined key_cice
  78. REAL(wp), PUBLIC :: rcdsn = 0.31_wp !: thermal conductivity of snow [W/m/K], now namelist parameter for LIM3
  79. #endif
  80. #if defined key_lim3
  81. REAL(wp), PUBLIC :: r1_rhoic !: 1 / rhoic
  82. REAL(wp), PUBLIC :: r1_rhosn !: 1 / rhosn
  83. #endif
  84. !!----------------------------------------------------------------------
  85. !! NEMO/OPA 3.3 , NEMO Consortium (2010)
  86. !! $Id: phycst.F90 7537 2017-01-10 11:09:30Z vancop $
  87. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  88. !!----------------------------------------------------------------------
  89. CONTAINS
  90. SUBROUTINE phy_cst
  91. !!----------------------------------------------------------------------
  92. !! *** ROUTINE phy_cst ***
  93. !!
  94. !! ** Purpose : Print model parameters and set and print the constants
  95. !!----------------------------------------------------------------------
  96. CHARACTER (len=64) :: cform = "(A12, 3(A13, I7) )"
  97. !!----------------------------------------------------------------------
  98. IF(lwp) WRITE(numout,*)
  99. IF(lwp) WRITE(numout,*) ' phy_cst : initialization of ocean parameters and constants'
  100. IF(lwp) WRITE(numout,*) ' ~~~~~~~'
  101. ! Ocean Parameters
  102. ! ----------------
  103. IF(lwp) THEN
  104. WRITE(numout,*) ' Domain info'
  105. WRITE(numout,*) ' dimension of model'
  106. WRITE(numout,*) ' Local domain Global domain Data domain '
  107. WRITE(numout,cform) ' ',' jpi : ', jpi, ' jpiglo : ', jpiglo, ' jpidta : ', jpidta
  108. WRITE(numout,cform) ' ',' jpj : ', jpj, ' jpjglo : ', jpjglo, ' jpjdta : ', jpjdta
  109. WRITE(numout,cform) ' ',' jpk : ', jpk, ' jpk : ', jpk , ' jpkdta : ', jpkdta
  110. WRITE(numout,*) ' ',' jpij : ', jpij
  111. WRITE(numout,*) ' mpp local domain info (mpp)'
  112. WRITE(numout,*) ' jpni : ', jpni, ' jpreci : ', jpreci
  113. WRITE(numout,*) ' jpnj : ', jpnj, ' jprecj : ', jprecj
  114. WRITE(numout,*) ' jpnij : ', jpnij
  115. WRITE(numout,*) ' lateral domain boundary condition type : jperio = ', jperio
  116. ENDIF
  117. ! Define constants
  118. ! ----------------
  119. IF(lwp) WRITE(numout,*)
  120. IF(lwp) WRITE(numout,*) ' Constants'
  121. IF(lwp) WRITE(numout,*)
  122. IF(lwp) WRITE(numout,*) ' mathematical constant rpi = ', rpi
  123. rsiyea = 365.25_wp * rday * 2._wp * rpi / 6.283076_wp
  124. rsiday = rday / ( 1._wp + rday / rsiyea )
  125. #if defined key_cice
  126. omega = 7.292116e-05
  127. #else
  128. omega = 2._wp * rpi / rsiday
  129. #endif
  130. IF(lwp) WRITE(numout,*)
  131. IF(lwp) WRITE(numout,*) ' day rday = ', rday, ' s'
  132. IF(lwp) WRITE(numout,*) ' sideral year rsiyea = ', rsiyea, ' s'
  133. IF(lwp) WRITE(numout,*) ' sideral day rsiday = ', rsiday, ' s'
  134. IF(lwp) WRITE(numout,*) ' omega omega = ', omega, ' s^-1'
  135. IF(lwp) WRITE(numout,*)
  136. IF(lwp) WRITE(numout,*) ' nb of months per year raamo = ', raamo, ' months'
  137. IF(lwp) WRITE(numout,*) ' nb of hours per day rjjhh = ', rjjhh, ' hours'
  138. IF(lwp) WRITE(numout,*) ' nb of minutes per hour rhhmm = ', rhhmm, ' mn'
  139. IF(lwp) WRITE(numout,*) ' nb of seconds per minute rmmss = ', rmmss, ' s'
  140. IF(lwp) WRITE(numout,*)
  141. IF(lwp) WRITE(numout,*) ' earth radius ra = ', ra, ' m'
  142. IF(lwp) WRITE(numout,*) ' gravity grav = ', grav , ' m/s^2'
  143. IF(lwp) WRITE(numout,*)
  144. IF(lwp) WRITE(numout,*) ' triple point of temperature rtt = ', rtt , ' K'
  145. IF(lwp) WRITE(numout,*) ' freezing point of water rt0 = ', rt0 , ' K'
  146. IF(lwp) WRITE(numout,*) ' melting point of snow rt0_snow = ', rt0_snow, ' K'
  147. IF(lwp) WRITE(numout,*) ' melting point of ice rt0_ice = ', rt0_ice , ' K'
  148. IF(lwp) WRITE(numout,*) ' reference density and heat capacity now defined in eosbn2.f90'
  149. #if defined key_lim3 || defined key_cice
  150. xlsn = lfus * rhosn ! volumetric latent heat fusion of snow [J/m3]
  151. #else
  152. cpic = rcpic / rhoic ! specific heat for ice [J/Kg/K]
  153. lfus = xlsn / rhosn ! latent heat of fusion of fresh ice
  154. #endif
  155. #if defined key_lim3
  156. r1_rhoic = 1._wp / rhoic
  157. r1_rhosn = 1._wp / rhosn
  158. #endif
  159. IF(lwp) THEN
  160. WRITE(numout,*)
  161. #if defined key_cice
  162. WRITE(numout,*) ' thermal conductivity of the snow = ', rcdsn , ' J/s/m/K'
  163. #endif
  164. WRITE(numout,*) ' thermal conductivity of pure ice = ', rcdic , ' J/s/m/K'
  165. WRITE(numout,*) ' fresh ice specific heat = ', cpic , ' J/kg/K'
  166. WRITE(numout,*) ' latent heat of fusion of fresh ice / snow = ', lfus , ' J/kg'
  167. #if defined key_lim3 || defined key_cice
  168. WRITE(numout,*) ' latent heat of subl. of fresh ice / snow = ', lsub , ' J/kg'
  169. #else
  170. WRITE(numout,*) ' density times specific heat for snow = ', rcpsn , ' J/m^3/K'
  171. WRITE(numout,*) ' density times specific heat for ice = ', rcpic , ' J/m^3/K'
  172. WRITE(numout,*) ' volumetric latent heat fusion of sea ice = ', xlic , ' J/m'
  173. WRITE(numout,*) ' latent heat of sublimation of snow = ', xsn , ' J/kg'
  174. #endif
  175. WRITE(numout,*) ' volumetric latent heat fusion of snow = ', xlsn , ' J/m^3'
  176. WRITE(numout,*) ' density of sea ice = ', rhoic , ' kg/m^3'
  177. WRITE(numout,*) ' density of snow = ', rhosn , ' kg/m^3'
  178. WRITE(numout,*) ' emissivity of snow or ice = ', emic
  179. WRITE(numout,*) ' salinity of ice = ', sice , ' psu'
  180. WRITE(numout,*) ' salinity of sea = ', soce , ' psu'
  181. WRITE(numout,*) ' latent heat of evaporation (water) = ', cevap , ' J/m^3'
  182. WRITE(numout,*) ' correction factor for solar radiation = ', srgamma
  183. WRITE(numout,*) ' von Karman constant = ', vkarmn
  184. WRITE(numout,*) ' Stefan-Boltzmann constant = ', stefan , ' J/s/m^2/K^4'
  185. WRITE(numout,*)
  186. WRITE(numout,*) ' conversion: degre ==> radian rad = ', rad
  187. WRITE(numout,*)
  188. WRITE(numout,*) ' smallest real computer value rsmall = ', rsmall
  189. ENDIF
  190. END SUBROUTINE phy_cst
  191. !!======================================================================
  192. END MODULE phycst