source: palm/trunk/UTIL/WRF_interface/README.txt @ 4861

Last change on this file since 4861 was 4766, checked in by resler, 4 years ago

Add scripts for generating dynamic driver from WRF and CAMx outputs

File size: 6.4 KB
Line 
1Scripts for processing of WRF and CAMx files to PALM dynamic driver.
2Version: v.3.1, 20201102
3
4Usage: palm_dynamic -c <config_name> [-w]
5
6The script requires name of the case configuration on the command line.
7The corresponding configuration files are placed in subdirectory
8"configuration" and they are named <config_name>.conf. Examples of
9the config files are supplied with the scripts, all configuration
10options with are in the file palm_dynamic_defaults.py as well as
11at the end of this readme file. The values which agree with defaults
12need not be present in the user config. The file palm_dynamic_init.py
13contains setting and calculation of standard initialization values
14for particular system and can be adjusted. The optional parameter -w
15allows to skip horizontal and vertical interpolation in case it is
16already done.
17
18The scripts were implemented with regards to good portability and they
19only depend on standard and well-known Python libraries.
20Needed modules are:
21
22- numpy   (https://pypi.org/project/numpy)
23- scipy   (https://pypi.org/project/scipy)
24- pyproj  (https://pypi.org/project/pyproj)
25- netCDF4 (https://pypi.org/project/netCDF4)
26- metpy   (https://unidata.github.io/MetPy)
27
28First four modules are included in all major linux distributions. In other cases,
29they can be installed via pip (e.g. "pip3 install netCDF4").
30
31The MetPy module is a well-known and widely used project for meteorological
32calculations in Python maintained by Unidata. It can also be installed using
33pip ("pip3 install MetPy").
34
35In the current version, the only supported projection in WRF is Lambert
36conformal conic, which is WRF default and recommended projection for
37mid-latitudes. The CAMx output files, which are used optionally for the
38chemical initial and boundary conditions, are expected to be the result of
39a coupled CAMx simulation using the same horizontal grid as WRF, although this
40is not strictly required.
41
42The scripts support both variants of WRF vertical levels - the sigma levels
43(default until WRF version 3.*) and the hybrid levels (default since WRF 4.*).
44However, it is necessary to correctly configure this option via the setting
45"wrf_hybrid_levs = True/False".
46
47CONFIGURATION
48
49Configuration files have syntax:
50<parameter1> = <value1>
51<parameter2> = <value2>
52...
53Parameters can be string, integer, float, logical or list of these values.
54The <value> terms have Python syntax, the config file needs to contain only
55parameters which differ from default.
56
57Description of the particular configuration options are (defaults are in parenthesis):
58
59# 1. Domain and case related config
60domain              name of the simulation case ("")
61resolution          name of the particular domain resolution scenario ("")
62scenario            name of the individual scenario in the case ("")
63nested_domain       False indicates parent and True nested domain. (False)
64dynamic_driver_file file name of output dynamic driver (""). The default value
65                    "" means the standard name assigned in the palm_dynamic_init.
66grid_from_static    value True - the grid parameters are imported from the static
67                    driver, False - they are prescribed in the config (True)
68static_driver_file  file name of the static driver in case of grid_from_static ("").
69                    The default value "" means the standard name assigned in init.
70proj_palm           reference coordinate system of PALM simulation ("EPSG:32633")
71proj_wgs84          reference coordinate system of lon-lat projection ("EPSG:4326")
72dz                  height of the PALM vertical grid layer (0.0). The default
73                    value dz = 0.0 means dz is assigned from dx.
74nz                  number of vertical layers of PALM domain (200)
75dz_stretch_level    height in meters from which stretching of vertical levels
76                    starts in PALM (5000.0)
77dz_stretch_factor   coefficient of the stretching of the vertical layers in PALM (1.0)
78dz_max              max height of the stretched vertical layers (100.0)
79origin_time         origin time of the PALM simulation in the format
80                    YYYY-MM-DD hh:mm:ss (""). The default value "" means that
81                    the value is read from the global attribute of the static driver.
82simulation_hours    extent of the simulation in hours (24)
83
84# 2. WRF and CAMx related configurations
85wrf_hybrid_levs     True means hybrid levels in WRF files, False means sigma levels (True).
86vinterp_terrain_smoothing
87                    the standard deviation for Gaussian kernel of smoothing method
88                    of the PALM terrain for WRF vertical interpolation to avoid sharp
89                    horizontal gradients. Value None disables the smoothing. (None)
90wrf_dir_name        files path of the wrf and camx input files (""). The default value ""
91                    means that the standard path will be calculated in the init.
92wrf_file_mask       file mask of the wrf input files  ("wrfout_*.e000")
93radiation_from_wrf  enable or disable processing of radiation from WRF files (True).
94wrf_rad_file_mask   file mask of the wrf radiation input files ("auxhist6_*").
95                    The default setting reads radiation from WRF auxiliary
96                    history files. This setting allows to use finer time step for WRF
97                    radiation outputs than for other values.
98radiation_smoothing_distance
99                    smoothing distance for radiation values in m (10000.0).
100camx_file_mask      file mask of the CAMx input files ("CAMx.*.nc").
101species_names       PALM names of the chemical species (['NO','NO2','O3','PM10','PM25']).
102                    The default value can be used for phstatp and phstatp2 chemical
103                    mechanisms in PALM. The mapping and recalculation from the CAMx
104                    species to PALM species is defined in the variable camx_conversions
105                    (see palm_dynamic_init.py). The current mapping is adjusted for
106                    CAMx v6.50 with CB05 + PM (CF,SOAP2.1,ISORROPIA) chemistry mechanisms.
107                    In the case other combinations, it may be necessary to adjust
108                    this mapping.
109
110# 3. horizontal parameters of the PALM domain which have to be set in case
111#    of grid_from_static = False
112nx, ny              number of horizontal grids of the domain in x and y directions
113dx, dy              grid cell size of the domain in x and y directions
114origin_x, origin_y  origin x and y of the domain
115origin_z            origin of the domain in the vertical direction
116
Note: See TracBrowser for help on using the repository browser.