Skip to content

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
jklenzing committed May 19, 2019
1 parent 0e8244a commit 02fe70b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
26 changes: 14 additions & 12 deletions sami2py/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
-------------------------------------------------------------------------------
run_model(year, day, lat=0, lon=0, alt=300,
f107=120, f107a=120, ap=0,
rmin=100, rmax=2000, gams=3, gamp=3, altmin=85.,
dthr=0.25, hrinit=0., hrpr=24., hrmax=48.,
dt0=30., maxstep=100000000, denmin=1.e-6,
nion1=1, nion2=7, mmass=48, h_scale=1, o_scale=1,
no_scale=1, o2_scale=1, he_scale=1, n2_scale=1, n_scale=1,
Tinf_scale=1, Tn_scale=1., euv_scale=1,
wind_scale=1, hwm_model=14,
fejer=True, ExB_drifts=np.zeros((10,2)), ve01=0., exb_scale=1,
alt_crit=150., cqe=7.e-14,
tag='test', clean=False, test=False, outn=False)
f107=120, f107a=120, ap=0,
rmin=100, rmax=2000, gams=3, gamp=3, altmin=85.,
dthr=0.25, hrinit=0., hrpr=24., hrmax=48.,
dt0=30., maxstep=100000000, denmin=1.e-6,
nion1=1, nion2=7, mmass=48, h_scale=1, o_scale=1,
no_scale=1, o2_scale=1, he_scale=1, n2_scale=1, n_scale=1,
Tinf_scale=1, Tn_scale=1., euv_scale=1,
wind_scale=1, hwm_model=14,
fejer=True, ExB_drifts=np.zeros((10,2)), ve01=0., exb_scale=1,
alt_crit=150., cqe=7.e-14,
tag='test', clean=False, test=False, outn=False)
Initializes a run of the SAMI2 model and archives the data.
-------------------------------------------------------------------------------
Expand Down Expand Up @@ -257,7 +257,7 @@ def run_model(year, day, lat=0, lon=0, alt=300,
_generate_namelist(info)
archive_path = generate_path(tag, lon, year, day, test)
if not test:
check_model_run = subprocess.check_call('./sami2py.x')
_ = subprocess.check_call('./sami2py.x')

_archive_model(archive_path, clean, fejer, fmtout, outn)

Expand Down Expand Up @@ -288,6 +288,7 @@ def _generate_format_info(fmtout):
format_info = '.false.'
return format_info


def _generate_neutral_info(outn):
"""Generates the namelist information needed to tell the SAMI2 model to
output the model results of neutral species and wind
Expand All @@ -298,6 +299,7 @@ def _generate_neutral_info(outn):
neutral_info = '.false.'
return neutral_info


def _generate_namelist(info):
"""Generates namelist file for sami2
Expand Down
4 changes: 2 additions & 2 deletions sami2py/_core_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def _load_model(self):
ni = 7

model_path = generate_path(self.tag, self.lon0, self.year, self.day,
self.test)
self.test)

# Get NameList
namelist_file = open(model_path + 'sami2py-1.00.namelist')
Expand Down Expand Up @@ -186,7 +186,7 @@ def _load_model(self):
ti = np.loadtxt(path.join(model_path, 'tif.dat'))
te = np.loadtxt(path.join(model_path, 'tef.dat'))

#get neutral values
# get neutral values
if self.outn:
denn = np.loadtxt(model_path+'dennf.dat')
u = np.loadtxt(model_path+'u4f.dat')
Expand Down

0 comments on commit 02fe70b

Please sign in to comment.