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 trunk/NEMO/OPA_SRC – NEMO

source: trunk/NEMO/OPA_SRC/phycst.F90 @ 833

Last change on this file since 833 was 833, checked in by rblod, 16 years ago

Merge branche dev_002_LIM back to trunk ticket #70 and #71

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