Skip to content

Commit ab4cf09

Browse files
authored
Merge pull request #198 from VirtualPlanetaryLaboratory/dev
Dev
2 parents 82cc635 + 9fd845e commit ab4cf09

File tree

7 files changed

+51
-32
lines changed

7 files changed

+51
-32
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ merge-from-private.sh
4848
vplot_config.py
4949
*.bst
5050
*.aux
51-
*.bbl
51+
*.bpa
52+
*.bpf
5253
*.blg
5354
*/build
5455
*/dist

docs/parametersweep.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,11 @@ Here’s the input file for :code:`BigPlanet`:
146146

147147
.. code-block:: bash
148148
149-
sSrcFolder ~/vplanet/examples/EarthInterior
150149
sDestFolder ParameterSweep
151150
sArchiveFile ParameterSweep.bpa
151+
sOutputFile ParameterSweep.bpf
152152
153-
saBodyFiles sun.in earth.in
154-
153+
saBodyFiles earth.in sun.in
155154
sPrimaryFile vpl.in
156155
157156
saKeyInclude earth:TCore:initial earth:40KPowerCore:final earth:RIC:final
@@ -160,9 +159,10 @@ Here’s the input file for :code:`BigPlanet`:
160159
This will create an `HDF5
161160
<https://en.wikipedia.org/wiki/Hierarchical_Data_Format>`_ file
162161
that shares the same name as the destfolder from the :code:`VSPACE` file, but with ".bpf" or ".bpa"
163-
appended, e.g. ParameterSweep.bpa. This file will now replace the directory structure
164-
created by :code:`VSPACE`. The -a option is for creation of an achvie file, which has **everything from
165-
the destfolder created with :code:`VSPACE` and the data generated from :code:`MultiPlanet`. Here is a
162+
appended, depending on what type of BigPlanet file. In this case, we are creating ParameterSweep.bpf.
163+
This file will now replace the directory structure created by :code:`VSPACE`.
164+
The -a option is for creation of an archive file (the .bpa file), which has **everything** from
165+
the destfolder created with :code:`VSPACE` and the data generated from :code:`MultiPlanet`.
166166

167167
.. note::
168168

docs/run_examples.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
path = pathlib.Path(__file__).parents[0].absolute()
88

99
# gets the list of examples
10-
example_list = glob.glob(str(path.parents[0] / "examples" / "*" / "makeplot.py"))
10+
example_list = sorted(glob.glob(str(path.parents[0] / "examples" / "*" / "makeplot.py")))
1111

1212
# list of examples that should not be ran in the test
13-
no_fly_list = ["AbioticO2", "ChaoticResonances", "DampedCBP", "TidalEarth", "SS_NBody"]
14-
13+
no_fly_list = ["AbioticO2", "ChaoticResonances", "DampedCBP", "TidalEarth", "SS_NBody", "MagneticBreaking"]
1514

1615
for example in example_list:
16+
print(example)
1717

1818
# Example name
1919
name = pathlib.Path(example).parents[0].name

environment.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@ dependencies:
66
- pip>=20.3.3
77
- scipy>=1.5.2
88
- setuptools>=51.3.3
9+
#- cm-super
10+
#- texlive-fonts-recommended
11+
#- texlive-fonts-extra
12+
#- dvipng
913
- pip:
10-
- matplotlib>=3.3.3
11-
- nose>=1.3.7
12-
- parameterized>=0.8.1
13-
- pytest>=6.2.4
14-
- pytest-dependency>=0.5.1
15-
- pytest-env>=0.6.2
16-
- pytest-cov>=2.11.1
17-
- sphinx>=4.0.1
18-
- breathe>=4.30.0
19-
- sphinxcontrib-bibtex>=2.2.0
20-
- coverage>=5.5
14+
- matplotlib>=3.3.3
15+
- nose>=1.3.7
16+
- parameterized>=0.8.1
17+
- pytest>=6.2.4
18+
- pytest-dependency>=0.5.1
19+
- pytest-env>=0.6.2
20+
- pytest-cov>=2.11.1
21+
- sphinx>=4.0.1
22+
- breathe>=4.30.0
23+
- sphinxcontrib-bibtex>=2.2.0
24+
- coverage>=5.5

