Commit fac59718 authored by Qusai Al Shidi's avatar Qusai Al Shidi 💬

Fixed up README and made new version due to @tkeebler fix

parent 6f0f40dc
......@@ -19,11 +19,10 @@ Clone into the directory you want to use it.
$ git clone https://gitlab.umich.edu/swmf_sofware/swmfpy.git /path/to/my/dir
```
Then go to its directory and run [pip](https://pip.pypa.io/en/stable/) to install. Make sure to include `--user`.
Then install with [pip](https://pip.pypa.io/en/stable/):
```bash
$ cd SWMF/share/Python/swmfpy # or your clone directory
$ pip install --user .
SWMF$ pip install --user share/Python/swmfpy # or your clone directory
```
*Note*: Depending on your system [pip](https://pip.pypa.io/en/stable/) may be ran in several ways: `pip`, `pip3`, or `python3 -m pip`
......
......@@ -13,7 +13,7 @@ with open('requirements.txt') as fh_requirements:
setuptools.setup(
name='swmfpy',
version='2020.2',
version='2020.3',
author='Qusai Al Shidi',
author_email='qusai@umich.edu',
description='''A collection of tools for the Space Weather Modelling
......
......@@ -33,6 +33,7 @@ def replace_command(parameters, input_file, output_file='PARAM.in'):
Examples:
```python
change = {}
change['\043SOLARWINDFILE'] = [['T', 'UseSolarWindFile'],
['new_imf.dat', 'NameSolarWindFile']]
# This will overwrite PARAM.in
......@@ -63,11 +64,10 @@ def replace_command(parameters, input_file, output_file='PARAM.in'):
lines[line_num+param+1] = newline + '\n'
# Write the PARAM.in file
if output_file is None:
return lines # Break if None output_file (not default behaviour)
with open(output_file, 'w') as outfile:
for line in lines:
outfile.write(line)
if output_file is not None:
with open(output_file, 'w') as outfile:
for line in lines:
outfile.write(line)
return lines
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment