-
Notifications
You must be signed in to change notification settings - Fork 1
Update spin up soil IC #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ph-kev
wants to merge
1
commit into
main
Choose a base branch
from
kp/spun-up-soil
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,62 @@ | ||
| #!/bin/bash | ||
|
|
||
| # This script is largely based off of `run_water_conservation_exp.sh` in | ||
| # `water_conservation_test`. | ||
|
|
||
| # This script checks out a specific commit of the ClimaLand.jl GitHub | ||
| # repository, and uses it to run the snowy land simulation which is running | ||
| # `ClimaLand.jl/experiments/long_runs/snowy_land.jl`. After the simulation | ||
| # is completed, the script prints the file path of the diagnostics in the | ||
| # terminal. This is the argument to `create_artifacts.jl`. Note that this | ||
| # script requires juliaup to be installed. | ||
|
|
||
| # Inform the user that the script requires one input argument, if it is not | ||
| # provided | ||
| [[ $# -lt 2 ]] && echo "Error! Usage: $0 <sim_dir> <true/false>" && exit 0 | ||
|
|
||
| output_dir=$1 | ||
| use_cuda=$2 | ||
|
|
||
| # Validate the second argument is true or false | ||
| if ! [[("$use_cuda" == "true") || ("$use_cuda" == "false")]]; then | ||
| echo "The second argument can only be true or false" | ||
| exit 0 | ||
| fi | ||
|
|
||
| # Parse the input argument for the output directory | ||
| mkdir -p $output_dir | ||
|
|
||
| # Go into newly created directory | ||
| cd $output_dir | ||
|
|
||
| # Clone the ClimaLand.jl repository | ||
| git clone https://github.com/CliMA/ClimaLand.jl.git | ||
| cd ClimaLand.jl | ||
|
|
||
| # Checkout the commit that was used to create the spun up soil initial | ||
| # conditions | ||
| git -c advice.detachedHEAD=false checkout 797a9b78253c61e9973d1808877145ef5c301155 | ||
|
|
||
| # Use the same version of Julia that the long run was done on | ||
| juliaup add 1.11.3 | ||
| julia +1.11.3 --project -e 'using Pkg; Pkg.instantiate(;verbose=true)' | ||
| julia +1.11.3 --project -e 'using Pkg; Pkg.status()' | ||
| julia +1.11.3 --project=.buildkite -e 'using Pkg; Pkg.instantiate(;verbose=true)' | ||
| julia +1.11.3 --project=.buildkite -e 'using Pkg; Pkg.precompile()' | ||
|
|
||
| if "$use_cuda" == "true" | ||
| then | ||
| echo "Using CUDA" | ||
| export CLIMACOMMS_DEVICE="CUDA" | ||
| julia +1.11.3 --project=.buildkite -e 'using CUDA; CUDA.precompile_runtime()' | ||
| fi | ||
|
|
||
| julia +1.11.3 --project=.buildkite -e 'using Pkg; Pkg.status()' | ||
|
|
||
| echo "Running snowy land simulation, this might take a while" | ||
| julia +1.11.3 --color=yes --project=.buildkite experiments/long_runs/snowy_land.jl | ||
|
|
||
| # Print the output_active directory by finding the symbolic link and print the | ||
| # absolute path | ||
| echo "Copy the file path below and use it as the input for create_artifacts.jl:" | ||
| find . -type l -ls | head -n 1 | awk '{print $11}' | xargs readlink -f | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if this is the right commit?
It corresponds to this commit: CliMA/ClimaLand.jl@797a9b7