.. role:: underline :class: underline ========== WRF Output ========== | | | WRF Output Fields ================= WRF outputs numerous variables to WRF history/output files (*wrfout\**) by default. Options are available to remove or add variables from *wrfout\** files, or to output variables to different files. Many variables are output dependent on options chosen during model configuration or for simulation (e.g., *namelist.input* settings). For e.g., a variable may be used by a specific physics scheme, and if that scheme is not chosen, it will not be calculated and output. After running WRF, issue the following command in a terminal window for a `full list of wrf output variables <./output_variables.html>`_: .. code-block:: ncdump -h wrfout_d_ | | | | | Special WRF Output Variables ============================ WRF outputs state variables (defined in *WRF/Registry/Registry.EM_COMMON*) that are used in the model's prognostic equations. The following state variables are perturbation fields, requiring the following reconstruction for meteorological standard fields: | .. csv-table:: :width: 75% :widths: 50,40 "Total Geopotential", "PH + PHB" "Total Geopotential Height (in meters)", "(PH + PHB) / 9.81" "Total Potential Temperature (in K)", "T + 300" "Total Pressure (in mb)", "(P + PB) \* 0.01" "Wind Components (grid-relative)", "U, V" "Surface Pressure (in Pa)", "psfc" "Surface Winds (grid-relative)", "U10, V10 (valid at mass points)" "Surface Temperature", "T2" "Surface Mixing Ratio", "Q2" | | | Definitions for map projection (*map_proj*) options --------------------------------------------------- .. csv-table:: :width: 75% :widths: 15, 60 1, Lambert Conformal 2, Polar Stereographic 3, Mercator 6, Latitude and Longitude (including global) | | | | | Run-Time I/O Option =================== Input/output (I/O) settings (e.g., which variables are output, and with which stream each variable is associated) are coded in *WRF/Registry/\** files. To change I/O settings, these files can be modified, but modifications to registry files require a time-consuming clean, reconfigure, and recompile of WRF. The **Run-time I/O** feature allows I/O modifications during WRF simulations, bypassing the need to recompile the model. .. note:: Using Run-time I/O can cause a performance hit. For production runs, it is recommended to make registry changes instead of using this option. | | | Using the Run-time I/O Option ----------------------------- #. Move to the *wrf.exe* execution directory and create a text file (e.g., *my_file_d0X.txt*; one for each domain) for defining output modifications. File content associates variables with a stream ID (e.g., stream *0* for default WRF history/output), specifying whether the field is added or removed. Examples are provided: | The following removes fields *RAINC* and *RAINNC* from the standard WRF history/output file (stream *0* - *wrfout_d0\**): | .. code-block:: -:h:0:RAINC,RAINNC | | The following adds fields *RAINC* and *RAINNC* to an output stream *7*, into files using the name defined in *auxhist7_outname* (see below): | .. code-block:: -:h:7:RAINC,RAINNC | | Available options are: .. csv-table:: :escape: \ **\+** or **-**, add or remove a variable **0-24**, which stream to use **i** or **h**, write to the input or history stream **field name in the Registry file**, (string displayed in column 9 in the registry file) | Available auxiliary streams are: .. csv-table:: :escape: \ **Available Streams**, 0-24 **0** , reserved for wrfout\* files **23** , reserved for pressure level diagnostic output **3** , reserved for extreme climate **2** , reserved for AFWA diagnostic output **6** , reserved for RASM diagnostic output All other streams (except 1) are okay to use. | | | #. Add the following to the *&time_control* section of *namelist.input*: | .. code-block:: &time_control iofields_filename="my-file_d01.txt","my-file_d01.txt" ignore_iofields_warning=.true. | | To output to a stream other than the WRF history/output stream *0*, add the following to the *&time_control* namelist (modify the settings as needed) - e.g., output to stream *7*: | .. code-block:: &time_control auxhist7_outname="your-stream-name_d_" auxhist7_interval=360,360 frames_per_auxhist7=1, 1 io_form_auxhist4=2 | .. note:: "your-stream-name" can be anything, but do not replace "_d_." That is the syntax the model looks for. | | | **Additional notes regarding the Runtime I/O option** * Do not include spaces between fields in the *.txt* file. * Variable names in the *.txt* file must identically match the quoted string from the Registry file (column 9) * It is not necessary to remove fields from one stream to add them to another. A field can be in multiple streams. * Fields listed in the *.txt* file must be declared as a state variable in the Registry. * The *ignore_iofields_warning* namelist parameter determines the model's behavior if the *.txt* file contains an error. The default is *.true.*, which prints a warning message, but continues the run. If set to *.false.*, the simulation aborts if errors exist in the *.txt* file(s). | | | | | Output Diagnostics ================== | Time Series Output ------------------ Outputting a time series of data at particular poionts in the domain can be useful for tracking the progression of particular variables. To do this, a file called *tslist* be added to the WRF running directory. This file should list each location, defined by its latitude and longitude (or *i,j* coordinates), along with a brief description and abbreviation, and the file should follow this format: .. note:: The first three lines are regarded as header information, and are ignored by the model. | .. code-block:: #-----------------------------------------------# # 24 characters for name | pfx | LAT | LON | #-----------------------------------------------# Cape Hallett hallt -72.330 170.250 McMurdo Station mcm -77.851 166.713 | | To use cell locations (e.g., for idealized cases), the i,j locations are specified as follows: .. code-block:: #-----------------------------------------------# # 24 characters for name | pfx | I | J | #-----------------------------------------------# tower0001 t0001 10 10 tower0002 t0002 20 20 tower0003 t0003 30 30 | | | During *wrf.exe* the following files are written - one of each per location listed in *tslist*: .. csv-table:: **pfx*.d0x.TS**, time series output of surface variables **pfx.d0x.UU**, vertical profile of the *u* wind component for each time step **pfx.d0x.VV**, vertical profile of the *v* wind component for each time step **pfx.d0x.WW**, vertical profile of the *w* wind component for each time step **pfx.d0x.TH**, vertical profile of potential temperature for time step **pfx.d0x.PH**, vertical profile of geopotential height for each time step **pfx.d0x.QV**, vertical profile of water vapor mixing ratio for each time step **pfx.d0x.PR**, vertical profile of pressure for each time step | where * **pfx** : the location's prefix specified in *tslist* * **d0x** : the domain ID, as given in *namelist.input* | | | namelist.input Variables Specific to Time-series Output +++++++++++++++++++++++++++++++++++++++++++++++++++++++ | .. csv-table:: :escape: \ **max_ts_locs** , maximum number of locations in *tslist* ( default is 5) **ts_buf_size** , buffer size for time series output (default is 200) **max_ts_level** , number of model levels for time series vertical profiles (default is 15). The maximum number of *max_ts_level* is *e_vert* *- 1* (the number of half layers in the model run) **tslist_unstagger_winds** , output the unstaggered *u*\, *v*\, and *w* wind components (default is false) | .. note:: Locations specified in *tslist* that do not exist in any domain are ignored.. | .. seealso:: See *WRF/run/README.tslist* for additional details. | | | | Pressure Level Output --------------------- This option outputs the following extra fields to a number of pressure levels: * Wind speed (*U* and *V*) * Temperature (T) * Dewpoint temperature * Relative humididy (RH) * Geopotential Height | | To activate this option, add the following record and parameters to *namelist.input*, making adjustments for the case: .. code-block:: &diags p_lev_diags=1 num_press_levels=4 press_levels= 85000, 70000, 50000, 20000 / | | The extra fields are output to auxiliary stream *23*. Add the following variables to *namelist.input*. For e.g., .. code-block:: & time_control auxhist23_interval = 360, 360 frames_per_auxhist23 = 100, 100 io_form_auxhist23 = 2 | | | | Convective Storm Diagnostics ---------------------------- This option outputs the following extra fields to the WRF history/output file(s) (*wrfout_d0\**): * maximum 10 m wind speed * maximum helicity in the 2-5 km layer * maximum vertical velocity in updraft and downdraft below 400 mb * mean vertical velocity in the 2-5 km layer * maximum column graupel in a time window between WRF history/output times | | To activate this option, add the following parameters to their specified *namelist.input* record: .. code-block:: &time_control nwp_diagnostics = 1 &physics do_radar_ref = 1 | | | | Climate Diagnostics ------------------- This option outputs surface diagnostic variables. For each of *T2, Q2, TSK, U10, V10, 10 m wind speed, RAINCV*, and *RAINNCV,* the following are calculated (a total of 48 additional variables): * maximum * minimum * the time at which the max occurs * the time at which the min occurs * mean value * standard deviation of the mean | | Output goes to auxiliary stream 3. To activate this option, add the following parameters to *namelist.input*. For e.g.: .. code-block:: &time_control output_diagnostics = 1 auxhist3_outname = "wrfxtrm_d_" auxhist3_interval = 1440, 1440 frames_per_auxhist3 = 100, 100 io_form_auxhist3 = 2 | | .. note:: Because many of these variables are computed, if doing a restart, it is advised to only restart at a multiple of *auxhist3_interval*. | | | | Time-averaged Output -------------------- This option outputs history time-averaged column-pressure coupled *U*, *V* and *W* for downstream transport models. To activate this option, add the following parameter to *namelist.input*: .. code-block:: &dynamics do_avgflx_em = 1 | | If a Grell cumulus scheme (*cu_physics= 3, 5, or 93*) is used, time-averaged convective mass fluxes can be output by adding the following parameter to *namelist.input*: .. code-block:: &dynamics do_avg_cugd = 1 | | | | Weather Diagnostics ------------------- *Contributed by the Air Force Weather Agency (AFWA)* This option outputs diagnostic variables to auxiliary stream 2. `See AFWA Diagnostics in WRF `_ for detailed documentation. | .. note:: This option cannot be used with code compiled with OpenMP. | | To activate this option, add the following record and parameter to *namelist.input*: .. code-block:: &afwa afwa_diag_opt=1 / | | Then set any of the following options to *1* in the *&afwa* namelist record to output specific fields (set for each domain; default is *0=off*). .. csv-table:: :escape: \ &afwa afwa_ptype_opt = 1\,1 , precipitation type afwa_vil_opt = 1\, 1, vertical integrated liquid afwa_radar_opt = 1\, 1, radar afwa_severe_opt = 1\, 1, severe weather afwa_icing_opt = 1\, 1, icing afwa_vis_opt = 1\, 1, visibility afwa_cloud_opt = 1\, 1, cloud afwa_therm_opt = 1\, 1, thermal indices afwa_turb_opt = 1\, 1, turbulence afwa_buoy_opt = 1\, 1, buoyancy | | The following may also be set when *afwa_ptype_opt=1*: .. csv-table:: :escape: \ &afwa afwa_ptype_ccn_temp = 264.15, CCN temperature for precipitation type calculation afwa_ptype_tot_melt = 50, total melting energy for precipitation type calculation | | | | Solar Forecasting Diagnostics ----------------------------- This option outputs the following variables to the wrf output files (*wrfout_d0\**): * Solar zenith angle * Clearness index * 2D maximum cloud fraction * Paths for water vapor, liquid water, ice water, and snow water * Effective radius for liquid cloud, ice, and snow * Optical thickness for liquid cloud, ice, and snow * Cloud base height and top height * For liquid and ice variables, the total water path (liquid + ice + snow), effective radius, and optical thickness are calculated, where the totaled variables account for subgrid hydrometeors. * Accumulated GHI *(in WRF v4.4+)* | | To activate this option, add the following record and parameter to *namelist.input*: .. code-block:: &diags solar_diagnostics = 1 / | .. note:: If a *tslist* file is present, these variables are also written to the respective time series file(s). | | | | Accumulated Physics Tendencies Output ------------------------------------- This option outputs 16 accumulated physics tendencies for the following variables: * Potential temperature * Water vapor mixing ratio * *U* and *V* wind components | | To activate this option, add the following parameter to *namelist.input*: .. code-block:: &physics acc_phy_temd = 1 | | | | Miscellaneous Output Options ---------------------------- * **do_radar_ref=1** : Add to *&physics* to compute radar reflectivity unsing microphysics-specific parameters in the model. *This option works with mp_physics= 2, 4, 6, 7, 8, 10, 14, 16, 17, 18, 19, 21, 24, 26, 28* * **prec_acc_dt=60** : Add to *&physics* to provide a time interval for outputting precipitation variables (rain from cumulus and microphysics schemes, and snow from microphysics), in minutes. | | | | | Using Multiple Lateral Boundary Condition Files =============================================== To speed up pre-processing of lateral boundary conditions in real-time forecasting, lateral boundary conditions can be split into multiple files, allowing a boundary condition file to be created as soon as the surrounding time periods become available, allowing the model to start sooner. | To activate this option, add the following parameters to *namelist.input*: .. code-block:: &time_control bdy_inname = "wrfbdy_d_" multi_bdy_files = .true. | .. note:: Prior to WRFv4.2, this can only be done by adding ``-D_MULTI_BDY_FILES_`` to *ARCH_LOCAL* in the *configure.wrf* file before compiling. | | Output files are in the following format (for e.g., using a 6-hourly data interval): |br| |br| wrfbdy_d01_2000-01-24_12:00:00 |br| wrfbdy_d01_2000-01-24_18:00:00 |br| wrfbdy_d01_2000-01-25_00:00:00 |br| wrfbdy_d01_2000-01-25_06:00:00 | | | | | Checking Output =============== Once WRF completes, the following may be useful for checking output: * If WRF was built with distributed memory (dmpar), an *rsl.out.\** and *rsl.error.\** file should exist - one of each for each processor used. Check for the print **SUCCESS COMPLETE WRF** at the end of any of these files to determine whether the simulation succeeded to completion. For e.g.,: .. code-block:: tail rsl.out.0000 | * All *namelist.input* settings are preserved and written to a file named *namelist.output*. | * Use the ``ncdump`` command to check the output times written to any netCDF file; for e.g.: .. code-block:: ncdump -v Times wrfout_d01_yyyy-mm-dd_hh:00:00 | * See the *wrf.exe* output log (e.g., *rsl.out.0000*) for information on how long computations take for each model time step (*time_step*), how long it takes to write a WRF history/output or restart file; for e.g.: | * **Model Time Steps** .. code-block:: Timing for main: time 2006-01-21_23:55:00 on domain 2: 4.91110 elapsed seconds. Timing for main: time 2006-01-21_23:56:00 on domain 2: 4.73350 elapsed seconds. Timing for main: time 2006-01-21_23:57:00 on domain 2: 4.72360 elapsed seconds. Timing for main: time 2006-01-21_23:57:00 on domain 1: 19.55880 elapsed seconds. | * **History File** .. code-block:: Timing for Writing wrfout_d02_2006-01-22_00:00:00 for domain 2: 1.17970 elapsed seconds. Timing for main: time 2006-01-22_00:00:00 on domain 1: 27.66230 elapsed seconds. Timing for Writing wrfout_d01_2006-01-22_00:00:00 for domain 1: 0.60250 elapsed seconds. | | | | |