Changes between Initial Version and Version 1 of doc/app/iofiles/wrf_interface


Ignore:
Timestamp:
Nov 2, 2020 3:25:12 PM (4 years ago)
Author:
resler
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • doc/app/iofiles/wrf_interface

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