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

Last change on this file since 4663 was 4659, checked in by eckhard, 4 years ago

inifor: Support for COSMO cloud water and precipitation

  • Property svn:keywords set to Id
File size: 7.6 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-2020 Leibniz Universitaet Hannover
18! Copyright 2017-2020 Deutscher Wetterdienst Offenbach
19!------------------------------------------------------------------------------!
20!
21! Current revisions:
22! -----------------
23!
24!
25! Former revisions:
26! -----------------
27! $Id: inifor_defs.f90 4659 2020-08-31 11:21:17Z gronemeier $
28! Bumped version number
29!
30!
31! 4553 2020-06-03 16:34:15Z eckhard
32! Bumped version number
33!
34!
35! 4538 2020-05-18 13:45:35Z eckhard
36! Bumped version number
37!
38!
39! 4523 2020-05-07 15:58:16Z eckhard
40! Updated copyright notice, bumped version number
41!
42!
43! 4481 2020-03-31 18:55:54Z maronga
44! Bumped version number
45!
46!
47! 4019 2019-06-06 14:00:35Z eckhard
48! Bumped version number
49!
50!
51! 3997 2019-05-23 12:35:57Z eckhard
52! Defined netCDF attribute names for PALM origin coordinates
53! Make netCDF variable names constants
54! Bumped version number
55!
56!
57! 3867 2019-04-05 16:15:55Z eckhard
58! Added parameter for INIFOR's log file name
59! Use PALM's working precision
60!
61!
62! 3801 2019-03-15 17:14:25Z eckhard
63! Defined netCDF variable names for COSMO grid
64! Bumped version number
65!
66!
67! 3779 2019-03-05 11:13:35Z eckhard
68! Updated version number to 1.4.7, updated copyright note
69!
70!
71! 3764 2019-02-26 13:42:09Z eckhard
72! Bumped version number
73!
74!
75! 3716 2019-02-05 17:02:38Z eckhard
76! Bumped version number
77!
78!
79! 3618 2018-12-10 13:25:22Z eckhard
80! Prefixed module with inifor_
81!
82!
83! 3613 2018-12-07 18:20:37Z eckhard
84! Bumped version number
85!
86!
87! 3557 2018-11-22 16:01:22Z eckhard
88! Updated documentation
89!
90!
91! 3537 2018-11-20 10:53:14Z eckhard
92! Bumped version number
93!
94!
95! 3534 2018-11-19 15:35:16Z raasch
96! NEW_LINE intrinsic replaced by ACHAR to avoid compile time error
97!
98! 3456 2018-10-30 14:29:54Z eckhard
99! Bumped version number
100!
101!
102! 3447 2018-10-29 15:52:54Z eckhard
103! Renamed source files for compatibilty with PALM build system
104!
105!
106! 3395 2018-10-22 17:32:49Z eckhard
107! New parameters for computation of geostrophic winds
108! Bumped INIFOR version number
109!
110!
111! 3183 2018-07-27 14:25:55Z suehring
112! Updated defaults for soil extrapolation steps and nudging time-scale
113! Improved handling of the start date string
114! Added gas constant for water vapor
115! Bumped INIFOR version number
116!
117!
118! 3182 2018-07-27 13:36:03Z suehring
119! Initial revision
120!
121!
122!
123! Authors:
124! --------
125!> @author Eckhard Kadasch (Deutscher Wetterdienst, Offenbach)
126!
127! Description:
128! ------------
129!> The defs module provides global constants used in INIFOR.
130!------------------------------------------------------------------------------!
131 MODULE inifor_defs
132 
133 !USE kinds,                                                                    &
134 !    ONLY :  wp, iwp
135
136 IMPLICIT NONE
137
138!
139!-- Parameters for type definitions
140 INTEGER, PARAMETER  ::  iwp = 8
141 INTEGER, PARAMETER  ::  wp = 8
142 INTEGER, PARAMETER  ::  PATH  = 140 !< length of file path strings
143 INTEGER, PARAMETER  ::  LNAME = 150 !< length of long name strings
144 INTEGER, PARAMETER  ::  SNAME = 40  !< length of short name strings
145 INTEGER, PARAMETER  ::  DATE  = 10  !< length of date strings
146
147!
148!-- Trigonomentry
149 REAL(wp), PARAMETER ::  PI = 3.14159265358979323846264338_wp !< Ratio of a circle's circumference to its diamter [-]
150 REAL(wp), PARAMETER ::  TO_RADIANS = PI / 180.0_wp           !< Conversion factor from degrees to radiant [-]
151 REAL(wp), PARAMETER ::  TO_DEGREES = 180.0_wp / PI           !< Conversion factor from radians to degrees [-]
152
153!
154!-- COSMO parameters
155 INTEGER(iwp), PARAMETER  ::  WATER_ID = 9                !< Integer corresponding to the water soil type in COSMO-DE [-]
156 REAL(wp), PARAMETER ::  EARTH_RADIUS = 6371229.0_wp !< Earth radius used in COSMO-DE [m]
157 REAL(wp), PARAMETER ::  P_SL = 1e5_wp               !< Reference pressure for computation of COSMO-DE's basic state pressure [Pa]
158 REAL(wp), PARAMETER ::  T_SL = 288.15_wp            !< Reference temperature for computation of COSMO-DE's basic state pressure [K]
159 REAL(wp), PARAMETER ::  BETA = 42.0_wp              !< logarithmic lapse rate, dT / d ln(p), for computation of COSMO-DE's basic
160                                                     !< state pressure [K]
161 REAL(wp), PARAMETER ::  RD   = 287.05_wp            !< specific gas constant of dry air, used in computation of COSMO-DE's basic
162                                                     !< state [J/kg/K]
163 REAL(wp), PARAMETER ::  RV   = 461.51_wp            !< specific gas constant of water vapor [J/kg/K]
164 REAL(wp), PARAMETER ::  G    = 9.80665_wp           !< acceleration of Earth's gravity, used in computation of COSMO-DE's basic
165                                                     !< state [m/s/s]
166 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],
167                                                     !< in [kg/m^3]
168 REAL(wp), PARAMETER ::  HECTO = 100_wp              !< unit conversion factor from hPa to Pa
169
170!
171!-- PALM-4U parameters
172 REAL(wp), PARAMETER ::  OMEGA   = 7.29e-5_wp !< angular velocity of Earth's rotation [s^-1]
173 REAL(wp), PARAMETER ::  P_REF   = 1e5_wp     !< Reference pressure for potential temperature [Pa]
174 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]
175 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]
176
177!
178!-- PALM static driver attribute names (PIDS 1.9)
179CHARACTER(SNAME), PARAMETER ::  PIDS_ORIGIN_LON = 'origin_lon'
180CHARACTER(SNAME), PARAMETER ::  PIDS_ORIGIN_LAT = 'origin_lat'
181CHARACTER(SNAME), PARAMETER ::  PIDS_ORIGIN_Z   = 'origin_z'
182
183!
184!-- COSMO netCDF parameters
185INTEGER, PARAMETER          ::  NC_DEPTH_DIM_IDX = 3
186CHARACTER(SNAME), PARAMETER ::  NC_DEPTH_NAME = 'depth_2'
187CHARACTER(SNAME), PARAMETER ::  NC_HHL_NAME = 'HHL'
188CHARACTER(SNAME), PARAMETER ::  NC_RLAT_NAME = 'rlat'
189CHARACTER(SNAME), PARAMETER ::  NC_RLON_NAME = 'rlon'
190CHARACTER(SNAME), PARAMETER ::  NC_ROTATED_POLE_NAME = 'rotated_pole'
191CHARACTER(SNAME), PARAMETER ::  NC_POLE_LATITUDE_NAME = 'grid_north_pole_latitude'
192CHARACTER(SNAME), PARAMETER ::  NC_POLE_LONGITUDE_NAME = 'grid_north_pole_longitude'
193
194!
195!-- INIFOR parameters
196 INTEGER(iwp), PARAMETER     ::  FILL_ITERATIONS = 5          !< Number of iterations for extrapolating soil data into COSMO-DE
197                                                              !< water cells [-]
198 INTEGER(iwp), PARAMETER     ::  FORCING_STEP = 1             !< Number of hours between forcing time steps [h]
199 REAL(wp), PARAMETER         ::  NUDGING_TAU = 21600.0_wp     !< Nudging relaxation time scale [s]
200 CHARACTER(LEN=*), PARAMETER ::  COPYRIGHT = 'Copyright 2017-2020 Leibniz Universitaet Hannover' // &
201    ACHAR( 10 ) // ' Copyright 2017-2020 Deutscher Wetterdienst Offenbach' !< Copyright notice
202 CHARACTER(LEN=*), PARAMETER ::  LOG_FILE_NAME = 'inifor.log' !< Name of INIFOR's log file
203 CHARACTER(LEN=*), PARAMETER ::  VERSION = '2.0.0'            !< INIFOR version number
204 
205 END MODULE inifor_defs
Note: See TracBrowser for help on using the repository browser.