Pre-processing Utility Scripts for use with WRF-Hydro

create_wrfinput.R

Project
An R script to create a very basic WRF-Hydro initialization file (wrfinput) from a WRF geogrid file and a set of user-specified conditions. The script produces fields of spatially uniform initial model states of soil moisture, soil temperature, soil liquid water content and skin temperature among a few other variables necessary for model cold-start initialization. The script uses NCO commands to create this file. This file can be used as a 'cold start' for long-term model spin-up or users can overwrite the fields in the file created. Please refer to the script header for specific use information. Sophisticated and WRF-savvy users can bypass this script and use the WRF utility REAL.EXE to create a wrfinput file from model or reanalysis products. Note: This script does not currently work with the Noah LSM. This script works with WRF-Hydro v3, v5.0.3 and v5.1.1.
Version & Date
WRF-Hydro V5.1.1, V5.0.3, V3

create_SoilProperties.R (for use with v5.2 model code)

Project
An R script developed for the purpose of creating OPTIONAL spatially distributed soil and vegetation parameter files for Noah-MP and WRF-Hydro Version 5.1.1. These are read from the provided parameter tables (e.g., MPTABLE.TBL, HYDRO.TBL, etc.) and mapped to the appropriate soil or vegetation class map to create the 2D and 3D fields. These default parameter values can now be manipulated in 2 and 3 dimensions (e.g., via model calibration). After creating this file, use the compile option "SPATIAL_SOIL =1" to activate it, and specify the file in the namelist.hrldas. If the spatial soil option is turned off, the code will default to using the traditional TBL files and this file is not required. Please refer to the script header for specific use information. Note: MPTABLE.TBL files from versions of WRF-Hydro 5.0.3 and earlier will likely break the script. Get an updated MPTABLE.TBL file at the link below. However, the new output files should work with both 5.0.3, 5.1.1 and 5.2 of the model code.
Version & Date
WRF-Hydro V5.2, V5.1.1, 5.0.3
updated MPTABLE.TBL

create_soilproperties.r (for use with v5.0.x model code)

Project
An R script developed for the purpose of creating OPTIONAL spatially distributed soil and vegetation parameter files for Noah-MP and WRF-Hydro Version 5.0.x These are read from the provided parameter tables (e.g., MPTABLE.TBL, HYDRO.TBL, etc.) and mapped to the appropriate soil or vegetation class map to create the 2D and 3D fields. These default parameter values can now be manipulated in 2 and 3 dimensions (e.g., via model calibration). After creating this file, use the compile option "SPATIAL_SOIL =1" to activate it, and specify the file in the namelist.hrldas. If the spatial soil option is turned off, the code will default to using the traditional TBL files and this file is not required. Please refer to the script header for specific use information.
Version & Date
WRF-Hydro V5.0.x

convert_LAKEPARM_to_V5.sh

Project
The v5.0 release version of the WRF-Hydro model code has modifications to several variable names in the LAKEPARM.nc file. This shell script will update these variables from an older (pre v5.0) version of the LAKEPARM.nc file.
Version & Date
WRF-Hydro V.5.0

Contact

Please direct questions/comments about this page to:

WRF-Hydro Support