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

Update global atmos vminmon job to use COMIN/COMOUT #2935

Conversation

mingshichen-noaa
Copy link
Contributor

Description

NCO has requested that each COM variable specify whether it is an input or an output. This completes that process for the global minimization monitor job.

Refs #2451

Type of change

  • 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

How has this been tested?

  • Clone and build on RDHPCS
  • Cycled tests on Hercules
  • Forecast-only tests on Hercules

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
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • I have made corresponding changes to the documentation if necessary

aerorahul
aerorahul previously approved these changes Sep 17, 2024
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 ok

jobs/JGLOBAL_ATMOS_VMINMON Outdated Show resolved Hide resolved
Comment on lines 20 to 21
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COMIN_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COMOUT_ATMOS_MINMON:COM_ATMOS_MINMON_TMPL
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the same thing, but a bit easier to read and conforms with other jobs.

Suggested change
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COMIN_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COMOUT_ATMOS_MINMON:COM_ATMOS_MINMON_TMPL
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL \
COMOUT_ATMOS_MINMON:COM_ATMOS_MINMON_TMPL

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@WalterKolczynski-NOAA
Yes, I will change them.

YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx COM_ATMOS_MINMON_PREV:COM_ATMOS_MINMON_TMPL
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COMIN_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COMOUT_ATMOS_MINMON:COM_ATMOS_MINMON_TMPL
YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx COMOUT_ATMOS_MINMON_PREV:COM_ATMOS_MINMON_TMPL
Copy link
Contributor

Choose a reason for hiding this comment

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

I checked the scripts. This is only used as an input.

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx COMOUT_ATMOS_MINMON_PREV:COM_ATMOS_MINMON_TMPL
YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx COMIN_ATMOS_MINMON_PREV:COM_ATMOS_MINMON_TMPL

if [[ ! -d ${M_TANKverf} ]]; then mkdir -p -m 775 "${M_TANKverf}" ; fi
if [[ ! -d ${M_TANKverfM1} ]]; then mkdir -p -m 775 "${M_TANKverfM1}" ; fi
if [[ ! -d ${M_TANKverf} ]]; then mkdir -p "${M_TANKverf}" ; fi
if [[ ! -d ${M_TANKverfM1} ]]; then mkdir -p "${M_TANKverfM1}" ; fi
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is only an input, we shouldn't be creating it.

Suggested change
if [[ ! -d ${M_TANKverfM1} ]]; then mkdir -p "${M_TANKverfM1}" ; fi

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@WalterKolczynski-NOAA
From scripts ( exglobal_atmos_vminmon.sh), these three directory variables should be input directories. Hence line 28 and 29 should be removed. Am I right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Only $M_TANKverfM1 is an input. $M_TANKverif is an output (the perl scripts write to it).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@WalterKolczynski-NOAA
After reading 3 perl files in ush (minmon_xtrct_costs.pl minmon_xtrct_gnorms.pl minmon_xtrct_reduct.pl), gsistat should be only an input file defined in jobs/JGLOBAL_ATMOS_VMINMON. This implies the following modifications:
20 YMD=${PDY} HH=${cyc} declare_from_tmpl -rx
21 COMIN_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL
22 COMOUT_ATMOS_MINMON:COM_ATMOS_MINMON_TMPL
23
24 YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx
25 COMOUT_ATMOS_MINMON_PREV:COM_ATMOS_MINMON_TMPL
26
27 export gsistat="${COMIN_ATMOS_ANALYSIS}/${RUN}.t${cyc}z.gsistat"
28 export M_TANKverf=${M_TANKverf:-${COMOUT_ATMOS_MINMON}}
29 export M_TANKverfM1=${M_TANKverfM1:-${COMOUT_ATMOS_MINMON_PREV}}
30
31 if [[ ! -d ${M_TANKverf} ]]; then mkdir -p "${M_TANKverf}" ; fi
32 if [[ ! -d ${M_TANKverfM1} ]]; then mkdir -p "${M_TANKverfM1}" ; fi
33

Copy link
Contributor

Choose a reason for hiding this comment

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

What modifications are you proposing? That looks like what is there now.

@mingshichen-noaa mingshichen-noaa deleted the feature/atmos_vminmon_com_in_out branch September 18, 2024 20:17
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.

4 participants