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

source: trunk/NEMOGCM/NEMO/OPA_SRC/DOM/phycst.F90 @ 7753

Last change on this file since 7753 was 7646, checked in by timgraham, 7 years ago

Merge of dev_merge_2016 into trunk. UPDATE TO ARCHFILES NEEDED for XIOS2.
LIM_SRC_s/limrhg.F90 to follow in next commit due to change of kind (I'm unable to do it in this commit).
Merged using the following steps:

1) svn merge --reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk .
2) Resolve minor conflicts in sette.sh and namelist_cfg for ORCA2LIM3 (due to a change in trunk after branch was created)
3) svn commit
4) svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
5) svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2016/dev_merge_2016 .
6) At this stage I checked out a clean copy of the branch to compare against what is about to be committed to the trunk.
6) svn commit #Commit code to the trunk

In this commit I have also reverted a change to Fcheck_archfile.sh which was causing problems on the Paris machine.

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