wiki:WRf4GPreprocessor

Version 3 (modified by MarkelGarcia, 9 years ago) (diff)

--

Page Contents

    1. Why a preprocessor?

Why a preprocessor?

Before the WRF Preprocessor System (WPS) runs, input data files need to be in a specific format, so ungrib.exe is able to parse them. Specifically, files in GRIB format are needed. Furthermore, to WRF be able to run, there are some mandatory fields that must be present in the input files. Some of these are not always available in the driving model data we want to use, such as soil temperature and moisture content. In addition, we need these variables with the frequency that WRF is going to use to update its boundary data (usually 6 hours).

Thus, in many cases input data available in some online server need to be preprocessed. This process could be carried out offline, transforming the whole downloaded dataset before using it. However, integrating it in the WRF4G workflow enables the user to download and preprocess the input data locally in any of the grid nodes. The program or script that performs this process is called "preprocessor".

As mentioned, the preprocessor is called before the WPS in each chunk. It must be an executable file that can be written in any language, provided it does accept 3 arguments. These must be the initial date, the end date (as YYYY-mm-dd HH:MM:SS) and the path to the data. After preprocessing, the preprocessor must copy the properly formatted input data to a folder called WPS/grbdata.

WRF4G is provided with some preprocessors and postprocessor as examples. These are located in the ./bin folder in the WRF4G tarball located in $WRF4G_LOCATION/repository/apps. New preprocessors (or postprocessors) created by the user need to be located in that place too. However, to avoid dealing with the tar, it is often more confortable to locate them in the wrf4g_files/WPS folder of the specific experiment, unless they are going to be used very often.