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

Absorb GLDAS scripts #1014

Closed
KateFriedman-NOAA opened this issue Sep 6, 2022 · 11 comments · Fixed by #1018
Closed

Absorb GLDAS scripts #1014

KateFriedman-NOAA opened this issue Sep 6, 2022 · 11 comments · Fixed by #1018
Assignees
Labels
feature New feature or request maintenance Regular updates and maintenance work

Comments

@KateFriedman-NOAA
Copy link
Member

KateFriedman-NOAA commented Sep 6, 2022

Description

As part of the overarching goal of moving global workflow scripts out of component repositories and under global workflow, all of the scripts currently linked in GLDAS should be moved to global-workflow. FYI @HelinWei-NOAA , please let us know of any concerns, questions, or objections. Once we absorb the following scripts you can remove them in your GLDAS repo.

Scripts to be absorbed:

Requirements

All GLDAS jobs, scripts, and ush scripts that are currently linked by global workflow added to the global workflow repo instead and removed from the ignore list.

Acceptance Criteria (Definition of Done)

No jobs, scripts, or ush scripts linked from GLDAS.

Dependencies

None

@KateFriedman-NOAA KateFriedman-NOAA added feature New feature or request maintenance Regular updates and maintenance work labels Sep 6, 2022
@KateFriedman-NOAA KateFriedman-NOAA self-assigned this Sep 6, 2022
@HelinWei-NOAA
Copy link
Contributor

I don't think there will be any issue as long as the right path is given in the scripts.

@KateFriedman-NOAA
Copy link
Member Author

I don't think there will be any issue as long as the right path is given in the scripts.

Great! Yep, I'll be making the necessary workflow-side updates related to paths and such. :)

KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 8, 2022
- Remove GLDAS JJOB script from ignore file.
- Remove GLDAS exscript from ignore file.
- Remove GLDAS ush scripts from ignore file.

Refs NOAA-EMC#1014
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 8, 2022
- Remove symlink creation for GLDAS scripts in the workflow link script.
- Removal includes JJOB, ex-script, and ush script symlinks.

Refs NOAA-EMC#1014
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 8, 2022
- Initial copy of GLDAS JJOB, exscript, and ush scripts from GLDAS
repo into global-workflow.

Refs NOAA-EMC#1014
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 8, 2022
- Convert from ksh to bash.
- Convert backticks to substitutions.
- Add preamble.
- Remove announcements and general cleanup.

Refs NOAA-EMC#1014
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 12, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 12, 2022
- Remove references to WCOSS_DELL_P3 and WCOSS_C in GLDAS scripts.
- Update $HOMEgfs variable in GLDAS preable source lines to address
warnings from linter regarding:
1) HOMEgfs is referenced but not assigned.
2) Prefer putting braces around variable references even when not strictly required.

