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/OFF_SRC – NEMO

source: trunk/NEMO/OFF_SRC/phycst.F90 @ 973

Last change on this file since 973 was 956, checked in by cetlod, 16 years ago

phasing the OFFLINE module to the new version of NEMO, see ticket 146

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 10.4 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   REAL(wp), PUBLIC ::                        &  !:
18      rpi = 3.141592653589793_wp           ,  &  !: pi
19      rad = 3.141592653589793_wp / 180._wp ,  &  !: conversion from degre into radian
20      rsmall = 0.5 * EPSILON( 1. )               !: smallest real computer value
21   
22   REAL(wp), PUBLIC ::          & !:
23      rday = 24.*60.*60.  ,     & !: day (s)
24      rsiyea              ,     & !: sideral year (s)
25      rsiday              ,     & !: sideral day (s)
26      raajj = 365._wp     ,     & !: number of days in one year
27      raamo =  12._wp     ,     & !: number of months in one year
28      rjjhh =  24._wp     ,     & !: number of hours in one day
29      rhhmm =  60._wp     ,     & !: number of minutes in one hour
30      rmmss =  60._wp     ,     & !: number of seconds in one minute
31      raass               ,     & !: number of seconds in one year
32      rmoss               ,     & !: number of seconds in one month
33      rjjss               ,     & !: number of seconds in one day
34!!!   omega = 7.292115083046061e-5_wp ,  &  !: change the last digit!
35      omega               ,    &  !: earth rotation parameter
36      ra    = 6371229._wp ,    &  !: earth radius (meter)
37      grav  = 9.80665_wp          !: gravity (m/s2)
38   
39   REAL(wp), PUBLIC ::         &  !:
40      rtt      = 273.16_wp  ,  &  !: triple point of temperature (Kelvin)
41      rt0      = 273.15_wp  ,  &  !: freezing point of water (Kelvin)
42      rt0_snow = 273.15_wp  ,  &  !: melting point of snow  (Kelvin)
43      rt0_ice  = 273.05_wp  ,  &  !: melting point of ice   (Kelvin)
44      rau0     = 1020._wp   ,  &  !: volumic mass of reference (kg/m3)
45      rauw     = 1000._wp   ,  &  !: density of pure water (kg/m3)
46      rcp      =    4.e+3_wp,  &  !: ocean specific heat
47      ro0cpr                      !: = 1. / ( rau0 * rcp )
48
49   REAL(wp), PUBLIC ::            &  !:
50      rcdsn   =   0.22_wp     ,   &  !: conductivity of the snow
51      rcdic   =   2.034396_wp ,   &  !: conductivity of the ice
52      rcpsn   =   6.9069e+5_wp,   &  !: density times specific heat for snow
53      rcpic   =   1.8837e+6_wp,   &  !: volumetric latent heat fusion of sea ice
54      xlsn    = 110.121e+6_wp ,   &  !: volumetric latent heat fusion of snow
55      xlic    = 300.33e+6_wp  ,   &  !: volumetric latent heat fusion of ice
56      xsn     =   2.8e+6      ,   &  !: latent heat of sublimation of snow
57      rhoic   = 900._wp       ,   &  !: density of sea ice (kg/m3)
58      rhosn   = 330._wp       ,   &  !: density of snow (kg/m3)
59      emic    =   0.97_wp     ,   &  !: emissivity of snow or ice
60      sice    =   6.0_wp      ,   &  !: salinity of ice (psu)
61      soce    =  34.7_wp      ,   &  !: salinity of sea (psu)
62      cevap   =   2.5e+6_wp   ,   &  !: latent heat of evaporation (water)
63      srgamma =   0.9_wp      ,   &  !: correction factor for solar radiation (Oberhuber, 1974)
64      vkarmn  =   0.4_wp      ,   &  !: von Karman constant
65      stefan  =   5.67e-8_wp         !: Stefan-Boltzmann constant
66      !!----------------------------------------------------------------------
67      !!  OPA 9.0 , LOCEAN-IPSL (2005)
68      !! $Header$
69      !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
70      !!----------------------------------------------------------------------
71   
72CONTAINS
73   
74   SUBROUTINE phy_cst
75      !!----------------------------------------------------------------------
76      !!                       ***  ROUTINE phy_cst  ***
77      !!
78      !! ** Purpose :   Print model parameters and set and print the constants
79      !!
80      !! ** Method  :   no
81      !!
82      !! History :
83      !!        !  90-10  (C. Levy - G. Madec)  Original code
84      !!        !  91-11  (G. Madec)
85      !!        !  91-12  (M. Imbard)
86      !!   8.5  !  02-08  (G. Madec, C. Ethe)  F90, add ice constants
87      !!----------------------------------------------------------------------
88      !! * Local variables
89      CHARACTER (len=64) ::   cform = "(A9, 3(A13, I7) )" 
90      !!----------------------------------------------------------------------
91
92      IF(lwp) WRITE(numout,*)
93      IF(lwp) WRITE(numout,*) ' phy_cst : initialization of ocean parameters and constants'
94      IF(lwp) WRITE(numout,*) ' ~~~~~~~'
95
96      ! Ocean Parameters
97      ! ----------------
98      IF(lwp) THEN
99         WRITE(numout,*) '       parameter file'
100         WRITE(numout,*)
101         WRITE(numout,*) '          dimension of model'
102         WRITE(numout,*) '              Local domain      Global domain       Data domain '
103         WRITE(numout,cform) '         ','   jpi     : ', jpi, '   jpiglo  : ', jpiglo, '   jpidta  : ', jpidta
104         WRITE(numout,cform) '         ','   jpj     : ', jpj, '   jpjglo  : ', jpjglo, '   jpjdta  : ', jpjdta
105         WRITE(numout,cform) '         ','   jpk     : ', jpk, '   jpk     : ', jpk   , '   jpkdta  : ', jpkdta
106         WRITE(numout,*)      '        ','   jpij    : ', jpij
107         WRITE(numout,*)
108         WRITE(numout,*) '          mpp local domain info (mpp)'
109         WRITE(numout,*) '             jpni    : ', jpni, '   jpreci  : ', jpreci
110         WRITE(numout,*) '             jpnj    : ', jpnj, '   jprecj  : ', jprecj
111         WRITE(numout,*) '             jpnij   : ', jpnij
112
113         WRITE(numout,*)
114         WRITE(numout,*) '          lateral domain boundary condition type : jperio  = ', jperio
115         WRITE(numout,*) '          domain island (use in rigid-lid case)  : jpisl   = ', jpisl 
116         WRITE(numout,*) '                                                   jpnisl  = ', jpnisl
117      ENDIF
118
119      ! Define constants
120      ! ----------------
121      IF(lwp) WRITE(numout,*)
122      IF(lwp) WRITE(numout,*) '       constants'
123
124      IF(lwp) WRITE(numout,*)
125      IF(lwp) WRITE(numout,*) '          mathematical constant                 rpi = ', rpi
126
127      rsiyea = 365.25 * rday * 2. * rpi / 6.283076
128      rsiday = rday / ( 1. + rday / rsiyea )
129      omega  = 2. * rpi / rsiday 
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
136      rjjss = rjjhh * rhhmm * rmmss
137      IF(lwp) WRITE(numout,*)
138      IF(lwp) WRITE(numout,*) '          nb of months per year               raamo = ', raamo, ' months'
139      IF(lwp) WRITE(numout,*) '          nb of hours per day                 rjjhh = ', rjjhh, ' hours'
140      IF(lwp) WRITE(numout,*) '          nb of minutes per hour              rhhmm = ', rhhmm, ' mn'
141      IF(lwp) WRITE(numout,*) '          nb of seconds per minute            rmmss = ', rmmss, ' s'
142      IF(lwp) WRITE(numout,*) '          nb of seconds per day               rjjss = ', rjjss, ' 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(lwp) THEN
162         WRITE(numout,*)
163         WRITE(numout,*) '          thermal conductivity of the snow          = ', rcdsn   , ' J/s/m/K'
164         WRITE(numout,*) '          thermal conductivity of the ice           = ', rcdic   , ' J/s/m/K'
165         WRITE(numout,*) '          density times specific heat for snow      = ', rcpsn   , ' J/m^3/K' 
166         WRITE(numout,*) '          density times specific heat for ice       = ', rcpic   , ' J/m^3/K'
167         WRITE(numout,*) '          volumetric latent heat fusion of sea ice  = ', xlic    , ' J/m' 
168         WRITE(numout,*) '          volumetric latent heat fusion of snow     = ', xlsn    , ' J/m' 
169         WRITE(numout,*) '          latent heat of sublimation of snow        = ', xsn     , ' J/kg' 
170         WRITE(numout,*) '          density of sea ice                        = ', rhoic   , ' kg/m^3'
171         WRITE(numout,*) '          density of snow                           = ', rhosn   , ' kg/m^3'
172         WRITE(numout,*) '          emissivity of snow or ice                 = ', emic 
173         WRITE(numout,*) '          salinity of ice                           = ', sice    , ' psu'
174         WRITE(numout,*) '          salinity of sea                           = ', soce    , ' psu'
175         WRITE(numout,*) '          latent heat of evaporation (water)        = ', cevap   , ' J/m^3' 
176         WRITE(numout,*) '          correction factor for solar radiation     = ', srgamma 
177         WRITE(numout,*) '          von Karman constant                       = ', vkarmn 
178         WRITE(numout,*) '          Stefan-Boltzmann constant                 = ', stefan  , ' J/s/m^2/K^4'
179
180         WRITE(numout,*)
181         WRITE(numout,*) '          conversion: degre ==> radian          rad = ', rad
182
183         WRITE(numout,*)
184         WRITE(numout,*) '          smallest real computer value       rsmall = ', rsmall
185      ENDIF
186
187   END SUBROUTINE phy_cst
188
189   !!======================================================================
190END MODULE phycst
Note: See TracBrowser for help on using the repository browser.