-
Notifications
You must be signed in to change notification settings - Fork 210
Remove Direct Linking to COM from DATA for wavepostsbs Job
#3303
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 all commits
c0ec095
e8ddc88
f2669df
b06793b
a417365
66269bd
5f59736
13dca27
f7d3bfc
971cafb
53f7378
a674b8b
173d413
514fd35
2b2c234
007e1ac
849feb7
ae24fbd
dc52172
cf52ba5
20e2808
519767e
ec3dca7
79b2926
901860f
89f6112
b9978c3
b5eaebb
f53e11c
f3d9244
92f4ea5
2b73e50
eb3f5f1
3a03f57
3664e90
5919393
53f59f1
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 |
|---|---|---|
|
|
@@ -169,11 +169,11 @@ if [[ ! -s "${com_dir}/${outfile}.idx" ]]; then | |
| fi | ||
|
|
||
| if (( fhr > 0 )); then | ||
| ${WGRIB2} gribfile -set_date "${PDY}${cyc}" -set_ftime "${fhr} hour fcst" -grib "${com_dir}/${outfile}" | ||
| ${WGRIB2} gribfile -set_date "${PDY}${cyc}" -set_ftime "${fhr} hour fcst" -grib "${outfile}" | ||
| err=$? | ||
| else | ||
| ${WGRIB2} gribfile -set_date "${PDY}${cyc}" -set_ftime "${fhr} hour fcst" \ | ||
| -set table_1.4 1 -set table_1.2 1 -grib "${com_dir}/${outfile}" | ||
| -set table_1.4 1 -set table_1.2 1 -grib "${outfile}" | ||
| err=$? | ||
| fi | ||
|
|
||
|
|
@@ -183,27 +183,52 @@ if [[ ! -s "${com_dir}/${outfile}.idx" ]]; then | |
| echo '********************************************* ' | ||
| echo "*** FATAL ERROR : ERROR IN ${pgm} *** " # FIXME: This is not an error in $pgm, but in WGRIB2 | ||
| echo '********************************************* ' | ||
| echo ' ' | ||
| echo " " | ||
| set_trace | ||
| exit 3 | ||
| fi | ||
|
|
||
| # Create index | ||
| ${WGRIB2} -s "${com_dir}/${outfile}" > "${com_dir}/${outfile}.idx" | ||
| ${WGRIB2} -s "${outfile}" > "${outfile}.idx" | ||
|
|
||
| # Create grib2 subgrid is this is the source grid | ||
| # Create grib2 subgrid if this is the source grid | ||
| if [[ "${grdID}" = "${WAV_SUBGRBSRC}" ]]; then | ||
| for subgrb in ${WAV_SUBGRB}; do | ||
| subgrbref=$(echo ${!subgrb} | cut -d " " -f 1-20) | ||
| subgrbnam=$(echo ${!subgrb} | cut -d " " -f 21) | ||
| subgrbres=$(echo ${!subgrb} | cut -d " " -f 22) | ||
| subfnam="${WAV_MOD_TAG}.${cycle}${ENSTAG}.${subgrbnam}.${subgrbres}.f${FH3}.grib2" | ||
| ${COPYGB2} -g "${subgrbref}" -i0 -x "${com_dir}/${outfile}" "${com_dir}/${subfnam}" | ||
| ${WGRIB2} -s "${com_dir}/${subfnam}" > "${com_dir}/${subfnam}.idx" | ||
| ${COPYGB2} -g "${subgrbref}" -i0 -x "${outfile}" "${subfnam}" | ||
| ${WGRIB2} -s "${subfnam}" > "${subfnam}.idx" | ||
| done | ||
| fi | ||
|
|
||
| # 1.e Save in /com | ||
| # Move grib files to COM directory | ||
| if [[ -s "${outfile}" ]] && [[ -s "${outfile}.idx" ]]; then | ||
| cpfs "${outfile}" "${com_dir}/${outfile}" | ||
| cpfs "${outfile}.idx" "${com_dir}/${outfile}.idx" | ||
| echo "Copied ${outfile} and ${outfile}.idx from ${GRIBDATA} to COM" | ||
| else | ||
| echo "FATAL ERROR: ${outfile} and ${outfile}.idx not found in ${GRIBDATA} to copy to COM" | ||
| exit 4 | ||
| fi | ||
|
|
||
| if [[ "${grdID}" = "${WAV_SUBGRBSRC}" ]]; then | ||
| for subgrb in ${WAV_SUBGRB}; do | ||
| subgrbnam=$(echo "${!subgrb}" | cut -d " " -f 21) | ||
| subgrbres=$(echo "${!subgrb}" | cut -d " " -f 22) | ||
| subfnam="${WAV_MOD_TAG}.${cycle}${ENSTAG}.${subgrbnam}.${subgrbres}.f${FH3}.grib2" | ||
|
AntonMFernando-NOAA marked this conversation as resolved.
|
||
| if [[ -s "${subfnam}" ]] && [[ -s "${subfnam}.idx" ]]; then | ||
|
|
||
| cpfs "${subfnam}" "${com_dir}/${subfnam}" | ||
| cpfs "${subfnam}.idx" "${com_dir}/${subfnam}.idx" | ||
| echo "Copied ${subfnam} and ${subfnam}.idx from ${GRIBDATA} to COM" | ||
| else | ||
| echo "FATAL ERROR: ${subfnam} and ${subfnam}.idx not found in ${GRIBDATA} to copy to COM" | ||
| exit 4 | ||
| fi | ||
| done | ||
|
|
||
| fi | ||
|
|
||
| if [[ ! -s "${com_dir}/${outfile}" ]]; then | ||
| set +x | ||
|
|
@@ -232,16 +257,14 @@ if [[ ! -s "${com_dir}/${outfile}.idx" ]]; then | |
|
|
||
| if [[ "${SENDDBN}" = 'YES' ]] && [[ ${outfile} != *global.0p50* ]]; then | ||
| set +x | ||
| echo " Alerting GRIB file as ${com_dir}/${outfile}" | ||
| echo " Alerting GRIB index file as ${com_dir}/${outfile}.idx" | ||
| echo " Alerting GRIB file as ${outfile}" | ||
|
Contributor
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. Should the com_dir be removed from this?
Contributor
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. @JessicaMeixner-NOAA After the L255 the
Contributor
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. this is just an echo. its fine to be either. the crucial line is the |
||
| echo " Alerting GRIB index file as ${outfile}.idx" | ||
| set_trace | ||
| "${DBNROOT}/bin/dbn_alert" MODEL "${alertName}_WAVE_GB2" "${job}" "${com_dir}/${outfile}" | ||
| "${DBNROOT}/bin/dbn_alert" MODEL "${alertName}_WAVE_GB2_WIDX" "${job}" "${com_dir}/${outfile}.idx" | ||
| else | ||
| echo "${outfile} is global.0p50 or SENDDBN is NO, no alert sent" | ||
| fi | ||
|
|
||
|
|
||
| # --------------------------------------------------------------------------- # | ||
| # 3. Clean up the directory | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.