README.txt

Purpose: create_soilproperties.R is an R script developed for the purpose of creating spatially distributed soil
         and vegetation parameter files for WRF-Hydro based upon the tables provided for NoahMP and WRF-Hydro.  

Authors: NCAR WRF-Hydro team

Date: February 2018

Requirements: R, NCO, and the following R packages: ncdf4, stringr, plyr 

Input files:
   geo_em.d0x.nc - geogrid file defining the model domain of interest generated by the WRF Preprocessing System (WPS)
   SOILPARM.TBL - Noah-MP soil parameter table
   MPTABLE.TBL - Noah-MP vegetation parameter table 
   GENPARM.TBL - Noah-MP general parameter table
   HYDRO.TBL - WRF-Hydro hydro parameter table

Output files:
   soil_properties.nc (default filename) - spatial soil and vegation parameter file
   hydro2dtbl.nc (default filename) - spatial hydro parameter file 

Instructions (users need to complete the following prior to running the script): 

1. Update script to point to input geogrid file
2. Update script to point to the required parameter tables or copy these over to the current directory (Note: these are
   distributed with the WRF-Hydro code and are located in the template/HYDRO and Land_models/NoahMP/run directories)
3. Update script to specify the desired names of the output files
4. Update script to specify the desired soil category value to be used in case of conflicts between
   soil water and land cover water cells (Note: this is the soilFillVal variable)
5. Decide whether or not to show hard-coded urban soil parameters

Usage: Rscript create_soilproperties.R
