Running FMDA in the WRFx system: Difference between revisions
(Created page with "=WRFx system= ==WRFx: Requirements and environment== ===Install Anaconda distribution=== Download and install the Python 3 [https://repo.continuum.io/archive conda] distribution for your platform. We recommend an installation into the users' home directory. For example, wget <nowiki>https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh</nowiki> chmod +x Miniconda3-latest-Linux-x86_64.sh ./Miniconda3-latest-Linux-x86_64.sh The installation may instru...") |
No edit summary |
||
| Line 1: | Line 1: | ||
===Install Anaconda distribution=== | ===Install Anaconda distribution=== | ||
Download and install the Python 3 [https://repo.continuum.io/archive conda] distribution for your platform. | Download and install the Python 3 [https://repo.continuum.io/archive conda] distribution for your platform. | ||
| Line 15: | Line 11: | ||
===Install necessary packages=== | ===Install necessary packages=== | ||
The currently preferred process is to have conda find the versions for you: | The currently preferred process is to have conda find the versions for you: | ||
conda create -n wrfx python=3. | conda create -n wrfx python=3.12 | ||
conda install -c conda-forge gdal | conda install -c conda-forge gdal | ||
conda install -c conda-forge netcdf4 h5py pyhdf pygrib f90nml lxml | conda install -c conda-forge netcdf4 h5py pyhdf pygrib simplekml | ||
conda install -c conda-forge f90nml lxml pytz pandas scipy | |||
conda install -c conda-forge basemap paramiko dill psutil flask wgrib2 | conda install -c conda-forge basemap paramiko dill psutil flask wgrib2 | ||
pip install | conda install -c conda-forge toml synopticpy==2024.9.0 | ||
pip install python-cmr shapely | |||
On Linux x86-64, you can also use versions specified in a yml file: | On Linux x86-64, you can also use versions specified in a yml file: | ||
| Line 31: | Line 28: | ||
conda activate wrfx | conda activate wrfx | ||
===Clone github repository=== | |||
Clone wrfxpy repository | Clone wrfxpy repository | ||
git clone <nowiki>https://github.com/openwfm/wrfxpy</nowiki> | git clone <nowiki>https://github.com/openwfm/wrfxpy</nowiki> | ||
| Line 42: | Line 34: | ||
cd wrfxpy | cd wrfxpy | ||
===General configuration=== | |||
An etc/conf.json file must be created with the keys discussed below. A template file etc/conf.json.initial is provided as a starting point. | An etc/conf.json file must be created with the keys discussed below. A template file etc/conf.json.initial is provided as a starting point. | ||
| Line 55: | Line 47: | ||
which wget | which wget | ||
====Tokens configuration | ===Get static data=== | ||
Acquire the elevation static data from here: | |||
mkdir static | |||
cd static | |||
wget <nowiki>https://demo.openwfm.org/web/wrfx/hrrr_terrain.tbz</nowiki> | |||
tar xvfj hrrr_terrain.tbz | |||
===Tokens configuration=== | |||
When running wrfxpy, sometimes the data needs to be accessed and downloaded using a specific token created for the user. For instance, in the case of running the Fuel Moisture Model, one needs a token from a valid [https://mesowest.utah.edu/ MesoWest] user to download data automatically. All of these can be specified with the creation of the file etc/tokens.json from the template etc/tokens.json.initial containing: | When running wrfxpy, sometimes the data needs to be accessed and downloaded using a specific token created for the user. For instance, in the case of running the Fuel Moisture Model, one needs a token from a valid [https://mesowest.utah.edu/ MesoWest] user to download data automatically. All of these can be specified with the creation of the file etc/tokens.json from the template etc/tokens.json.initial containing: | ||
| Line 70: | Line 69: | ||
For running the fuel moisture model, a new MesoWest user can be created in [https://developers.synopticdata.com/ MesoWest New User]. Then, the token can be acquired and replaced in the etc/tokens.json file. Also, the user can specify a list of tokens to use. | For running the fuel moisture model, a new MesoWest user can be created in [https://developers.synopticdata.com/ MesoWest New User]. Then, the token can be acquired and replaced in the etc/tokens.json file. Also, the user can specify a list of tokens to use. | ||
===Synoptic Database configuration=== | |||
For FMDA to acquire and store fuel moisture RAWS data, it uses an add-on that needs to be installed. These are the instructions to install it: | |||
cd src/ingest | |||
git clone https://github.com/wirc-sjsu/SynopticDB | |||
===FMDA cycler configuration=== | |||
To specify configurations for the FMDA cycle, there is a JSON file in the etc folder called fmda_cycler.json. You can modify the file and create your own workspace path for FMDA output, lookback length for reanalysis applications, and regions to create FMDA products for. | |||
===Visualizations in the web=== | |||
Configure the following keys in etc/conf.json | |||
"shuttle_ssh_key": "/path/to/id_rsa" | |||
"shuttle_remote_user": "user_id" | |||
"shuttle_remote_host": "demo.openwfm.org" | |||
"shuttle_remote_root": "/path/to/remote/storage/directory" | |||
"shuttle_lock_path": "/tmp/short_user_id" | |||
The "shuttle_remote_root" key is usually defined as "/home/user_id/wrfxweb/fdds/simulations". So, everything should be ready to send post-processing simulations to the visualization server. | |||
Note: If visualizations for wrfxweb are not required, just remove all the remote options from the conf.json. | |||
===Running first example=== | |||
To run a simple nowcast example, do: | |||
conda activate wrfx | |||
./hrrr_cycler a 42 -124.6 49 -116.4 | |||
Latest revision as of 18:53, 15 May 2026
Install Anaconda distribution
Download and install the Python 3 conda distribution for your platform. We recommend an installation into the users' home directory. For example,
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh chmod +x Miniconda3-latest-Linux-x86_64.sh ./Miniconda3-latest-Linux-x86_64.sh
The installation may instruct you to exit and log in again.
On a shared system, you may have a system-wide Python distribution with conda already installed, perhaps as a module, try module avail.
Install necessary packages
The currently preferred process is to have conda find the versions for you:
conda create -n wrfx python=3.12 conda install -c conda-forge gdal conda install -c conda-forge netcdf4 h5py pyhdf pygrib simplekml conda install -c conda-forge f90nml lxml pytz pandas scipy conda install -c conda-forge basemap paramiko dill psutil flask wgrib2 conda install -c conda-forge toml synopticpy==2024.9.0 pip install python-cmr shapely
On Linux x86-64, you can also use versions specified in a yml file:
wget https://demo.openwfm.org/web/wrfx/wrfx.yml conda env create --name wrfx --file wrfx.yml
Note: The versions listed in the yml file may not be available on platforms other than Linux x86-64 (most common), or may just not work as package repositories evolve.
Set environment
Every time before using WRFx, make the packages available by
conda activate wrfx
Clone github repository
Clone wrfxpy repository
git clone https://github.com/openwfm/wrfxpy
Change to the directory where the wrfxpy repository has been created
cd wrfxpy
General configuration
An etc/conf.json file must be created with the keys discussed below. A template file etc/conf.json.initial is provided as a starting point.
cd wrfxpy cp etc/conf.json.initial etc/conf.json
Configure the queuing system, system directories, WPS/WRF-SFIRE locations, and workspace locations by editing the following keys in etc/conf.json:
"sys_install_path": "/path/to/wrfxpy" "wget" : "/path/to/wget"
Note that the rest of the paths are not used by FMDA, so you can leave defaults or remove them. To find the default wget,
which wget
Get static data
Acquire the elevation static data from here:
mkdir static cd static wget https://demo.openwfm.org/web/wrfx/hrrr_terrain.tbz tar xvfj hrrr_terrain.tbz
Tokens configuration
When running wrfxpy, sometimes the data needs to be accessed and downloaded using a specific token created for the user. For instance, in the case of running the Fuel Moisture Model, one needs a token from a valid MesoWest user to download data automatically. All of these can be specified with the creation of the file etc/tokens.json from the template etc/tokens.json.initial containing:
{
"mesowest" : "token-from-synopticdata.com"
}
So, if any of the previous capabilities are required, create a token from the specific page, do
cp etc/tokens.json.initial etc/tokens.json
and edit the file to include your previously created token.
For running the fuel moisture model, a new MesoWest user can be created in MesoWest New User. Then, the token can be acquired and replaced in the etc/tokens.json file. Also, the user can specify a list of tokens to use.
Synoptic Database configuration
For FMDA to acquire and store fuel moisture RAWS data, it uses an add-on that needs to be installed. These are the instructions to install it:
cd src/ingest git clone https://github.com/wirc-sjsu/SynopticDB
FMDA cycler configuration
To specify configurations for the FMDA cycle, there is a JSON file in the etc folder called fmda_cycler.json. You can modify the file and create your own workspace path for FMDA output, lookback length for reanalysis applications, and regions to create FMDA products for.
Visualizations in the web
Configure the following keys in etc/conf.json
"shuttle_ssh_key": "/path/to/id_rsa" "shuttle_remote_user": "user_id" "shuttle_remote_host": "demo.openwfm.org" "shuttle_remote_root": "/path/to/remote/storage/directory" "shuttle_lock_path": "/tmp/short_user_id"
The "shuttle_remote_root" key is usually defined as "/home/user_id/wrfxweb/fdds/simulations". So, everything should be ready to send post-processing simulations to the visualization server.
Note: If visualizations for wrfxweb are not required, just remove all the remote options from the conf.json.
Running first example
To run a simple nowcast example, do:
conda activate wrfx ./hrrr_cycler a 42 -124.6 49 -116.4