examples/HLossTides/makeplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
mpl.rcParams["font.size"] = 10.0
1717

1818
# Run vplanet
19-
cplauto = vplanet.run(path / "Lopez12CPL" / "auto" / "vpl.in", units=False)
19+
cplauto = vplanet.run(path / "Lopez12CPL" / "Auto" / "vpl.in", units=False)
2020
cplbondi = vplanet.run(path / "Lopez12CPL" / "Bondi" / "vpl.in", units=False)
2121
cplelim = vplanet.run(path / "Lopez12CPL" / "ELim" / "vpl.in", units=False)
2222
cplrr = vplanet.run(path / "Lopez12CPL" / "RR" / "vpl.in", units=False)

examples/ParameterSweep/bpl.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
sDestFolder ParameterSweep
2+
sArchiveFile ParameterSweep.bpa
3+
sOutputFile ParameterSweep.bpf
4+
5+
saBodyFiles earth.in sun.in
6+
sPrimaryFile vpl.in
7+
8+
saKeyInclude earth:TCore:initial earth:40KPowerCore:final earth:RIC:final

examples/ParameterSweep/makeplot.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,33 @@
2020

2121
# Run multi-planet
2222
if not (path / ".ParameterSweep").exists():
23-
subprocess.check_output(["multi-planet", "vspace.in"], cwd=path)
23+
subprocess.check_output(["multiplanet", "vspace.in"], cwd=path)
2424

2525
# Run bigplanet
2626
if not (path / ".ParameterSweep_BPL").exists():
27-
subprocess.check_output(["bigplanet", "vspace.in"], cwd=path)
27+
subprocess.check_output(["bigplanet", "bpl.in"], cwd=path)
2828

29-
data = bp.BPLFile(path / "ParameterSweep.bpl")
29+
data = bp.BPLFile(path / "ParameterSweep.bpf")
3030

3131
mpl.rcParams["figure.figsize"] = (10, 8)
3232
fig = plt.figure()
3333

34-
RIC = bp.ExtractColumn(data, "earth_RIC_final")
35-
RIC_units = bp.ExtractUnits(data, "earth_RIC_final")
34+
RIC = bp.ExtractColumn(data, "earth:RIC:final")
35+
RIC_units = bp.ExtractUnits(data, "earth:RIC:final")
3636

37-
TCore_uniq = bp.ExtractUniqueValues(data, "earth_TCore_initial")
38-
TCore_units = bp.ExtractUnits(data, "earth_TCore_initial")
37+
TCore_uniq = bp.ExtractUniqueValues(data, "earth:TCore:initial")
38+
TCore_units = bp.ExtractUnits(data, "earth:TCore:initial")
3939

40-
K40_uniq = bp.ExtractUniqueValues(data, "earth_40KPowerCore_final")
41-
K40_units = bp.ExtractUnits(data, "earth_40KPowerCore_final")
40+
K40_uniq = bp.ExtractUniqueValues(data, "earth:40KPowerCore:final")
41+
K40_units = bp.ExtractUnits(data, "earth:40KPowerCore:final")
4242

43-
RIC_Matrix = bp.CreateMatrix(TCore_uniq, K40_uniq, RIC)
43+
44+
45+
print(TCore_uniq)
46+
47+
RIC_Matrix = np.reshape(RIC,(len(TCore_uniq),len(K40_uniq)))
48+
49+
#RIC_Matrix = bp.CreateMatrix(TCore_uniq, K40_uniq, RIC)
4450

4551
contours = [0, 500, 1000, 1500, 2000, 2500]
4652
xlabel = "Initial Core Temperature (" + TCore_units + ")"

0 commit comments

Comments
 (0)