-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
author LenkaNovak <lenka@caltech.edu> 1711486536 -0700 committer LenkaNovak <lenka@caltech.edu> 1713181226 -0700 slab ocean cpu + GPU add CAD plots, short 1d 1d inst proj cmakie to amip project 100d init hs fix config for hs paths up hs diagnostics turn off hourly_checkpoint fix comms ctx hs gorcing and 200d hs gorcing and 200d ttsecs
- Loading branch information
1 parent
fcb4232
commit faacbf2
Showing
13 changed files
with
1,074 additions
and
12 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,25 @@ | ||
# useful functions to abstract the driver code | ||
|
||
function setup_output_dirs(; output_dir = nothing, regrid_dir = nothing, artifacts_dir = nothing, comms_ctx = nothing) | ||
if output_dir === nothing | ||
output_dir = "." | ||
end | ||
if regrid_dir === nothing | ||
regrid_dir = joinpath(output_dir, "regrid_tmp/") | ||
end | ||
if artifacts_dir === nothing | ||
artifacts_dir = output_dir * "_artifacts" | ||
end | ||
|
||
if !isnothing(comms_ctx) && ClimaComms.iamroot(comms_ctx) | ||
@info(output_dir) | ||
mkpath(output_dir) | ||
mkpath(regrid_dir) | ||
mkpath(artifacts_dir) | ||
end | ||
|
||
!isnothing(comms_ctx) ? ClimaComms.barrier(comms_ctx) : nothing | ||
|
||
return (; output = output_dir, artifacts = artifacts_dir, regrid = regrid_dir) | ||
|
||
end |
Oops, something went wrong.