-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from nichollsh/cond
Updates to condensation and file storage
- Loading branch information
Showing
64 changed files
with
2,211 additions
and
5,777,417 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"julia.environmentPath": "${workspaceFolder}/", | ||
"editor.tabSize": 4, | ||
"editor.rulers": [ 92 ], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "AGNI" | ||
uuid = "ede838c1-9ec3-4ebe-8ae8-da4091b3f21c" | ||
authors = ["Harrison Nicholls <[email protected]>"] | ||
version = "0.5.3" | ||
version = "0.6.0" | ||
|
||
[deps] | ||
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
# Build AGNI | ||
ROOT_DIR=abspath(joinpath(dirname(abspath(PROGRAM_FILE)),"..")) | ||
println("ROOT_DIR = $ROOT_DIR") | ||
|
||
# Find socrates | ||
RAD_DIR = abspath(ENV["RAD_DIR"]) | ||
println("RAD_DIR = $RAD_DIR") | ||
|
||
# Generate wrappers | ||
println("Generate wrappers") | ||
wrap = joinpath(RAD_DIR, "julia/src/generate_wrappers.jl") | ||
include(wrap) | ||
|
||
# Build libSOCRATES | ||
println("Build libSOCRATES") | ||
cd(joinpath(RAD_DIR,"julia/lib/")) do | ||
run(`make`) | ||
end | ||
|
||
# Download basic data | ||
println("Get data") | ||
get_data = joinpath(ROOT_DIR,"get_data.sh") | ||
run(`bash $get_data basic`) | ||
|
||
println("Build completed") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
# Manual | ||
# Development manual | ||
|
||
This page documents functions and data structures within the code. | ||
## Contributing | ||
If you are interested in contributing to the model, please contact the developers using the information on the main page. | ||
|
||
## Coding style | ||
- Indentation uses 4 spaces, no tabs. | ||
- Function names should be lowercase, with words separated by underscores . | ||
- Lines should aim to have a length of no more than 92 characters. | ||
- All functions should have docstrings, ideally with Arguments and Returns listed. | ||
- More comments are always better, even if they seem redundant. | ||
- Use type hinting where possible. | ||
- Print statements should be made through the logger where possible. | ||
- The core package code should not contain global variables, except in the phys module. | ||
|
||
## Code reference | ||
|
||
*To be completed*. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
#!/bin/bash | ||
# Download and unpack required and/or optional data | ||
# All files can be found on OSF at https://osf.io/8dumn/ | ||
|
||
# Check that curl is installed | ||
if ! [ -x "$(command -v curl)" ]; then | ||
echo 'ERROR: curl is not installed.' >&2 | ||
exit 1 | ||
fi | ||
|
||
# Root and resources folders | ||
root=$(dirname $(realpath $0)) | ||
res="$root/res/" | ||
|
||
# Make basic data folders | ||
mkdir -p $res | ||
mkdir -p "$res/spectral_files" | ||
mkdir -p "$res/stellar_spectra" | ||
|
||
# Help strings | ||
help_basic="Get the basic data required to run the model" | ||
help_highres="Get a spectral file with many high-resolution opacities" | ||
help_steam="Get pure-steam spectral files" | ||
help_stellar="Get a collection of stellar spectra" | ||
help="\ | ||
Helper script used to download and unpack data used to run the model. | ||
Call structure: | ||
./get_data [TARGET] | ||
Where [TARGET] can be any of the following: | ||
basic | ||
$help_basic | ||
highres | ||
$help_highres | ||
steam | ||
$help_steam | ||
stellar | ||
$help_stellar | ||
" | ||
|
||
# Generic OSF downloader function | ||
function osf { | ||
# $1 = OSF identifier | ||
# $2 = target folder | ||
# $3 = target filename | ||
|
||
# target file path | ||
tgt="$2/$3" | ||
rm -f $tgt | ||
echo " $1 > $tgt" | ||
|
||
# get data | ||
mkdir -p $2 | ||
curl -LsS "https://osf.io/download/$1/" > $tgt | ||
} | ||
|
||
# Handle user input | ||
case $1 in | ||
"basic") | ||
echo $help_basic | ||
|
||
osf qmp4e $res/spectral_files/Oak/318/ Oak.sf | ||
osf 5fxr7 $res/spectral_files/Oak/318/ Oak.sf_k | ||
|
||
osf heuza $res/spectral_files/Dayspring/48/ Dayspring.sf | ||
osf c5jv3 $res/spectral_files/Dayspring/48/ Dayspring.sf_k | ||
|
||
osf b5gsh $res/spectral_files/Dayspring/256/ Dayspring.sf | ||
osf dn6wh $res/spectral_files/Dayspring/256/ Dayspring.sf_k | ||
|
||
osf 2qdu8 $res/stellar_spectra sun.txt | ||
;; | ||
|
||
"highres") | ||
echo $help_highres | ||
|
||
osf p672d $res/spectral_files/Honeyside/4096/ Honeyside.sf | ||
osf ujb4z $res/spectral_files/Honeyside/4096/ Honeyside.sf_k | ||
;; | ||
|
||
"steam") | ||
echo $help_steam | ||
|
||
osf 6rvfe $res/spectral_files/Frostflow/16/ Frostflow.sf | ||
osf kxve8 $res/spectral_files/Frostflow/16/ Frostflow.sf_k | ||
|
||
osf 9n6mw $res/spectral_files/Frostflow/48/ Frostflow.sf | ||
osf xfap8 $res/spectral_files/Frostflow/48/ Frostflow.sf_k | ||
|
||
osf mnvyq $res/spectral_files/Frostflow/256/ Frostflow.sf | ||
osf tzsgc $res/spectral_files/Frostflow/256/ Frostflow.sf_k | ||
;; | ||
|
||
"stellar") | ||
echo $help_stellar | ||
osf mabp2 $res/stellar_spectra trappist-1.txt | ||
osf rk7mj $res/stellar_spectra eps-eri.txt | ||
osf agsrq $res/stellar_spectra hd97658.txt | ||
osf ehfsy $res/stellar_spectra gj1214.txt | ||
;; | ||
|
||
*) | ||
echo "$help" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
echo "Done!" | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/bin/bash | ||
# Download and compile fastchem | ||
|
||
# Download via HTTPS only | ||
fcpath="fastchem" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/bin/bash | ||
# Download and compile socrates | ||
|
||
# Check SSH access to GitHub | ||
ssh -T [email protected] | ||
|
Oops, something went wrong.