[3447] | 1 | !> @file src/inifor_defs.f90 |
---|
[2696] | 2 | !------------------------------------------------------------------------------! |
---|
[2718] | 3 | ! This file is part of the PALM model system. |
---|
[2696] | 4 | ! |
---|
[2718] | 5 | ! PALM is free software: you can redistribute it and/or modify it under the |
---|
| 6 | ! terms of the GNU General Public License as published by the Free Software |
---|
| 7 | ! Foundation, either version 3 of the License, or (at your option) any later |
---|
[2696] | 8 | ! version. |
---|
| 9 | ! |
---|
[2718] | 10 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
| 11 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
| 12 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
[2696] | 13 | ! |
---|
| 14 | ! You should have received a copy of the GNU General Public License along with |
---|
| 15 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
| 16 | ! |
---|
[4481] | 17 | ! Copyright 2017-2020 Leibniz Universitaet Hannover |
---|
| 18 | ! Copyright 2017-2020 Deutscher Wetterdienst Offenbach |
---|
[2696] | 19 | !------------------------------------------------------------------------------! |
---|
| 20 | ! |
---|
| 21 | ! Current revisions: |
---|
| 22 | ! ----------------- |
---|
[4675] | 23 | ! |
---|
| 24 | ! |
---|
[3183] | 25 | ! Former revisions: |
---|
| 26 | ! ----------------- |
---|
| 27 | ! $Id: inifor_defs.f90 4714 2020-09-29 12:47:35Z suehring $ |
---|
[4675] | 28 | ! New command-line options for soil profile initialization and homogeneous |
---|
| 29 | ! boundary conditions |
---|
| 30 | ! Improved code formatting |
---|
| 31 | ! |
---|
| 32 | ! |
---|
| 33 | ! 4659 2020-08-31 11:21:17Z eckhard |
---|
[4538] | 34 | ! Bumped version number |
---|
| 35 | ! |
---|
| 36 | ! |
---|
[4568] | 37 | ! 4553 2020-06-03 16:34:15Z eckhard |
---|
| 38 | ! Bumped version number |
---|
| 39 | ! |
---|
| 40 | ! |
---|
[4553] | 41 | ! 4538 2020-05-18 13:45:35Z eckhard |
---|
| 42 | ! Bumped version number |
---|
| 43 | ! |
---|
| 44 | ! |
---|
[4538] | 45 | ! 4523 2020-05-07 15:58:16Z eckhard |
---|
[4499] | 46 | ! Updated copyright notice, bumped version number |
---|
| 47 | ! |
---|
| 48 | ! |
---|
| 49 | ! 4481 2020-03-31 18:55:54Z maronga |
---|
[4019] | 50 | ! Bumped version number |
---|
| 51 | ! |
---|
| 52 | ! |
---|
[4074] | 53 | ! 4019 2019-06-06 14:00:35Z eckhard |
---|
| 54 | ! Bumped version number |
---|
| 55 | ! |
---|
| 56 | ! |
---|
[4019] | 57 | ! 3997 2019-05-23 12:35:57Z eckhard |
---|
[3997] | 58 | ! Defined netCDF attribute names for PALM origin coordinates |
---|
| 59 | ! Make netCDF variable names constants |
---|
| 60 | ! Bumped version number |
---|
| 61 | ! |
---|
| 62 | ! |
---|
| 63 | ! 3867 2019-04-05 16:15:55Z eckhard |
---|
[3866] | 64 | ! Added parameter for INIFOR's log file name |
---|
| 65 | ! Use PALM's working precision |
---|
| 66 | ! |
---|
| 67 | ! |
---|
| 68 | ! 3801 2019-03-15 17:14:25Z eckhard |
---|
[3801] | 69 | ! Defined netCDF variable names for COSMO grid |
---|
| 70 | ! Bumped version number |
---|
| 71 | ! |
---|
| 72 | ! |
---|
| 73 | ! 3779 2019-03-05 11:13:35Z eckhard |
---|
[3779] | 74 | ! Updated version number to 1.4.7, updated copyright note |
---|
| 75 | ! |
---|
| 76 | ! |
---|
| 77 | ! 3764 2019-02-26 13:42:09Z eckhard |
---|
[3678] | 78 | ! Bumped version number |
---|
| 79 | ! |
---|
| 80 | ! |
---|
[3764] | 81 | ! 3716 2019-02-05 17:02:38Z eckhard |
---|
| 82 | ! Bumped version number |
---|
| 83 | ! |
---|
| 84 | ! |
---|
[3678] | 85 | ! 3618 2018-12-10 13:25:22Z eckhard |
---|
[3618] | 86 | ! Prefixed module with inifor_ |
---|
| 87 | ! |
---|
| 88 | ! |
---|
| 89 | ! 3613 2018-12-07 18:20:37Z eckhard |
---|
[3613] | 90 | ! Bumped version number |
---|
| 91 | ! |
---|
| 92 | ! |
---|
| 93 | ! 3557 2018-11-22 16:01:22Z eckhard |
---|
[3557] | 94 | ! Updated documentation |
---|
| 95 | ! |
---|
| 96 | ! |
---|
| 97 | ! 3537 2018-11-20 10:53:14Z eckhard |
---|
[3537] | 98 | ! Bumped version number |
---|
| 99 | ! |
---|
| 100 | ! |
---|
| 101 | ! 3534 2018-11-19 15:35:16Z raasch |
---|
[3534] | 102 | ! NEW_LINE intrinsic replaced by ACHAR to avoid compile time error |
---|
| 103 | ! |
---|
| 104 | ! 3456 2018-10-30 14:29:54Z eckhard |
---|
[3456] | 105 | ! Bumped version number |
---|
| 106 | ! |
---|
| 107 | ! |
---|
| 108 | ! 3447 2018-10-29 15:52:54Z eckhard |
---|
[3447] | 109 | ! Renamed source files for compatibilty with PALM build system |
---|
| 110 | ! |
---|
| 111 | ! |
---|
| 112 | ! 3395 2018-10-22 17:32:49Z eckhard |
---|
[3395] | 113 | ! New parameters for computation of geostrophic winds |
---|
| 114 | ! Bumped INIFOR version number |
---|
| 115 | ! |
---|
| 116 | ! |
---|
| 117 | ! 3183 2018-07-27 14:25:55Z suehring |
---|
[3182] | 118 | ! Updated defaults for soil extrapolation steps and nudging time-scale |
---|
| 119 | ! Improved handling of the start date string |
---|
| 120 | ! Added gas constant for water vapor |
---|
| 121 | ! Bumped INIFOR version number |
---|
[2696] | 122 | ! |
---|
| 123 | ! |
---|
[3183] | 124 | ! 3182 2018-07-27 13:36:03Z suehring |
---|
[2696] | 125 | ! Initial revision |
---|
| 126 | ! |
---|
| 127 | ! |
---|
| 128 | ! |
---|
| 129 | ! Authors: |
---|
| 130 | ! -------- |
---|
[3557] | 131 | !> @author Eckhard Kadasch (Deutscher Wetterdienst, Offenbach) |
---|
[2696] | 132 | ! |
---|
| 133 | ! Description: |
---|
| 134 | ! ------------ |
---|
| 135 | !> The defs module provides global constants used in INIFOR. |
---|
| 136 | !------------------------------------------------------------------------------! |
---|
[3618] | 137 | MODULE inifor_defs |
---|
[2696] | 138 | |
---|
[3867] | 139 | !USE kinds, & |
---|
| 140 | ! ONLY : wp, iwp |
---|
[3866] | 141 | |
---|
[2696] | 142 | IMPLICIT NONE |
---|
[3557] | 143 | |
---|
| 144 | ! |
---|
| 145 | !-- Parameters for type definitions |
---|
[3867] | 146 | INTEGER, PARAMETER :: iwp = 8 |
---|
| 147 | INTEGER, PARAMETER :: wp = 8 |
---|
[2696] | 148 | INTEGER, PARAMETER :: PATH = 140 !< length of file path strings |
---|
| 149 | INTEGER, PARAMETER :: LNAME = 150 !< length of long name strings |
---|
| 150 | INTEGER, PARAMETER :: SNAME = 40 !< length of short name strings |
---|
| 151 | INTEGER, PARAMETER :: DATE = 10 !< length of date strings |
---|
| 152 | |
---|
[3557] | 153 | ! |
---|
| 154 | !-- Trigonomentry |
---|
[3866] | 155 | REAL(wp), PARAMETER :: PI = 3.14159265358979323846264338_wp !< Ratio of a circle's circumference to its diamter [-] |
---|
| 156 | REAL(wp), PARAMETER :: TO_RADIANS = PI / 180.0_wp !< Conversion factor from degrees to radiant [-] |
---|
| 157 | REAL(wp), PARAMETER :: TO_DEGREES = 180.0_wp / PI !< Conversion factor from radians to degrees [-] |
---|
[2696] | 158 | |
---|
[3557] | 159 | ! |
---|
[3801] | 160 | !-- COSMO parameters |
---|
[4523] | 161 | INTEGER(iwp), PARAMETER :: WATER_ID = 9 !< Integer corresponding to the water soil type in COSMO-DE [-] |
---|
[3866] | 162 | REAL(wp), PARAMETER :: EARTH_RADIUS = 6371229.0_wp !< Earth radius used in COSMO-DE [m] |
---|
| 163 | REAL(wp), PARAMETER :: P_SL = 1e5_wp !< Reference pressure for computation of COSMO-DE's basic state pressure [Pa] |
---|
| 164 | REAL(wp), PARAMETER :: T_SL = 288.15_wp !< Reference temperature for computation of COSMO-DE's basic state pressure [K] |
---|
| 165 | REAL(wp), PARAMETER :: BETA = 42.0_wp !< logarithmic lapse rate, dT / d ln(p), for computation of COSMO-DE's basic |
---|
[3557] | 166 | !< state pressure [K] |
---|
[3866] | 167 | REAL(wp), PARAMETER :: RD = 287.05_wp !< specific gas constant of dry air, used in computation of COSMO-DE's basic |
---|
[3557] | 168 | !< state [J/kg/K] |
---|
[3866] | 169 | REAL(wp), PARAMETER :: RV = 461.51_wp !< specific gas constant of water vapor [J/kg/K] |
---|
| 170 | REAL(wp), PARAMETER :: G = 9.80665_wp !< acceleration of Earth's gravity, used in computation of COSMO-DE's basic |
---|
[3557] | 171 | !< state [m/s/s] |
---|
[3866] | 172 | REAL(wp), PARAMETER :: RHO_L = 1e3_wp !< density of liquid water, used to convert W_SO from [kg/m^2] to [m^3/m^3], |
---|
[3557] | 173 | !< in [kg/m^3] |
---|
[3866] | 174 | REAL(wp), PARAMETER :: HECTO = 100_wp !< unit conversion factor from hPa to Pa |
---|
[2696] | 175 | |
---|
[3557] | 176 | ! |
---|
| 177 | !-- PALM-4U parameters |
---|
[3866] | 178 | REAL(wp), PARAMETER :: OMEGA = 7.29e-5_wp !< angular velocity of Earth's rotation [s^-1] |
---|
| 179 | REAL(wp), PARAMETER :: P_REF = 1e5_wp !< Reference pressure for potential temperature [Pa] |
---|
| 180 | REAL(wp), PARAMETER :: RD_PALM = 287.0_wp !< specific gas constant of dry air, used in computation of PALM-4U's potential temperature [J/kg/K] |
---|
| 181 | REAL(wp), PARAMETER :: CP_PALM = 1005.0_wp !< heat capacity of dry air at constant pressure, used in computation of PALM-4U's potential temperature [J/kg/K] |
---|
[2696] | 182 | |
---|
[3997] | 183 | ! |
---|
| 184 | !-- PALM static driver attribute names (PIDS 1.9) |
---|
[4675] | 185 | CHARACTER(SNAME), PARAMETER :: PIDS_ORIGIN_LON = 'origin_lon' |
---|
| 186 | CHARACTER(SNAME), PARAMETER :: PIDS_ORIGIN_LAT = 'origin_lat' |
---|
| 187 | CHARACTER(SNAME), PARAMETER :: PIDS_ORIGIN_Z = 'origin_z' |
---|
[3997] | 188 | |
---|
[3801] | 189 | ! |
---|
[4568] | 190 | !-- COSMO netCDF parameters |
---|
[4675] | 191 | INTEGER, PARAMETER :: NC_DEPTH_DIM_IDX = 3 |
---|
| 192 | CHARACTER(SNAME), PARAMETER :: NC_DEPTH_NAME = 'depth_2' |
---|
| 193 | CHARACTER(SNAME), PARAMETER :: NC_HHL_NAME = 'HHL' |
---|
| 194 | CHARACTER(SNAME), PARAMETER :: NC_RLAT_NAME = 'rlat' |
---|
| 195 | CHARACTER(SNAME), PARAMETER :: NC_RLON_NAME = 'rlon' |
---|
| 196 | CHARACTER(SNAME), PARAMETER :: NC_ROTATED_POLE_NAME = 'rotated_pole' |
---|
| 197 | CHARACTER(SNAME), PARAMETER :: NC_POLE_LATITUDE_NAME = 'grid_north_pole_latitude' |
---|
| 198 | CHARACTER(SNAME), PARAMETER :: NC_POLE_LONGITUDE_NAME = 'grid_north_pole_longitude' |
---|
[3801] | 199 | |
---|
[3557] | 200 | ! |
---|
| 201 | !-- INIFOR parameters |
---|
[4675] | 202 | CHARACTER(LEN=*), PARAMETER :: CFG_INIT_PROFILE = 'profile' |
---|
| 203 | CHARACTER(LEN=*), PARAMETER :: CFG_INIT_VOLUME = 'volume' |
---|
| 204 | CHARACTER(LEN=*), PARAMETER :: CFG_INIT_SOIL_PROFILE = 'profile' |
---|
| 205 | CHARACTER(LEN=*), PARAMETER :: CFG_INIT_SOIL_VOLUME = 'volume' |
---|
| 206 | CHARACTER(LEN=*), PARAMETER :: CFG_FORCING_HETERO = 'hetero' |
---|
| 207 | CHARACTER(LEN=*), PARAMETER :: CFG_FORCING_HOMO = 'homo' |
---|
| 208 | CHARACTER(LEN=*), PARAMETER :: CFG_FORCING_NUDGING = 'nudging' |
---|
[4523] | 209 | INTEGER(iwp), PARAMETER :: FILL_ITERATIONS = 5 !< Number of iterations for extrapolating soil data into COSMO-DE |
---|
[3557] | 210 | !< water cells [-] |
---|
[4523] | 211 | INTEGER(iwp), PARAMETER :: FORCING_STEP = 1 !< Number of hours between forcing time steps [h] |
---|
[3866] | 212 | REAL(wp), PARAMETER :: NUDGING_TAU = 21600.0_wp !< Nudging relaxation time scale [s] |
---|
[4499] | 213 | CHARACTER(LEN=*), PARAMETER :: COPYRIGHT = 'Copyright 2017-2020 Leibniz Universitaet Hannover' // & |
---|
| 214 | ACHAR( 10 ) // ' Copyright 2017-2020 Deutscher Wetterdienst Offenbach' !< Copyright notice |
---|
[3866] | 215 | CHARACTER(LEN=*), PARAMETER :: LOG_FILE_NAME = 'inifor.log' !< Name of INIFOR's log file |
---|
[4714] | 216 | CHARACTER(LEN=*), PARAMETER :: VERSION = '2.1.1' !< INIFOR version number |
---|
[3866] | 217 | |
---|
[3618] | 218 | END MODULE inifor_defs |
---|