Skip to content

Commit

Permalink
Updates binary installation options (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
benfasoli committed Jun 23, 2020
1 parent 5475d83 commit dadfb92
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 374 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install R
uses: r-lib/actions/setup-r@v1
- name: Install STILT
run: ./setup 3
run: ./setup 2
- name: Install R dependencies
run: Rscript r/dependencies.r
- name: Run simulation test
Expand Down
7 changes: 3 additions & 4 deletions .gitignore
Expand Up @@ -2,11 +2,10 @@
out/*
_rslurm*

# Distributions of pre-compiled binaries
fortran/*
!fortran/makefile

# System compilation outputs
fortran/*
*.bak
*.a
*.o
*.so
exe/hymodelc
Expand Down
18 changes: 9 additions & 9 deletions .test
Expand Up @@ -6,21 +6,21 @@
git clone https://github.com/uataq/stilt-tutorials

# Replace {{project}} and {{wd}}
sed -i 's|{{project}}|stilt-test|g' r/run_stilt.r
sed -i "s|file.path('{{wd}}', project)|getwd()|g" r/run_stilt.r
sed -i.bak 's|{{project}}|stilt-test|g' r/run_stilt.r
sed -i.bak "s|file.path('{{wd}}', project)|getwd()|g" r/run_stilt.r

# Set receptor and footprint information
sed -i 's|2015-06-18 22:00:00|2015-12-10 00:00:00|g' r/run_stilt.r
sed -i 's|xmn <- NA|xmn <- -112.30|g' r/run_stilt.r
sed -i 's|xmx <- NA|xmx <- -111.52|g' r/run_stilt.r
sed -i 's|ymn <- NA|ymn <- 40.39|g' r/run_stilt.r
sed -i 's|ymx <- NA|ymx <- 40.95|g' r/run_stilt.r
sed -i.bak 's|2015-06-18 22:00:00|2015-12-10 00:00:00|g' r/run_stilt.r
sed -i.bak 's|xmn <- NA|xmn <- -112.30|g' r/run_stilt.r
sed -i.bak 's|xmx <- NA|xmx <- -111.52|g' r/run_stilt.r
sed -i.bak 's|ymn <- NA|ymn <- 40.39|g' r/run_stilt.r
sed -i.bak 's|ymx <- NA|ymx <- 40.95|g' r/run_stilt.r

# Set met_directory
sed -i "s|'/uufs/chpc.utah.edu/common/home/lin-group6/hrrr/data/utah'|file.path(stilt_wd, 'stilt-tutorials/01-wbb/met')|g" r/run_stilt.r
sed -i.bak "s|'/uufs/chpc.utah.edu/common/home/lin-group6/hrrr/data/utah'|file.path(stilt_wd, 'stilt-tutorials/01-wbb/met')|g" r/run_stilt.r

# Minimize run duration
sed -i 's|n_hours <- -24|n_hours <- -1|g' r/run_stilt.r
sed -i.bak 's|n_hours <- -24|n_hours <- -1|g' r/run_stilt.r

# Print r/run_stilt.r for diagnostics
cat r/run_stilt.r
Expand Down
334 changes: 0 additions & 334 deletions fortran/makefile

This file was deleted.

2 changes: 1 addition & 1 deletion r/stilt_cli.r
Expand Up @@ -40,7 +40,7 @@ if (!all(req_args %in% names(args))) {
for (i in 1:99) {
if ('stilt_wd' %in% names(args)) break
cwd <- dir()
is_stilt <- all(c('exe', 'fortran', 'r', 'README.md', 'setup') %in% cwd)
is_stilt <- all(c('exe', 'r', 'README.md', 'setup') %in% cwd)
if (is_stilt) {
args$stilt_wd <- getwd()
} else {
Expand Down

0 comments on commit dadfb92

Please sign in to comment.