Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add __future__ and rename python scripts #417

Merged
merged 1 commit into from
Apr 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,24 @@
# -----------------------------------------------------------------------------

## Plotting tool for the AtChem2 model output
## --> Python2 version [requires numpy & matplotlib]
## --> Python version [requires numpy & matplotlib]
##
## Acknowledgements: M. Panagi
##
## ARGUMENT:
## - directory with the model output
##
## USAGE:
## python2 ./tools/plot/plot-atchem2_v2.py ./model/output/
## python ./tools/plot/plot-atchem2-numpy.py ./model/output/
## ---------------------------------------------- ##
from __future__ import print_function
import os, sys
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages

os.chdir(sys.argv[1])
print os.getcwd()
print(os.getcwd())

with open('speciesConcentrations.output') as f:
var1 = f.readline().split()
Expand Down Expand Up @@ -121,4 +122,4 @@

## ---------------------------- ##

print "\n===> atchem2_output.pdf created in directory:", sys.argv[1], "\n\n"
print("\n===> atchem2_output.pdf created in directory:", sys.argv[1], "\n\n")
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@
# -----------------------------------------------------------------------------

## Plotting tool for the AtChem2 model output
## --> Python3 version [requires pandas & matplotlib]
## --> Python version [requires pandas & matplotlib]
##
## Acknowledgements: M. Panagi, M. Fabre'
##
## ARGUMENT:
## - directory with the model output
##
## USAGE:
## python3 ./tools/plot/plot-atchem2_v3.py ./model/output/
## python ./tools/plot/plot-atchem2-pandas.py ./model/output/
## ---------------------------------------------- ##
from __future__ import print_function
import os, sys
import pandas as pd
import matplotlib.pyplot as plt
Expand Down