forked from ufs-community/uwtools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UW-590 Add --cycle and --leadtime to file tool (ufs-community#498)
- Loading branch information
1 parent
96785cd
commit a440342
Showing
20 changed files
with
173 additions
and
51 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,2 +1,4 @@ | ||
dst-copy | ||
dst-link | ||
copy-dst | ||
copy-dst-timedep | ||
link-dst | ||
link-dst-timedep |
7 changes: 7 additions & 0 deletions
7
docs/sections/user_guide/cli/tools/file/copy-config-timedep.yaml
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,7 @@ | ||
config: | ||
files: | ||
baz-{{ validtime }}: src/{{ yyyymmdd }}/{{ hh }}/{{ nnn }}/baz | ||
yyyymmdd: "{{ cycle.strftime('%Y%m%d') }}" | ||
hh: "{{ cycle.strftime('%H') }}" | ||
nnn: "{{ '%03d' % (leadtime.total_seconds() // 3600) }}" | ||
validtime: "{{ (cycle + leadtime).strftime('%Y-%m-%dT%H') }}" |
4 changes: 4 additions & 0 deletions
4
docs/sections/user_guide/cli/tools/file/copy-exec-timedep.cmd
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,4 @@ | ||
rm -rf copy-dst-timedep | ||
uw file copy --target-dir copy-dst-timedep --config-file copy-config-timedep.yaml --cycle 2024-05-29T12 --leadtime 6 config files | ||
echo | ||
tree copy-dst-timedep |
15 changes: 15 additions & 0 deletions
15
docs/sections/user_guide/cli/tools/file/copy-exec-timedep.out
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,15 @@ | ||
[2024-05-29T16:50:14] INFO Validating config against internal schema files-to-stage | ||
[2024-05-29T16:50:14] INFO 0 UW schema-validation errors found | ||
[2024-05-29T16:50:14] INFO File copies: Initial state: Pending | ||
[2024-05-29T16:50:14] INFO File copies: Checking requirements | ||
[2024-05-29T16:50:14] INFO Copy src/20240529/12/006/baz -> copy-dst-timedep/baz-2024-05-29T18: Initial state: Pending | ||
[2024-05-29T16:50:14] INFO Copy src/20240529/12/006/baz -> copy-dst-timedep/baz-2024-05-29T18: Checking requirements | ||
[2024-05-29T16:50:14] INFO Copy src/20240529/12/006/baz -> copy-dst-timedep/baz-2024-05-29T18: Requirement(s) ready | ||
[2024-05-29T16:50:14] INFO Copy src/20240529/12/006/baz -> copy-dst-timedep/baz-2024-05-29T18: Executing | ||
[2024-05-29T16:50:14] INFO Copy src/20240529/12/006/baz -> copy-dst-timedep/baz-2024-05-29T18: Final state: Ready | ||
[2024-05-29T16:50:14] INFO File copies: Final state: Ready | ||
|
||
copy-dst-timedep | ||
└── baz-2024-05-29T18 | ||
|
||
1 directory, 1 file |
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,4 @@ | ||
rm -rf dst-copy | ||
uw file copy --target-dir dst-copy --config-file copy-config.yaml config files | ||
rm -rf copy-dst | ||
uw file copy --target-dir copy-dst --config-file copy-config.yaml config files | ||
echo | ||
tree dst-copy | ||
tree copy-dst |
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
7 changes: 7 additions & 0 deletions
7
docs/sections/user_guide/cli/tools/file/link-config-timedep.yaml
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,7 @@ | ||
config: | ||
files: | ||
baz-{{ validtime }}: src/{{ yyyymmdd }}/{{ hh }}/{{ nnn }}/baz | ||
yyyymmdd: "{{ cycle.strftime('%Y%m%d') }}" | ||
hh: "{{ cycle.strftime('%H') }}" | ||
nnn: "{{ '%03d' % (leadtime.total_seconds() // 3600) }}" | ||
validtime: "{{ (cycle + leadtime).strftime('%Y-%m-%dT%H') }}" |
4 changes: 4 additions & 0 deletions
4
docs/sections/user_guide/cli/tools/file/link-exec-timedep.cmd
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,4 @@ | ||
rm -rf link-dst-timedep | ||
uw file link --target-dir link-dst-timedep --config-file link-config-timedep.yaml --cycle 2024-05-29T12 --leadtime 6 config files | ||
echo | ||
tree link-dst-timedep |
15 changes: 15 additions & 0 deletions
15
docs/sections/user_guide/cli/tools/file/link-exec-timedep.out
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,15 @@ | ||
[2024-05-29T16:50:14] INFO Validating config against internal schema files-to-stage | ||
[2024-05-29T16:50:14] INFO 0 UW schema-validation errors found | ||
[2024-05-29T16:50:14] INFO File links: Initial state: Pending | ||
[2024-05-29T16:50:14] INFO File links: Checking requirements | ||
[2024-05-29T16:50:14] INFO Link link-dst-timedep/baz-2024-05-29T18 -> src/20240529/12/006/baz: Initial state: Pending | ||
[2024-05-29T16:50:14] INFO Link link-dst-timedep/baz-2024-05-29T18 -> src/20240529/12/006/baz: Checking requirements | ||
[2024-05-29T16:50:14] INFO Link link-dst-timedep/baz-2024-05-29T18 -> src/20240529/12/006/baz: Requirement(s) ready | ||
[2024-05-29T16:50:14] INFO Link link-dst-timedep/baz-2024-05-29T18 -> src/20240529/12/006/baz: Executing | ||
[2024-05-29T16:50:14] INFO Link link-dst-timedep/baz-2024-05-29T18 -> src/20240529/12/006/baz: Final state: Ready | ||
[2024-05-29T16:50:14] INFO File links: Final state: Ready | ||
|
||
link-dst-timedep | ||
└── baz-2024-05-29T18 -> ../src/20240529/12/006/baz | ||
|
||
1 directory, 1 file |
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,4 @@ | ||
rm -rf dst-link | ||
uw file link --target-dir dst-link --config-file link-config.yaml config files | ||
rm -rf link-dst | ||
uw file link --target-dir link-dst --config-file link-config.yaml config files | ||
echo | ||
tree dst-link | ||
tree link-dst |
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
1 change: 1 addition & 0 deletions
1
docs/sections/user_guide/cli/tools/file/src/20240529/12/006/baz
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 @@ | ||
baz |
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
Oops, something went wrong.