{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Preparing climate file for CIM" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " Script prepared by Dr. Dasaraden Mauree \n", " Contact: EPFL \n", " dasaraden.mauree@epfl.ch / dasaraden.mauree@gmail.com \n", " \n", " use this script to read the standard climate file from\n", " Meteonorm for CitySim and save new file for CIM. " ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "#importing necessary packages\n", "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "#Opening file and saving in array\n", "meteonorm=pd.read_csv(\"Ecublens.cli\", header=\"infer\", sep=\"\\s+\", encoding = \"ISO-8859-1\", skiprows=3)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "#Selecting columns and saving in file for CIM\n", "cim=meteonorm[['Ta','FF','DD','RH']]\n", "cim.to_csv(r'for_cim.cli', header=None, sep=' ', mode='a', index=False)" ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.6" } }, "nbformat": 4, "nbformat_minor": 2 }