##################################### Converting time zone to Mountain Time ##################################### This page shows how to convert time zone from original UTC to Mountain Standard Time. Merge multiple datasets ~~~~~~~~~~~~~~~~~~~~~~~ When you run the program (here) that reads the original CSV data and generates a timestamp, the original data placed in the yearly directory is redistributed into each station's directory, as shown below. .. image:: SRC/folder_info2.png :width: 300 Now, we will merge multiple files in each directory and create one file at each station directory. .. literalinclude:: SRC/awk2.txt :lines: 1,2 .. image:: SRC/folder_info3.png :width: 300 Conversion of local time from UTC ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Read CSV data ------------- Check `here `__ for how to read the data. Time conversion --------------- Specify a time lag (-6 hours) in the subroutine that generates the date and time format from the original "days of the year" and "hour" information. .. literalinclude:: SRC/convert.MTtime.py :language: python :lines: 95 .. literalinclude:: SRC/convert.MTtime.py :language: python :lines: 53-58 :emphasize-lines: 4 .. note:: The time conversion does not include daylight savings time adjustment. Sample program for creating a new MT dated data set ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This program gets a filename under multiple directories (station names) and reads the data in one file in each directory. .. image:: SRC/folder_info3.png :width: 300 Source file: :download:`convert.MTtime.py `