Refs NOAA-EMC#1014
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 12, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 12, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 12, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 12, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 12, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 12, 2022
- Address SC2016 (double instead of single quote for ERRSCRIPT
and SC2250 (curly braces).

Refs NOAA-EMC#1014
@KateFriedman-NOAA
Copy link
Member Author

@HelinWei-NOAA It does not appear that ush/gldas_archive.sh or gldas_post.sh are invoked at runtime. I checked both my test logs and the ops GLDAS log. Is there any reason to keep either of those scripts? If not, I will not pull them into global-workflow. Thanks!

KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 13, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 13, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 13, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 13, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 13, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 13, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 13, 2022
- Mostly address "referenced but not assigned" warnings

Refs NOAA-EMC#1014
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 13, 2022
@HelinWei-NOAA
Copy link
Contributor

@KateFriedman-NOAA Both scripts are invoked by exgdas_atmos_gldas.sh. gldas_archive.sh is turn on only for offline gldas run. But I am surprise that gldas_post.sh isn't invoked at runtime. Can you point me to your log file running gldas? Thanks.

@KateFriedman-NOAA
Copy link
Member Author

gldas_archive.sh is turn on only for offline gldas run.

Good to know, thanks!

But I am surprise that gldas_post.sh isn't invoked at runtime. Can you point me to your log file running gldas?

I checked both the ops 00z gldas job logs and my own testing logs:

Ops logs from 00z last night (/lfs/h1/ops/prod/output/20220914/gdas_atmos_gldas_00.o19964486):

kate.friedman@clogin08:/lfs/h1/ops/prod/output> grep gldas_archive.sh 20220914/gdas_atmos_gldas_00.o19964486
kate.friedman@clogin08:/lfs/h1/ops/prod/output> grep gldas_post.sh 20220914/gdas_atmos_gldas_00.o19964486                                                               
kate.friedman@clogin08:/lfs/h1/ops/prod/output> 

My test logs on Cactus:

kate.friedman@clogin08:/lfs/h2/emc/ptmp/kate.friedman/comrot/devcyc768c> pwd
/lfs/h2/emc/ptmp/kate.friedman/comrot/devcyc768c
kate.friedman@clogin08:/lfs/h2/emc/ptmp/kate.friedman/comrot/devcyc768c> grep gldas_post.sh logs/*/gdasgldas.log                                                          
kate.friedman@clogin08:/lfs/h2/emc/ptmp/kate.friedman/comrot/devcyc768c> 

@HelinWei-NOAA
Copy link
Contributor

@KateFriedman-NOAA If you just search gldas_post, you can find one in the log.

line 114656 of gdas_atmos_gldas_00.o19964486
pgm=gldas_post

This is part of gldas_post.sh. So it is invoked at runtime.

@KateFriedman-NOAA
Copy link
Member Author

The gldas_post exec is invoked by both the scripts/exgdas_atmos_gldas.sh script and the gldas_post.sh script but in ops and in my testing the gldas_post exec is only invoked from scripts/exgdas_atmos_gldas.sh. The gldas_post.sh script isn't invoked in ops or developer parallel testing. When would it be invoked? In offline mode like gldas_archive.sh?

@HelinWei-NOAA
Copy link
Contributor

@KateFriedman-NOAA You are right. I can confirm that gldas_post.sh is not invoked at runtime. Thanks.

@KateFriedman-NOAA
Copy link
Member Author

Thanks @HelinWei-NOAA ! Since gldas_post.sh is not invoked at runtime is there any reason to keep it?

Related question...how does one run GLDAS in offline mode and invoke gldas_archive.sh? Thanks!

@HelinWei-NOAA
Copy link
Contributor

HelinWei-NOAA commented Sep 14, 2022

There is no reason to keep gldas_post.sh. We need to set OFFLINE_GLDAS = "YES" to invoke gldas_arch.sh in the offline driver submit_test_gdas_gldas_dell.sh. We haven't updated this driver for a long time.

@KateFriedman-NOAA
Copy link
Member Author

KateFriedman-NOAA commented Sep 14, 2022

There is no reason to keep gldas_post.sh.

Ok, thanks @HelinWei-NOAA for confirming! I will delete it from my global-workflow branch and not include it in the GLDAS script absorption.

We need to set OFFLINE_GLDAS = "YES" to invoke gldas_arch.sh in the offline driver submit_test_gdas_gldas_dell.sh. We haven't updated this driver for a long time.

Gotcha, thanks for explaining! Since gldas_archive.sh isn't used at runtime, would only be used in offline mode, and appears to need updating (since it references nemsio still) I will also forgo including it in the GLDAS script absorption into global-workflow. I'll leave it to you to decide what's best for it's possible future use within the GLDAS repo. Should we stick with GLDAS in the future GFSv17 system and the need to support offline GLDAS via global-workflow comes up, we can add an updated version of gldas_archive.sh into global-workflow.

Let me know if you have any objections to the above. Thanks!

KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 14, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 14, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 14, 2022
After discussion with GLDAS code manager and confirming what GLDAS
scripts are actually used at runtime, it was decided to not bring
the ush/gldas_archive.sh and ush/gldas_post.sh scripts from GLDAS
into global-workflow.

Deleting them from this branch.

Refs NOAA-EMC#1014
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 14, 2022
- Add USE_CFP and CFP_MP settings into gldas block in WCOSS2.env.
- When on WCOSS2 the gldas job should use CFP (USE_CFP=YES) but not use
the line counter value in the generated cfile (CFP_MP=NO).

Related to work happening in the GLDAS script absorption issue NOAA-EMC#1014.

Refs NOAA-EMC#419
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 14, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 14, 2022
- Remove checks for machine in ush/gldas_get_data.sh and replace with
existing CFP variables in system (USE_CFP and CFP_MP).
- Update Hera and Orion env files to set USE_CFP and CFP_MP as needed.
- Similar env variable settings will be added into WCOSS2.env in that branch.

Refs NOAA-EMC#1014
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 14, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 14, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 14, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 14, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 19, 2022
- Updates to set GLDAS fix files based on FRAC_GRID setting.
- Update scripts/exgdas_atmos_gldas.sh to set FIXgldas subfolder
based on value of FRAC_GRID: use "frac_grid" subfolder when .true.
or use "nonfrac_grid" subfolder when .false.
- Move FRAC_GRID variable from config.fcst to config.base since it will
now be used in more than just the forecast job.
- Also correct FIXgldas default in scripts/exgdas_atmos_gldas.sh to
add missing "/fix_gldas" path.

Refs NOAA-EMC#1014
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 19, 2022
…a.sh

- Update GLDAS scripts and config.fcst to address linter/shellcheck warnings.
- Update gldas_get_data.sh and gldas_process_data.sh to pass $iter variable
as argument in gldas_process_data.sh and give to preamble.

Refs NOAA-EMC#1014
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 19, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 19, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 19, 2022
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 20, 2022
- Add missing indentation into ush/gldas_forcing.sh and ush/gldas_get_data.sh.

Refs NOAA-EMC#1014
KateFriedman-NOAA added a commit to KateFriedman-NOAA/global-workflow that referenced this issue Sep 22, 2022
- Provide a value of "1" for new exit statements in GLDAS JJOB script.

Refs NOAA-EMC#1014
KateFriedman-NOAA added a commit that referenced this issue Sep 22, 2022
Absorb GLDAS scripts into global-workflow and fix GLDAS job by updating scripts to use new GLDAS fix file set.

* Remove GLDAS scripts from .gitignore
* Remove GLDAS script symlinks from link_workflow.sh
* Add GLDAS scripts to global-workflow
* Updates to GLDAS scripts, includes converting GLDAS script to replace machine checks with CFP variables
* Address linter warnings and remove obsolete platforms

Refs #622 #1014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request maintenance Regular updates and maintenance work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants