-
Notifications
You must be signed in to change notification settings - Fork 16
Fix regex for tc_analysis #723
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
Changes from 1 commit
8282f73
51cfff8
0d69d1b
ccb7835
0bc4974
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,7 @@ topography_file=`echo $(ncks --trd -M -m ${first_file} | grep -E -i "^global att | |
| echo "topography_file=${topography_file}" | ||
| res={{ res }} | ||
| pg2=false | ||
| if [[ $topography_file =~ /[^_]*_([^_]*)_.*nc ]]; then | ||
| if [[ ${topography_file##*/} =~ [^_]*_([^_]*)_.*nc ]]; then | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the command line: Perlmutter: Chrysalis: It appears all the cases work out.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm thinking we can use following to make it more robust: filename="${topography_file##*/}" This will robustly extract the grid substring from filenames with the pattern neXnp4pg2. |
||
| grid=${BASH_REMATCH[1]} | ||
| echo "grid=${grid}" | ||
| if [[ -z "${res}" ]]; then | ||
|
|
||
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.
(Question 1) So should I add a
pg2parameter or is it fine to leave it auto-determined?