Interpolates global chemistry fields for use with WRF-CHEM
Project description
Interpolator for WRF-CHEM
Interpolator for WRF-CHEM is a preprocessing application for using global chemistry model fields with WRF-CHEM. It interpolates the global chemistry model fields to the WRF-CHEM grid and vertical levels. Think of it like WPS but for chemistry fields.
Some features:
- Interpolates 3D fields
- Can do species/size bin mapping through linear combinations of source fields
- Potentially support many global models (currently supports CAMS EAC4)
The application is written in Python and is meant to be used a command-line tool. Some potential limitations:
- The application currently assumes that fields are mixing ratios.
- The global model fields should be on a regular lat-lon grid.
- No nesting support
Installation
The application is available on PyPI and can be installed using pip:
pip install interpolator-for-wrfchem
Usage
The workflow for using the interpolator is as follows:
- Use WPS and
real.exe
as usual to generate themet_em
,wrfinput
, andwrfbdy
files. - Download global chemistry model fields (e.g. CAMS EAC4) for the same time period as the WRF simulation.
- Run the interpolator to interpolate the global chemistry model fields to the WRF-CHEM grid and vertical levels.
- Run WRF-CHEM.
The interpolator will update wrfinput
and wrfbdy
files to include the chemistry information.
The interpolator is a command-line tool and can be run as follows:
interpolator-for-wrfchem <global model name> <global model data path> <met_em path> <wrfinput path> <species map path>
The wrfinput
and wrfbdy
files WILL BE MODIFIED! The global model name
can be one of the following:
cams_eac4
: CAMS EAC4 data (w/ 60 vertical levels)cams_global_forecasts
: CAMS global forecasts (w/ 137 vertical levels)
There are some optional flags:
--wrfbdy=
: Path to thewrfbdy_d01
file, if not provided, the boundary is not updated.--copy-icbc
: Make a backup of thewrfinput
andwrfbdy
files before updating them.--no-ic
: Do not update thewrfinput
. You must nonetheless provide the path to thewrfinput
file as it is required to read some information.--diagnostics
: Store some diagnostic information in thediag_cams_interp.nc
file.
When you use nested domains, you can run the application multiple times, each time pointing to a different wrfinput
file. You can omit the wrfbdy
file when running the application for the nested domains' wrfinput
files.
If you need to update wrfbdy
files for the future without touching wrfinput
(e.g. for a cycling run), point to a correct wrfinput
file (correct means it's the same model grid and configuration) and use the --no-ic
flag.
Species mapping
In many cases, the available fields of the global model do not directly correspond to the ones used by the chemistry/dust scheme you want to use in WRF-CHEM. For example, you might have dust concentrations available in different size bins. The application supports "species mapping", through which the WRF-CHEM fields are created through a linear combination of global model fields, after interpolation.
Detailed description of the species file format is available in species_maps.md.
License
The interpolator is licensed under the MIT License. See LICENSE for more information. Please cite the project if you use it for your research!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file interpolator_for_wrfchem-1.2.1.tar.gz
.
File metadata
- Download URL: interpolator_for_wrfchem-1.2.1.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 450188105e09e24af5a61ca2db61400e82000252d2394c537beb55d1396c67ab |
|
MD5 | 3a162d2258a90583a39c0767e3b9f5ee |
|
BLAKE2b-256 | 1502ba2a2d467277aaea7c01adb9ac0ff88ad1651769521044fb2cf7226f5a6c |
File details
Details for the file interpolator_for_wrfchem-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: interpolator_for_wrfchem-1.2.1-py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21e62964d0f5b51e7e13dfc9cbb6fc763d48f5200657575961a8f562cf1d938e |
|
MD5 | 5ff83cbeff439f179bfbec2bded1a47d |
|
BLAKE2b-256 | 951e952adffdf5db5fafa41ec17c73dc461f9f69c99c61c1d505f20a43ac1892 |