Skip to content
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

Remove Direct Linking to COM from DATA for wavepostsbs Job #3303

Open
wants to merge 33 commits into
base: develop
Choose a base branch
from

Conversation

AntonMFernando-NOAA
Copy link
Contributor

@AntonMFernando-NOAA AntonMFernando-NOAA commented Feb 5, 2025

Description

Type of change

  • Bug fix (fixes something broken)
  • New feature (adds functionality)
  • Maintenance (code refactor, clean-up, new CI test, etc.)

Change characteristics

  • Is this a breaking change (a change in existing functionality)? NO
  • Does this change require a documentation update? NO
  • Does this change require an update to any of the following submodules? NO
    • EMC verif-global
    • GDAS
    • GFS-utils
    • GSI
    • GSI-monitor
    • GSI-utils
    • UFS-utils
    • UFS-weather-model
    • wxflow

How has this been tested?

  • CI tests on HERA

Checklist

  • Any dependent changes have been merged and published
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have documented my code, including function, input, and output descriptions
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • This change is covered by an existing CI test or a new one has been added
  • Any new scripts have been added to the .github/CODEOWNERS file with owners
  • I have made corresponding changes to the system documentation if necessary

ush/wave_grib2_sbs.sh Fixed Show fixed Hide fixed
ush/wave_grib2_sbs.sh Fixed Show fixed Hide fixed
ush/wave_grib2_sbs.sh Fixed Show fixed Hide fixed
ush/wave_grib2_sbs.sh Fixed Show fixed Hide fixed
ush/wave_grib2_sbs.sh Fixed Show fixed Hide fixed
ush/wave_grib2_sbs.sh Fixed Show fixed Hide fixed
ush/wave_grib2_sbs.sh Fixed Show fixed Hide fixed
ush/wave_grib2_sbs.sh Fixed Show fixed Hide fixed
ush/wave_grib2_sbs.sh Fixed Show fixed Hide fixed
ush/wave_grib2_sbs.sh Fixed Show fixed Hide fixed
ush/wave_grib2_sbs.sh Fixed Show fixed Hide fixed
ush/wave_grib2_sbs.sh Fixed Show fixed Hide fixed
@AntonMFernando-NOAA AntonMFernando-NOAA changed the title Remove Direct Linking from COM into DATA for wavepostsbs Job Remove Direct Linking to COM from DATA for wavepostsbs Job Feb 5, 2025
@AntonMFernando-NOAA AntonMFernando-NOAA requested review from sbanihash and removed request for sbanihash February 5, 2025 18:55
Copy link
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments and requested a change that will definitely fail

ush/wave_grib2_sbs.sh Outdated Show resolved Hide resolved
ush/wave_grib2_sbs.sh Outdated Show resolved Hide resolved
ush/wave_grib2_sbs.sh Show resolved Hide resolved
ush/wave_grib2_sbs.sh Outdated Show resolved Hide resolved
ush/wave_grib2_sbs.sh Fixed Show fixed Hide fixed
ush/wave_grib2_sbs.sh Fixed Show fixed Hide fixed
ush/wave_grib2_sbs.sh Fixed Show fixed Hide fixed
@AntonMFernando-NOAA AntonMFernando-NOAA marked this pull request as ready for review February 13, 2025 18:28
@AntonMFernando-NOAA
Copy link
Contributor Author

@aerorahul Some checks of the last commit were not successful because the cpfs command is not defined or not recognized as a standard command.

@AntonMFernando-NOAA AntonMFernando-NOAA self-assigned this Feb 13, 2025
ush/wave_grib2_sbs.sh Outdated Show resolved Hide resolved
ush/wave_grib2_sbs.sh Outdated Show resolved Hide resolved
ush/wave_grib2_sbs.sh Outdated Show resolved Hide resolved
ush/wave_grib2_sbs.sh Outdated Show resolved Hide resolved
@AntonMFernando-NOAA
Copy link
Contributor Author

AntonMFernando-NOAA commented Feb 14, 2025

@aerorahul Ran two CI tests on HERCULES with the current branch.
C48_S2SWA_gefs case: /work2/noaa/global/antonf/RUNTESTS/COMROOT/gefs1
C48_S2SW case: /work2/noaa/global/antonf/RUNTESTS/COMROOT/gfs1
Gridded files don't seem to change compared to the dev branch.

Copy link
Contributor

@JessicaMeixner-NOAA JessicaMeixner-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some minor comments. I have not run tests myself, but if this gives you the same answers as develop, we should be okay.

cpfs "${outfile}.idx" "${com_dir}/${outfile}.idx"
echo "Copied ${outfile} and ${outfile}.idx from ${GRIBDATA} to COM"
else
echo "${outfile} and ${outfile}.idx not found in ${GRIBDATA} to copy to COM"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be an error?

Copy link
Contributor Author

@AntonMFernando-NOAA AntonMFernando-NOAA Feb 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JessicaMeixner-NOAA What this does is copying the ${outfile} to the COM directory, after the GRIB packing program is run. We are trying to first run the GRIB packing program in the working directory and then move the grib and .idx files to the COM dir. Is this what you are concerned about?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's great! Thanks for these updates. What I'm concerned with is if the grib and .idx files do not exist, then perhaps that should be an error message and not just simply a " echo "${outfile} and ${outfile}.idx not found" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JessicaMeixner-NOAA "${outfile} and ${outfile}.idx not found in ${GRIBDATA} to copy to COM Currently, this is the error message. What changes would you recommend for this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it say something like "ERROR: explanation" and then exit instead of continuing on?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JessicaMeixner-NOAA I will revise the script based on your suggestion. Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JessicaMeixner-NOAA I reviewed the script again, and it turns out the issue is addressed in the if blocks (L233-256). However, it only checks the COM files. So, I think your suggestion is correct.

@@ -232,16 +255,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}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the com_dir be removed from this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JessicaMeixner-NOAA After the L255 the grib and the .idx files should be in both the COM directory and the working directory, since the working directory is not removed yet. So, this should run without an error if those files exist in both dirs. If @aerorahul thinks this is not correct I can change it. But I think this should be correct because we need an alert to send for the files available in COM dir, while checking the files in the working directory.

Copy link
Contributor

Choose a reason for hiding this comment

The 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 dbn_alert that alerts the correct path of this file from com_dir.

cpfs "${subfnam}.idx" "${com_dir}/${subfnam}.idx"
echo "Copied ${subfnam} and ${subfnam}.idx from ${GRIBDATA} to COM"
else
echo "${subfnam} and ${subfnam}.idx not found in ${GRIBDATA} to copy to COM"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same above.

Copy link
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove direct linking to COM from DATA for wavepostsbs job
3 participants