[4661] | 1 | !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier |
---|
| 2 | !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence |
---|
| 3 | !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt |
---|
| 4 | !SFX_LIC for details. version 1. |
---|
| 5 | ! ######### |
---|
| 6 | SUBROUTINE INI_CSTS |
---|
| 7 | ! ################## |
---|
| 8 | ! |
---|
| 9 | !!**** *INI_CSTS * - routine to initialize the module MODD_CST |
---|
| 10 | !! |
---|
| 11 | !! PURPOSE |
---|
| 12 | !! ------- |
---|
| 13 | ! The purpose of this routine is to initialize the physical constants |
---|
| 14 | ! stored in module MODD_CST. |
---|
| 15 | ! |
---|
| 16 | ! |
---|
| 17 | !!** METHOD |
---|
| 18 | !! ------ |
---|
| 19 | !! The physical constants are set to their numerical values |
---|
| 20 | !! |
---|
| 21 | !! |
---|
| 22 | !! EXTERNAL |
---|
| 23 | !! -------- |
---|
| 24 | !! FMLOOK : to retrieve logical unit number associated to a file |
---|
| 25 | !! |
---|
| 26 | !! IMPLICIT ARGUMENTS |
---|
| 27 | !! ------------------ |
---|
| 28 | !! Module MODD_CST : contains physical constants |
---|
| 29 | !! |
---|
| 30 | !! REFERENCE |
---|
| 31 | !! --------- |
---|
| 32 | !! Book2 of the documentation (module MODD_CST, routine INI_CSTS) |
---|
| 33 | !! |
---|
| 34 | !! |
---|
| 35 | !! AUTHOR |
---|
| 36 | !! ------ |
---|
| 37 | !! V. Ducrocq * Meteo France * |
---|
| 38 | !! |
---|
| 39 | !! MODIFICATIONS |
---|
| 40 | !! ------------- |
---|
| 41 | !! Original 18/05/94 |
---|
| 42 | !! J. Stein 02/01/95 add the volumic mass of liquid water |
---|
| 43 | !! J.-P. Pinty 13/12/95 add the water vapor pressure over solid ice |
---|
| 44 | !! J. Stein 29/06/97 add XTH00 |
---|
| 45 | !! V. Masson 05/10/98 add XRHOLI |
---|
| 46 | !! C. Mari 31/10/00 add NDAYSEC |
---|
| 47 | !! V. Masson 01/03/03 add XCONDI |
---|
| 48 | !! A. Voldoire 01/12/09 add XTTSI, XICEC, XTTS for ESM |
---|
| 49 | !! J. Escobar 28/03/2014 for pb with emissivity/aerosol reset XSURF_TINY=1.0e-80 in real8 case |
---|
| 50 | !! |
---|
| 51 | !------------------------------------------------------------------------------- |
---|
| 52 | ! |
---|
| 53 | !* 0. DECLARATIONS |
---|
| 54 | ! ------------ |
---|
| 55 | ! |
---|
| 56 | USE MODD_CSTS |
---|
| 57 | ! |
---|
| 58 | ! |
---|
| 59 | !USE YOMHOOK ,ONLY : LHOOK, DR_HOOK |
---|
| 60 | !USE PARKIND1 ,ONLY : JPRB |
---|
| 61 | ! |
---|
| 62 | !USE MODI_INI_CTURBS |
---|
| 63 | ! |
---|
| 64 | !USE MODI_INI_OCEAN_CSTS |
---|
| 65 | ! |
---|
| 66 | !USE MODI_INI_SURF_CSTS |
---|
| 67 | ! |
---|
| 68 | IMPLICIT NONE |
---|
| 69 | ! |
---|
| 70 | !------------------------------------------------------------------------------- |
---|
| 71 | ! |
---|
| 72 | !* 1. FUNDAMENTAL CONSTANTS |
---|
| 73 | ! --------------------- |
---|
| 74 | ! |
---|
| 75 | |
---|
| 76 | !REAL(KIND=JPRB) :: ZHOOK_HANDLE |
---|
| 77 | |
---|
| 78 | !IF (LHOOK) CALL DR_HOOK('INI_CSTS',0,ZHOOK_HANDLE) |
---|
| 79 | |
---|
| 80 | !#ifdef SFX_MNH |
---|
| 81 | !#ifdef MNH_MPI_DOUBLE_PRECISION |
---|
| 82 | XSURF_TINY = 1.0e-80 |
---|
| 83 | !#else |
---|
| 84 | !XSURF_TINY = TINY (XSURF_TINY ) |
---|
| 85 | !#endif |
---|
| 86 | !#else |
---|
| 87 | XSURF_TINY = 1.0e-80 |
---|
| 88 | !#endif |
---|
| 89 | XSURF_TINY_12 = SQRT (XSURF_TINY ) |
---|
| 90 | XSURF_EPSILON = EPSILON (XSURF_EPSILON ) * 10.0 |
---|
| 91 | |
---|
| 92 | XPI = 2.*ASIN(1.) |
---|
| 93 | XKARMAN = 0.4 |
---|
| 94 | XBOLTZ = 1.380658E-23 |
---|
| 95 | XLIGHTSPEED = 299792458. |
---|
| 96 | XPLANCK = 6.6260755E-34 |
---|
| 97 | XAVOGADRO = 6.0221367E+23 |
---|
| 98 | ! |
---|
| 99 | !------------------------------------------------------------------------------- |
---|
| 100 | ! |
---|
| 101 | !* 2. ASTRONOMICAL CONSTANTS |
---|
| 102 | ! ---------------------- |
---|
| 103 | ! |
---|
| 104 | XDAY = 86400. |
---|
| 105 | XSIYEA = 365.25*XDAY*2.*XPI/ 6.283076 |
---|
| 106 | XSIDAY = XDAY/(1.+XDAY/XSIYEA) |
---|
| 107 | XOMEGA = 2.*XPI/XSIDAY |
---|
| 108 | NDAYSEC = 24*3600 ! Number of seconds in a day |
---|
| 109 | ! |
---|
| 110 | !-------------------------------------------------------------------------------! |
---|
| 111 | ! |
---|
| 112 | ! |
---|
| 113 | !* 3. TERRESTRIAL GEOIDE CONSTANTS |
---|
| 114 | ! ---------------------------- |
---|
| 115 | ! |
---|
| 116 | XRADIUS = 6371229. |
---|
| 117 | XG = 9.80665 |
---|
| 118 | ! |
---|
| 119 | !------------------------------------------------------------------------------- |
---|
| 120 | ! |
---|
| 121 | !* 4. REFERENCE PRESSURE |
---|
| 122 | ! ------------------- |
---|
| 123 | ! |
---|
| 124 | XP00 = 1.E5 |
---|
| 125 | XTH00 = 300. |
---|
| 126 | !------------------------------------------------------------------------------- |
---|
| 127 | ! |
---|
| 128 | !* 5. RADIATION CONSTANTS |
---|
| 129 | ! ------------------- |
---|
| 130 | ! |
---|
| 131 | !JUAN OVERFLOW XSTEFAN = 2.* XPI**5 * XBOLTZ**4 / (15.* XLIGHTSPEED**2 * XPLANCK**3) |
---|
| 132 | XSTEFAN = ( 2.* XPI**5 / 15. ) * ( (XBOLTZ / XPLANCK)* XBOLTZ ) * (XBOLTZ/(XLIGHTSPEED*XPLANCK))**2 |
---|
| 133 | XI0 = 1370. |
---|
| 134 | ! |
---|
| 135 | !------------------------------------------------------------------------------- |
---|
| 136 | ! |
---|
| 137 | !* 6. THERMODYNAMIC CONSTANTS |
---|
| 138 | ! ----------------------- |
---|
| 139 | ! |
---|
| 140 | XMD = 28.9644E-3 |
---|
| 141 | XMV = 18.0153E-3 |
---|
| 142 | XRD = XAVOGADRO * XBOLTZ / XMD |
---|
| 143 | XRV = XAVOGADRO * XBOLTZ / XMV |
---|
| 144 | XCPD = 7.* XRD /2. |
---|
| 145 | XCPV = 4.* XRV |
---|
| 146 | XRHOLW = 1000. |
---|
| 147 | XRHOLI = 917. |
---|
| 148 | XCONDI = 2.22 |
---|
| 149 | XCL = 4.218E+3 |
---|
| 150 | XCI = 2.106E+3 |
---|
| 151 | XTT = 273.16 |
---|
| 152 | XTTSI = XTT - 1.8 |
---|
| 153 | XICEC = 0.5 |
---|
| 154 | XTTS = XTT*(1-XICEC) + XTTSI*XICEC |
---|
| 155 | XLVTT = 2.5008E+6 |
---|
| 156 | XLSTT = 2.8345E+6 |
---|
| 157 | XLMTT = XLSTT - XLVTT |
---|
| 158 | XESTT = 611.14 |
---|
| 159 | XGAMW = (XCL - XCPV) / XRV |
---|
| 160 | XBETAW = (XLVTT/XRV) + (XGAMW * XTT) |
---|
| 161 | XALPW = LOG(XESTT) + (XBETAW /XTT) + (XGAMW *LOG(XTT)) |
---|
| 162 | XGAMI = (XCI - XCPV) / XRV |
---|
| 163 | XBETAI = (XLSTT/XRV) + (XGAMI * XTT) |
---|
| 164 | XALPI = LOG(XESTT) + (XBETAI /XTT) + (XGAMI *LOG(XTT)) |
---|
| 165 | ! |
---|
| 166 | !------------------------------------------------------------------------------- |
---|
| 167 | ! |
---|
| 168 | !* 7. TURBULENCE CONSTANTS |
---|
| 169 | ! -------------------- |
---|
| 170 | ! |
---|
| 171 | ! CALL INI_CTURBS |
---|
| 172 | !------------------------------------------------------------------------------- |
---|
| 173 | ! |
---|
| 174 | !* 8. OCEAN CONSTANTS |
---|
| 175 | ! --------------- |
---|
| 176 | ! |
---|
| 177 | ! CALL INI_OCEAN_CSTS |
---|
| 178 | ! |
---|
| 179 | !* 9. SURFACE CONSTANTS |
---|
| 180 | ! ----------------- |
---|
| 181 | ! |
---|
| 182 | ! CALL INI_SURF_CSTS |
---|
| 183 | !IF (LHOOK) CALL DR_HOOK('INI_CSTS',1,ZHOOK_HANDLE) |
---|
| 184 | ! |
---|
| 185 | !------------------------------------------------------------------------------- |
---|
| 186 | ! |
---|
| 187 | END SUBROUTINE INI_CSTS |
---|