Purpose: To obtain ISH-formatted NOAA data needed as input for WeatherPrep.exe to create data used by i-Tree HydroPlus
Author: T. Endreny at SUNY ESF, te@esf.edu

Steps:
1. Obtain the weather station 6-digit USAF ID and 5-digit NCDC WBAN number for the area of interest. The USAF ID followed by the WBAN number comprise the last 11-digits of StationID listed in Results of search with NCEI CDO Map browser for hourly time series data at https://www.ncei.noaa.gov/maps/hourly/. The USAF ID and WBAN number can also be identified from the isd-history.txt file in this project folder C:\iTree\WeatherPrep\NOAA_data_tool\WBAN_Guide, also at ftp://ftp.ncdc.noaa.gov/pub/data/noaa/isd-history.txt. As an example USAF and WBAN code for the Hancock International Airport at Syracuse, NY: 725190 14771.
2. Access the NCDC NOAA archive of weather data using an FTP client, such as FileZilla. In FileZilla, enter into the Host window this FTP address: ftp://ftp.ncdc.noaa.gov/pub/data/noaa/ or ftp://ftp.ncei.noaa.gov/pub/data/noaa/, and allow for Insecure FTP connection. No Username, Password, or Port need to be entered. The connection to these sites should be made through an FTP application; connections are not supported through a URL browser. In FileZilla browser, the remote site will be on the right side of the window, and the local site of your computer on the left side, e.g., C:\iTree\WeatherPrep\NOAA_data_tool\TestCase\syracuse\. 
3. Browse the NCDC NOAA archive of NCDC-formatted NOAA data for the folder containing the year of interest, and then within that folder find the compressed data file with named for the USAF and WBAN code and year, USAF##-WBAN#-YYYY.gz. 
4. Download the file of interest to a folder on your local site (e.g., C:\iTree\WeatherPrep\NOAA_data_tool\TestCase\syracuse\) by navigating the FileZilla browser to enter a target folder on your local machine. Then double click on the chosen remote file, e.g., USAF##-WBAN#-YYYY.gz, and it will download from the remote to the local site. Exit the FTP FileZilla browser. 
5. Unzip downloaded NCDC-formatted NOAA data file, e.g., C:\iTree\WeatherPrep\NOAA_data_tool\TestCase\syracuse\725190-14771-2019.gz, by using a Windows File Explorer to navigate to the local site folder on your machine and then using 7-Zip or another tool to Extract Here, into the same folder. 
6. Rename this unzipped NCDC-formatted NOAA data file to have a .txt extension. This is an ASCII text file, and can have a .txt extension added by renaming, or be left without an extension. It should become, USAF##-WBAN#-YYYY.txt, e.g., 725190-14771-2019.txt
7. Reformat the unzipped NCDC-formatted NOAA data to the ISH-formatted NOAA data, by running the NOAA executable program ishapp2.exe. This program is provided by NOAA, and in this project folder C:\iTree\WeatherPrep\NOAA_data_tool\ishapp2.exe. Copy the ishapp2.exe file into the local site folder containing the unzipped NCDC-formatted NOAA weather data, e.g., C:\iTree\WeatherPrep\NOAA_data_tool\TestCase\syracuse\725190-14771-2019.txt. Note, disregard ishapp2.pdf instructions suggesting ishapp2.exe can be run giving a path to the input and output file name. To reformat, follow these next steps:
7a. Open a Command Prompt (i.e., DOS prompt, XTerm window, PowerShell) and note it has a cursor or prompt blinking after the symbol ">", usually with the directory path preceding, as in, "C:\>"
7b. Navigate the Command Prompt to the local site folder by typing the path into the prompt and hitting return, as in C:\>cd /d C:\iTree\WeatherPrep\NOAA_data_tool\TestCase\syracuse, which should generate a new path for the Command Prompt, C:\iTree\WeatherPrep\NOAA_data_tool\TestCase\syracuse>
7c. Type into the prompt the executable program ishapp2.exe followed by USAF##-WBAN#-YYYY.txt input and a new name for output, such as USAF##-WBAN#-YYYY-ish.txt, as C:\iTree\WeatherPrep\NOAA_data_tool\TestCase\syracuse>ishapp2.exe 725190-14771-2019.txt 725190-14771-2019-ish.txt