Skip to content

Copy forecast files to COM and alert them as they are created#48

Closed
RussellManser-NCO wants to merge 1 commit intoNOAA-EMC:production/mlglobal.v1from
RussellManser-NCO:copy_files
Closed

Copy forecast files to COM and alert them as they are created#48
RussellManser-NCO wants to merge 1 commit intoNOAA-EMC:production/mlglobal.v1from
RussellManser-NCO:copy_files

Conversation

@RussellManser-NCO
Copy link

@RussellManser-NCO RussellManser-NCO commented Sep 16, 2025

Instead of creating a forecast manager job, here is a proposal for copying/alerting forecast files as they are created.

Wrong branch, my apologies. I will fix that tomorrow.

@aerorahul aerorahul changed the base branch from main to production/mlglobal.v1 September 16, 2025 20:56
Comment on lines +171 to +191
if COMOUT is not None:
for outfile in [outfile_sfc, outfile_pres]:
proc = run_subproc([f"{CPOUT}", f"{outfile_pres}", f"{COMOUT}"])
proc = run_subproc([f"{CPOUT}", f"{outfile_pres}.idx", f"{COMOUT}"])
if SENDDBN is not None:
proc = run_subproc(
[f"{DBNROOT}/bin/dbn_alert",
"MODEL",
f"{prefix.upper()}_GB2",
f"{job}",
f"{COMOUT}/{os.path.basename(outfile)}"
]
)
proc = run_subproc(
[f"{DBNROOT}/bin/dbn_alert",
"MODEL",
f"{prefix.upper()}_GB2_IDX",
f"{job}",
f"{COMOUT}/{os.path.basename(outfile)}.idx"
]
)
Copy link
Contributor

Choose a reason for hiding this comment

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

A couple items:

  • mlglobal does not need to know about the COM or DBN or prefix, does it? These are handled in the applications AIGFS and AIGEFS.
  • run_subproc means that one has to come out of the python interpretor, and jump into a subshell -- this should be avoided.

We are going to remove the idx file generation from the forecast integration, which creates the grib2 file using a converter object. The forecast_manager would be used for several other purposes:

  • generate the idx file
  • copy to COM from DATA
  • add triggers for post-processing for the forecast hour

@RussellManser-NCO
Copy link
Author

See #53 for the newest solution.

aerorahul added a commit that referenced this pull request Sep 26, 2025
This PR calls `set_event.sh` to trigger post jobs for aigfs (see
NOAA-EMC/aigfs#4). Post jobs in in NOAA-EMC/aigfs#4 create grib2 .idx
files and copy fiels to COM. This PR replaces #48.
---------

Co-authored-by: Rahul Mahajan <aerorahul@users.noreply.github.com>
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.

2 participants