source: palm/trunk/UTIL/inifor/src/inifor_defs.f90 @ 4901

Last change on this file since 4901 was 4843, checked in by raasch, 4 years ago

local namelist parameter added to switch off the module although the respective module namelist appears in the namelist file, further copyright updates

  • Property svn:keywords set to Id
File size: 8.2 KB
Line 
1!> @file src/inifor_defs.f90
2!------------------------------------------------------------------------------!
3! This file is part of the PALM model system.
4!
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
8! version.
9!
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.
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!
17! Copyright 2017-2021 Leibniz Universitaet Hannover
18! Copyright 2017-2021 Deutscher Wetterdienst Offenbach
19!------------------------------------------------------------------------------!
20!
21! Current revisions:
22! -----------------
23!
24!
25! Former revisions:
26! -----------------
27! $Id: inifor_defs.f90 4843 2021-01-15 15:22:11Z banzhafs $
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
34! Bumped version number
35!
36!
37! 4553 2020-06-03 16:34:15Z eckhard
38! Bumped version number
39!
40!
41! 4538 2020-05-18 13:45:35Z eckhard
42! Bumped version number
43!
44!
45! 4523 2020-05-07 15:58:16Z eckhard
46! Updated copyright notice, bumped version number
47!
48!
49! 4481 2020-03-31 18:55:54Z maronga
50! Bumped version number
51!
52!
53! 4019 2019-06-06 14:00:35Z eckhard
54! Bumped version number
55!
56!
57! 3997 2019-05-23 12:35:57Z eckhard
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
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
69! Defined netCDF variable names for COSMO grid
70! Bumped version number
71!
72!
73! 3779 2019-03-05 11:13:35Z eckhard
74! Updated version number to 1.4.7, updated copyright note
75!
76!
77! 3764 2019-02-26 13:42:09Z eckhard
78! Bumped version number
79!
80!
81! 3716 2019-02-05 17:02:38Z eckhard
82! Bumped version number
83!
84!
85! 3618 2018-12-10 13:25:22Z eckhard
86! Prefixed module with inifor_
87!
88!
89! 3613 2018-12-07 18:20:37Z eckhard
90! Bumped version number
91!
92!
93! 3557 2018-11-22 16:01:22Z eckhard
94! Updated documentation
95!
96!
97! 3537 2018-11-20 10:53:14Z eckhard
98! Bumped version number
99!
100!
101! 3534 2018-11-19 15:35:16Z raasch
102! NEW_LINE intrinsic replaced by ACHAR to avoid compile time error
103!
104! 3456 2018-10-30 14:29:54Z eckhard
105! Bumped version number
106!
107!
108! 3447 2018-10-29 15:52:54Z eckhard
109! Renamed source files for compatibilty with PALM build system
110!
111!
112! 3395 2018-10-22 17:32:49Z eckhard
113! New parameters for computation of geostrophic winds
114! Bumped INIFOR version number
115!
116!
117! 3183 2018-07-27 14:25:55Z suehring
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
122!
123!
124! 3182 2018-07-27 13:36:03Z suehring
125! Initial revision
126!
127!
128!
129! Authors:
130! --------
131!> @author Eckhard Kadasch (Deutscher Wetterdienst, Offenbach)
132!
133! Description:
134! ------------
135!> The defs module provides global constants used in INIFOR.
136!------------------------------------------------------------------------------!
137 MODULE inifor_defs
138 
139 !USE kinds,                                                                    &
140 !    ONLY :  wp, iwp
141
142 IMPLICIT NONE
143
144!
145!-- Parameters for type definitions
146 INTEGER, PARAMETER  ::  iwp = 8
147 INTEGER, PARAMETER  ::  wp = 8
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
153!
154!-- Trigonomentry
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 [-]
158
159!
160!-- COSMO parameters
161 INTEGER(iwp), PARAMETER  ::  WATER_ID = 9                !< Integer corresponding to the water soil type in COSMO-DE [-]
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
166                                                     !< state pressure [K]
167 REAL(wp), PARAMETER ::  RD   = 287.05_wp            !< specific gas constant of dry air, used in computation of COSMO-DE's basic
168                                                     !< state [J/kg/K]
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
171                                                     !< state [m/s/s]
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],
173                                                     !< in [kg/m^3]
174 REAL(wp), PARAMETER ::  HECTO = 100_wp              !< unit conversion factor from hPa to Pa
175
176!
177!-- PALM-4U parameters
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]
182
183!
184!-- PALM static driver attribute names (PIDS 1.9)
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'
188
189!
190!-- COSMO netCDF parameters
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'
199
200!
201!-- INIFOR parameters
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'
209 INTEGER(iwp), PARAMETER     ::  FILL_ITERATIONS = 5          !< Number of iterations for extrapolating soil data into COSMO-DE
210                                                              !< water cells [-]
211 INTEGER(iwp), PARAMETER     ::  FORCING_STEP = 1             !< Number of hours between forcing time steps [h]
212 REAL(wp), PARAMETER         ::  NUDGING_TAU = 21600.0_wp     !< Nudging relaxation time scale [s]
213 CHARACTER(LEN=*), PARAMETER ::  COPYRIGHT = 'Copyright 2017-2020 Leibniz Universitaet Hannover' // &
214    ACHAR( 10 ) // ' Copyright 2017-2020 Deutscher Wetterdienst Offenbach' !< Copyright notice
215 CHARACTER(LEN=*), PARAMETER ::  LOG_FILE_NAME = 'inifor.log' !< Name of INIFOR's log file
216 CHARACTER(LEN=*), PARAMETER ::  VERSION = '2.1.4'            !< INIFOR version number
217 
218 END MODULE inifor_defs
Note: See TracBrowser for help on using the repository browser.