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

Generalize getges_driver COM lookback #19

Conversation

WalterKolczynski-NOAA
Copy link

The upcoming update to GFS v17 will substantially change the COM paths for the GFS package. This requires updates to the lookback capability of getges_driver where it checks previous cycles. Rather than add additional logical branches to handle new COM patterns, the process is generalized by instead doing a string substitution to replace the current day and cycle with those for the prior cycle. This method is backwards compatible and should work for any path as long as it contains ${PDY}/${cyc}.

Additional changes will likely be needed for GFSv17 to run prepobs stand- alone (as in ops) to match the new $COMINgdas and $COMINgfs, but these changes work when running prepobs as part of global workflow in development.

Also, I have not otherwise modified the existing style of the scripts, redefining $COMINgdas and $COMINgfs. However, this will need to be changed before GFSv17 to stop overwriting these variables to meet NCO requirements (see NOAA-EMC/global-workflow#293).

Refs: #17
Refs: NOAA-EMC/global-workflow#761

The upcoming update to GFS v17 will substantially change the COM paths
for the GFS package. This requires updates to the lookback capability of
getges_driver where it checks previous cycles. Rather than add additional
logical branches to handle new COM patterns, the process is generalized by
instead doing a string substitution to replace the current day and cycle
with those for the prior cycle. This method is backwards compatible and
should work for any path as long as it contains `${PDY}/${cyc}`.

Additional changes will likely be needed for GFSv17 to run prepobs stand-
alone (as in ops) to match the new `$COMINgdas` and `$COMINgfs`, but
these changes work when running prepobs as part of global workflow in
development.

Also, I have not otherwise modified the existing style of the scripts,
redefining `$COMINgdas` and `$COMINgfs`. However, this will need to be
changed before GFSv17 to stop overwriting these variables to meet NCO
requirements (see NOAA-EMC/global-workflow#293).

Refs: NOAA-EMC#17
Refs: NOAA-EMC/global-workflow#761
Copy link
Member

@KateFriedman-NOAA KateFriedman-NOAA 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 and I like that it's backwards compatible. Can likely get this update into whatever comes next for prepobs in ops. Need to test some more and discuss with @ilianagenkova and @ShelleyMelchior-NOAA but this works for current GFSv17 COM reorg development.

@ilianagenkova
Copy link
Collaborator

@KateFriedman-NOAA @WalterKolczynski-NOAA
I understand the need for path update and backward compatibility, and I appreciate your work on it, but what's driving the need to replace COMINgdas_root with COMINgdas_orig?

We will test prepobs's feature/GFSv17_com_reorg and let you know how it goes.

@WalterKolczynski-NOAA
Copy link
Author

@KateFriedman-NOAA @WalterKolczynski-NOAA I understand the need for path update and backward compatibility, and I appreciate your work on it, but what's driving the need to replace COMINgdas_root with COMINgdas_orig?

We will test prepobs's feature/GFSv17_com_reorg and let you know how it goes.

COMINgdas_orig isn't a substitute for COMINgdas_root, it is something different. Previously, the script had to know the full structure of the GFS output so it could back up the tree to COMIN*_root, then extend it again with new dates. Now, it just looks for the date and cycle in the path and substitutes them without altering the rest of the path; it doesn't care how many additional directory levels are below the substitution point.

Also, as noted in the PR, the *_orig variables are only used because the originals are currently being overwritten, but my understanding is that NCO does not like that and a different variable should be used when changing the cycle. At that point, the *_orig variables won't be needed anymore.

@ilianagenkova
Copy link
Collaborator

@WalterKolczynski-NOAA , thanks for the explanation!
@AshleyStanfield-NOAA , let's work on testing this branch, thanks!

@ilianagenkova
Copy link
Collaborator

Sorry, @WalterKolczynski-NOAA , where do you define COMINgdas and COMINgfs and what do they point to, b/f using them in:
COMINgdas_orig="${COMINgdas}"
COMINgfs_orig="${COMINgfs}"

@WalterKolczynski-NOAA
Copy link
Author

Sorry, @WalterKolczynski-NOAA , where do you define COMINgdas and COMINgfs and what do they point to, b/f using them in: COMINgdas_orig="${COMINgdas}" COMINgfs_orig="${COMINgfs}"

It should be the full path to the directory that holds the desired files. For GFS v16, that would be:
${PATH_TO_GFS}/gdas.${PDY}/${cyc}/atmos

For GFS v17, the provisional plan is:
${PATH_TO_GFS}/gdas.${PDY}/${cyc}/model_data/atmos/history

See the global-workflow PR noted in this PR for more information about the new GFS COM structure and how we have centralized the definition for all these paths for GFS v17 (the files prepobs look for are in the path defined by $COM_ATMOS_HISTORY_TMPL).

KateFriedman-NOAA and others added 2 commits April 17, 2023 20:11
Add Jet support to GFSv17 COM reorg branch
@ilianagenkova
Copy link
Collaborator

@AshleyStanfield-NOAA:

  1. do a test obsproc run with Walter's prepobs branch , everything 'as is'
  2. if 1) fails, add to jglobal_prep "export COMINgdas=${PATH_TO_GFS}/gdas.${PDY}/${cyc}/model_data/atmos/history" where instead of PATH_TO_GFS, you could use HOMEgfs.
  3. if 2 fails too, we will set a chat with Kate, Walter and @ShelleyMelchior-NOAA to clarify the implementation

@WalterKolczynski-NOAA
Copy link
Author

@AshleyStanfield-NOAA:

  1. do a test obsproc run with Walter's prepobs branch , everything 'as is'
  2. if 1) fails, add to jglobal_prep "export COMINgdas=${PATH_TO_GFS}/gdas.${PDY}/${cyc}/model_data/atmos/history" where instead of PATH_TO_GFS, you could use HOMEgfs.
  3. if 2 fails too, we will set a chat with Kate, Walter and @ShelleyMelchior-NOAA to clarify the implementation

(2) Won't work with any existing data, as that is only the planned path for v17. To test with existing data; use COMINgdas=${PATH_TO_GFS}/gdas.${PDY}/${cyc}/atmos and COMINgfs=${PATH_TO_GFS}/gfs.${PDY}/${cyc}/atmos

@aerorahul aerorahul merged commit 4b805ac into NOAA-EMC:feature/GFSv17_com_reorg Feb 14, 2024
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