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

Add run and finalize methods to marine LETKF task #2944

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

Conversation

AndrewEichmann-NOAA
Copy link
Contributor

@AndrewEichmann-NOAA AndrewEichmann-NOAA commented Sep 19, 2024

Description

Adds run and finalize methods to marine LETKF task, experiment yaml for gw-ci in GDASApp, workflow additions, removes bugs found on the way, and completes the bulk of the work on LETKF task. Conversion of fields to increments pending.

Partially resolves NOAA-EMC/GDASApp#1091 and NOAA-EMC/GDASApp#1251

Mutual dependency with GDASApp PR NOAA-EMC/GDASApp#1287 and IC fix file issue #2944 (comment)

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? YES (If YES, please add a link to any PRs that are pending.)
    • EMC verif-global
    • GDAS
    • GFS-utils
    • GSI
    • GSI-monitor
    • GSI-utils
    • UFS-utils
    • UFS-weather-model
    • wxflow

How has this been tested?

Example:

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

@AndrewEichmann-NOAA
Copy link
Contributor Author

Copy link
Contributor

@guillaumevernieres guillaumevernieres left a comment

Choose a reason for hiding this comment

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

We'll probably have to rearrange things between your PR and mine at some point, but this looks good to me. Thanks for doing this @AndrewEichmann-NOAA .

exec_cmd_gridgen.add_default_arg(self.task_config.GRIDGEN_EXEC)
exec_cmd_gridgen.add_default_arg(self.task_config.GRIDGEN_YAML)

try:
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this will be refactored soon, but maybe use this in the meantime marine_da_utils.py#L18 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why not

Copy link
Contributor

Choose a reason for hiding this comment

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

Add an issue and maybe also a TODO if you don't want to address this in this PR. This will be refactored when we start making use of the Jedi class.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed - I forgot about this comment

workflow/rocoto/gfs_tasks.py Outdated Show resolved Hide resolved
workflow/rocoto/gfs_tasks.py Outdated Show resolved Hide resolved
jobs/JGLOBAL_MARINE_BMAT Outdated Show resolved Hide resolved
@@ -82,12 +82,14 @@ declare -rx COM_OCEAN_HISTORY_TMPL=${COM_BASE}'/model/ocean/history'
declare -rx COM_OCEAN_RESTART_TMPL=${COM_BASE}'/model/ocean/restart'
declare -rx COM_OCEAN_INPUT_TMPL=${COM_BASE}'/model/ocean/input'
declare -rx COM_OCEAN_ANALYSIS_TMPL=${COM_BASE}'/analysis/ocean'
declare -rx COM_OCEAN_LETKF_TMPL=${COM_BASE}'/analysis/ocean/letkf'
Copy link
Contributor

Choose a reason for hiding this comment

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

What files get written to the letkf directories vs the regular component analysis directories?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are the analysis files from the LETKF, which are separate from the variational analysis files

ush/python/pygfs/task/marine_letkf.py Outdated Show resolved Hide resolved
ush/python/pygfs/task/marine_letkf.py Outdated Show resolved Hide resolved
ush/python/pygfs/task/marine_letkf.py Outdated Show resolved Hide resolved
workflow/rocoto/gfs_tasks.py Outdated Show resolved Hide resolved
env/WCOSS2.env Outdated
export NTHREADS_MARINEANALLETKF=${NTHREADSmax}
export APRUN_MARINEANALLETKF="${APRUN_default} --cpus-per-task=${NTHREADS_MARINEANALLETKF}"
export NTHREADS_MARINEANLLETKF=${NTHREADSmax}
export APRUN_MARINEANLLETKF="${APRUN_default} --cpus-per-task=${NTHREADS_MARINEANLLETKF}"
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 incorrect specification for WCOSS2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aerorahul Is there an example you could suggest to work off of? There seem to be a number of choices.

Copy link
Contributor

@aerorahul aerorahul Oct 16, 2024

Choose a reason for hiding this comment

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

Since JEDI does not yet employ threads, this could simply be:

export APRUN_MARINEANLLETKF="${APRUN_default}"

When threading do come into play,

export APRUN_MARINEANLLETKF="${APRUN_default} --ppn ${tasks_per_node}--cpu-bind depth --depth=${NTHREADS_MARINEANLLETKF}"

You could see the JEDI atm sections of this code for reference.

ush/forecast_postdet.sh Outdated Show resolved Hide resolved
aerorahul
aerorahul previously approved these changes Oct 11, 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.

some minor comments.
approved pending tests passing.

Copy link
Contributor

@WalterKolczynski-NOAA WalterKolczynski-NOAA left a comment

Choose a reason for hiding this comment

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

A couple very minor things.

workflow/rocoto/gfs_tasks.py Outdated Show resolved Hide resolved
jobs/JGLOBAL_MARINE_ANALYSIS_LETKF Outdated Show resolved Hide resolved
@WalterKolczynski-NOAA
Copy link
Contributor

Also need to resolve pynorms failures.

@WalterKolczynski-NOAA
Copy link
Contributor

@AndrewEichmann-NOAA pynorms is still failing:

checking ./ush/python/pygfs/task/marine_letkf.py
./ush/python/pygfs/task/marine_letkf.py:46:8: E114 indentation is not a multiple of 4 (comment)
./ush/python/pygfs/task/marine_letkf.py:55:78: W291 trailing whitespace
./ush/python/pygfs/task/marine_letkf.py:57:1: W293 blank line contains whitespace

https://github.com/NOAA-EMC/global-workflow/actions/runs/11376852041/job/31650003088?pr=2944

Copy link
Contributor

@guillaumevernieres guillaumevernieres left a comment

Choose a reason for hiding this comment

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

Seem inline comments

skip_ci_on_hosts:
- wcoss2
- orion
- hercules
Copy link
Contributor

Choose a reason for hiding this comment

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

This test needs to be turned off on all machines for now. The GDASApp subset of test might work, but the full gw-ci test won't.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

gaea and hera added

env/HERA.env Show resolved Hide resolved
exec_cmd_gridgen.add_default_arg(self.task_config.GRIDGEN_EXEC)
exec_cmd_gridgen.add_default_arg(self.task_config.GRIDGEN_YAML)

try:
Copy link
Contributor

Choose a reason for hiding this comment

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

Add an issue and maybe also a TODO if you don't want to address this in this PR. This will be refactored when we start making use of the Jedi class.

workflow/rocoto/gfs_tasks.py Show resolved Hide resolved
@@ -11,12 +18,19 @@ GDATE=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours")

gPDY=${GDATE:0:8}
gcyc=${GDATE:8:2}
export GDUMP="gdas"
export GDUMP_ENS="enkf${GDUMP}"
export RUN="${GDUMP}"
Copy link
Contributor

Choose a reason for hiding this comment

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

@WalterKolczynski-NOAA I don't think RUN can be assigned here. It is set at the rocoto level, correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changeed to walter' suggestion

Co-authored-by: Walter Kolczynski - NOAA <[email protected]>
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.

Add marine letkf task
4 participants