New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
phycst.F90 in branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DOM – NEMO

source: branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/DOM/phycst.F90 @ 1970

Last change on this file since 1970 was 1970, checked in by acc, 14 years ago

ticket #684 step 5: Add in changes from the trunk between revisions 1821 and 1879.

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