Skip to content

Commit

Permalink
Merge branch 'rgieseke-py3-compatibility'
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisroadmap committed Jan 18, 2018
2 parents 53c2891 + ba24be5 commit fd5ad6d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ dist: trusty
sudo: required
python:
- "2.7"
- "3.6"
before_install:
- pip install pytest
install:
Expand Down
2 changes: 1 addition & 1 deletion fair/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


# # # ------------ IMPORT REQUIRED MODULES ------------ # # #
import forward
from . import forward
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
12 changes: 6 additions & 6 deletions fair/forward.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import inspect
import numpy as np
from scipy.optimize import root
from constants import molwt, lifetime, radeff
from constants.general import M_ATMOS
from forcing import ozone_tr, ozone_st, h2o_st, contrails, aerosols, bc_snow,\
landuse
from .constants import molwt, lifetime, radeff
from .constants.general import M_ATMOS
from .forcing import ozone_tr, ozone_st, h2o_st, contrails, aerosols, bc_snow,\
landuse

def iirf_interp_funct(alp_b,a,tau,targ_iirf):
# ref eq. (7) of Millar et al ACP (2017)
Expand Down Expand Up @@ -89,9 +89,9 @@ def fair_scm(emissions=False,
lifetimes = lifetime.aslist
# Select the desired GHG forcing relationship
if ghg_forcing.lower()=="etminan":
from forcing.ghg import etminan as ghg
from .forcing.ghg import etminan as ghg
elif ghg_forcing.lower()=="myhre":
from forcing.ghg import myhre as ghg
from .forcing.ghg import myhre as ghg
else:
raise ValueError("ghg_forcing should be 'etminan' (default) or 'myhre'")

Expand Down
2 changes: 1 addition & 1 deletion index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"from matplotlib import pyplot as plt\n",
"plt.style.use('seaborn-darkgrid')\n",
"plt.rcParams['figure.figsize'] = 16, 9\n",
"print plt.style"
"print(plt.style)"
]
},
{
Expand Down

0 comments on commit fd5ad6d

Please sign in to comment.