forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Stat Analysis Implementation for global-workflow #8
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
Closed
Closed
Changes from all commits
Commits
Show all changes
84 commits
Select commit
Hold shift + click to select a range
c7fa90a
Update and add scripts for analysis stats capabilities
kevindougherty-noaa b154521
pynorms
kevindougherty-noaa e3d015a
pynorms
kevindougherty-noaa f745d3d
update missed files
kevindougherty-noaa c04eb6a
update task names to include underscores
kevindougherty-noaa cccd670
solved issue of job not running, files in wrong directory
kevindougherty-noaa cfb9f25
update to include execute and finalize
kevindougherty-noaa 899b20b
updated scripts to that run successfully
kevindougherty-noaa 164f7e4
Merge branch 'develop' into feature/stat-analysis
kevindougherty-noaa 3d09d46
merge develop
kevindougherty-noaa 452aff0
Merge branch 'develop' into HEAD
kevindougherty-noaa 840153a
update files
kevindougherty-noaa ae48429
fix merge conflicts
kevindougherty-noaa ba89a3f
Revert "updated scripts to that run successfully"
kevindougherty-noaa 5b8e7b1
updated scripts to that run successfully
kevindougherty-noaa 6bcd080
reverting commits that were causing issues
kevindougherty-noaa 76e60b1
fix descrepancies with workflow/applications files
kevindougherty-noaa 332cede
pycodestyle
kevindougherty-noaa 74c7888
pynorms
kevindougherty-noaa 6687c41
add snow jcb-base yaml
kevindougherty-noaa cb4a703
update aero jcb-base yaml to no longer include variables
kevindougherty-noaa d0a7a3d
small bug fixes
kevindougherty-noaa e1209dd
merge develop
kevindougherty-noaa 254ccc9
merge develop
kevindougherty-noaa 0c1ba04
update gfs_cycled.py
kevindougherty-noaa bec7451
update applications.py
kevindougherty-noaa 3e50690
update gfs_cycled.py correctly
kevindougherty-noaa fff3e76
update workflow tasks correctly
kevindougherty-noaa 32b8a7a
update gfs tasks
kevindougherty-noaa 9fe7e20
updates to python scripts to handle snow ob spaces
kevindougherty-noaa 1454c0f
fix pycodestyle issues
kevindougherty-noaa e05e241
Update jobs/JGLOBAL_ANALYSIS_STATS
kevindougherty-noaa 6cfcc48
Update scripts/exglobal_analysis_stats.py
kevindougherty-noaa 7d4b161
Update scripts/exglobal_analysis_stats.py
kevindougherty-noaa 388c58b
basic updated suggestions i.e. variable changes, EOL, etc.
kevindougherty-noaa 74974a9
Merge branch 'feature/stat-analysis' of https://github.com/CoryMartin…
kevindougherty-noaa 4055c99
added checks to python scripts. fixed formatting of job
kevindougherty-noaa f8f6a7b
update to utilize config file in driver python script
kevindougherty-noaa b53a9d8
pycodestyle
kevindougherty-noaa 69e06b8
Merge branch 'develop' into feature/stat-analysis
kevindougherty-noaa f75140c
remove STAT_OUTDIR from shell, need to still do it in py
CoryMartin-NOAA 0676314
use different names for the output directory
CoryMartin-NOAA d8994cd
a todo note
CoryMartin-NOAA e1f04f3
minor change and add outdir check
kevindougherty-noaa 3082f41
Merge branch 'develop' into feature/stat-analysis
kevindougherty-noaa eb6cb96
Merge branch 'develop' into feature/stat-analysis
kevindougherty-noaa 54c6946
minor updates with name changes and new aero tar file
kevindougherty-noaa f2d5c7f
updated scripts for atmos obs type capabilities
kevindougherty-noaa ed0840c
Merge branch 'develop' into feature/stat-analysis
CoryMartin-NOAA ab421ed
add additional env files for other machines
CoryMartin-NOAA 11f515c
update config.base
CoryMartin-NOAA 0b2ad0e
update config.resources to parallelize anlstat
CoryMartin-NOAA ad14c55
update stat base config
CoryMartin-NOAA 3266de0
link stat parm from GDASApp
CoryMartin-NOAA 7772cb5
move parm/gdas/stat to gdas.cd repo
CoryMartin-NOAA bf69854
commit changes before meeting/lunch
CoryMartin-NOAA fc7297e
more cosmetic changes
CoryMartin-NOAA 6a66ce4
add default DO_ANLSTAT NO
CoryMartin-NOAA 84da1a6
coding norms
CoryMartin-NOAA 1c1567e
update for anlstat to work
CoryMartin-NOAA 667657c
fix issues found by Russ
CoryMartin-NOAA 6a6a0bd
commit before merge develop
CoryMartin-NOAA d9bc737
Merge branch 'develop' into feature/stat-analysis
CoryMartin-NOAA 32bb77f
Merge branch 'develop' into feature/stat-analysis
CoryMartin-NOAA 3b825ce
Merge branch 'develop' into feature/stat-analysis
CoryMartin-NOAA 3578a5c
commit that is working
CoryMartin-NOAA 6f5ce48
Merge remote-tracking branch 'origin/develop' into feature/stat-analysis
CoryMartin-NOAA f30bc5d
Merge remote-tracking branch 'origin/develop' into feature/stat-analysis
CoryMartin-NOAA b94ce4b
update gdas submodule hash
CoryMartin-NOAA 15e98df
Merge remote-tracking branch 'origin/develop' into feature/stat-analysis
CoryMartin-NOAA 19aea3a
Merge remote-tracking branch 'origin/develop' into feature/stat-analysis
CoryMartin-NOAA 0ad2435
update GDAS hash and add to CODEOWNERS
CoryMartin-NOAA 33f21aa
Address reviewer comments
CoryMartin-NOAA fd37d19
Merge remote-tracking branch 'origin/develop' into feature/stat-analysis
CoryMartin-NOAA d25b1a6
Apply suggestions from code review
CoryMartin-NOAA fd0df02
Merge branch 'develop' into feature/stat-analysis
580cff0
logger fix
6855718
Merge remote-tracking branch 'upstream/develop' into feature/stat-ana…
CoryMartin-NOAA 83d203d
Merge branch 'feature/stat-analysis' of https://github.com/corymartin-…
CoryMartin-NOAA ffc4b6a
Merge remote-tracking branch 'upstream/develop' into feature/stat-ana…
CoryMartin-NOAA 7fbb0a3
Apply suggestions from code review
CoryMartin-NOAA ca43bcc
Merge branch 'develop' into feature/stat-analysis
CoryMartin-NOAA b520325
Update jobs/rocoto/anlstat.sh
DavidHuber-NOAA ddfd868
Merge branch 'develop' into feature/stat-analysis
DavidHuber-NOAA File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| #! /usr/bin/env bash | ||
|
|
||
| source "${HOMEgfs}/ush/jjob_header.sh" -e "anlstat" -c "base anlstat" | ||
|
|
||
| ############################################## | ||
| # Set variables used in the script | ||
| ############################################## | ||
|
|
||
|
|
||
| ############################################## | ||
| # Begin JOB SPECIFIC work | ||
| ############################################## | ||
|
|
||
| # Generate COM variables from templates | ||
| YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COMIN_OBS:COM_OBS_TMPL \ | ||
| COMIN_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL \ | ||
| COMIN_OCEAN_ANALYSIS:COM_OCEAN_ANALYSIS_TMPL \ | ||
| COMIN_AERO_ANALYSIS:COM_CHEM_ANALYSIS_TMPL \ | ||
| COMIN_SNOW_ANALYSIS:COM_SNOW_ANALYSIS_TMPL \ | ||
| COMOUT_CONF:COM_CONF_TMPL \ | ||
| COMOUT_ATMOS_ANLMON:COM_ATMOS_ANLMON_TMPL \ | ||
| COMOUT_OCEAN_ANLMON:COM_OCEAN_ANLMON_TMPL \ | ||
| COMOUT_AERO_ANLMON:COM_CHEM_ANLMON_TMPL \ | ||
| COMOUT_SNOW_ANLMON:COM_SNOW_ANLMON_TMPL | ||
|
|
||
| ############################################################### | ||
| # Run relevant script | ||
|
|
||
| EXSCRIPT=${ANLSTATSPY:-${SCRgfs}/exglobal_analysis_stats.py} | ||
| ${EXSCRIPT} | ||
| export err=$?; err_chk | ||
|
|
||
| ############################################## | ||
| # End JOB SPECIFIC work | ||
| ############################################## | ||
|
|
||
| ############################################## | ||
| # Final processing | ||
| ############################################## | ||
| if [[ -e "${pgmout}" ]] ; then | ||
| cat "${pgmout}" | ||
| fi | ||
|
|
||
| exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #! /usr/bin/env bash | ||
|
|
||
| set -x | ||
|
|
||
| ############################################################### | ||
| # Source UFSDA workflow modules | ||
| . "${HOMEgfs}/ush/load_ufsda_modules.sh" | ||
| err=$? | ||
| if [[ ${err} -ne 0 ]]; then | ||
| echo "FATAL ERROR Failed to load UFSDA modules!" | ||
| exit "${err}" | ||
| fi | ||
|
|
||
| export job="anlstat" | ||
| export jobid="${job}.$$" | ||
|
|
||
| ############################################################### | ||
| # Execute the JJOB | ||
| "${HOMEgfs}/jobs/JGLOBAL_ANALYSIS_STATS" | ||
| exit $? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #!/bin/bash -x | ||
|
|
||
| ########## config.anlstat ########## | ||
| # Analysis Stat | ||
|
|
||
| echo "BEGIN: config.anlstat" | ||
|
|
||
| # Get task specific resources | ||
| source "${EXPDIR}/config.resources" anlstat | ||
|
|
||
| export JEDI_CONFIG_YAML="${PARMgfs}/gdas/anlstat_jedi_config.yaml.j2" | ||
| export STAT_BASE_CONFIG_YAML="${PARMgfs}/config/gfs/yaml/stat_base_config.yaml.j2" | ||
| export JCB_BASE_YAML="${PARMgfs}/gdas/stat/aero/jcb-base.yaml.j2" | ||
| export JCB_ALGO_YAML="${PARMgfs}/gdas/jcb-algorithms/anlstat.yaml.j2" | ||
| export JEDIEXE="${HOMEgfs}/sorc/gdas.cd/build/bin/ioda-stats.x" | ||
|
|
||
| echo "END: config.anlstat" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| aero: | ||
| stat_file_path: '{{ COMIN_AERO_ANALYSIS }}' | ||
| stat_file_name: 'aerostat.tgz' | ||
| obs spaces: | ||
| - name: viirs_npp | ||
| input file: "diag_viirs_npp_aod_{{ current_cycle | to_YMDH }}.nc" | ||
| output file: "viirs_npp_{{ current_cycle | to_YMDH }}_output_aod.nc" | ||
| - name: viirs_n20 | ||
| input file: "diag_viirs_n20_aod_{{ current_cycle | to_YMDH }}.nc" | ||
| output file: "viirs_n20_{{ current_cycle | to_YMDH }}_output_aod.nc" | ||
|
|
||
| atmos: | ||
| stat_file_path: '{{ COMIN_ATMOS_ANALYSIS }}' | ||
| stat_file_name: 'atmstat' | ||
| obs spaces: | ||
| - name: conventional_ps | ||
| input file: "diag_conventional_ps_{{ current_cycle | to_YMDH }}.nc" | ||
| output file: "conventional_ps_{{ current_cycle | to_YMDH }}_output_atmos.nc" | ||
|
|
||
| snow: | ||
| stat_file_path: '{{ COMIN_SNOW_ANALYSIS }}' | ||
| stat_file_name: 'snowstat.tgz' | ||
| obs spaces: | ||
| - name: ims_snow | ||
| input file: "diag_ims_snow_{{ current_cycle | to_YMDH }}.nc" | ||
| output file: "ims_snow_{{ current_cycle | to_YMDH }}_output_snow.nc" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| aero: | ||
| rundir: '{{ DATA }}' | ||
| exe_src: '{{ JEDIEXE }}' | ||
| mpi_cmd: '{{ APRUN_ANLSTAT }}' | ||
| # jedi_args: None | ||
| jcb_base_yaml: '{{ PARMgfs }}/gdas/stat/aero/jcb-base.yaml.j2' | ||
| jcb_algo_yaml: '{{ JCB_ALGO_YAML }}' | ||
| jcb_algo: 'anlstat' | ||
| atmos: | ||
| rundir: '{{ DATA }}' | ||
| exe_src: '{{ JEDIEXE }}' | ||
| mpi_cmd: '{{ APRUN_ANLSTAT }}' | ||
| # jedi_args: None | ||
| jcb_base_yaml: '{{ PARMgfs }}/gdas/stat/atmos/jcb-base.yaml.j2' | ||
| jcb_algo_yaml: '{{ JCB_ALGO_YAML }}' | ||
| jcb_algo: 'anlstat' | ||
| snow: | ||
| rundir: '{{ DATA }}' | ||
| exe_src: '{{ JEDIEXE }}' | ||
| mpi_cmd: '{{ APRUN_ANLSTAT }}' | ||
| # jedi_args: None | ||
| jcb_base_yaml: '{{ PARMgfs }}/gdas/stat/snow/jcb-base.yaml.j2' | ||
| jcb_algo_yaml: '{{ JCB_ALGO_YAML }}' | ||
| jcb_algo: 'anlstat' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| #!/usr/bin/env python3 | ||
|
|
||
| # exglobal_analysis_stats.py | ||
| # This script creates a AnalysisStats class | ||
| # and runs the initialize, execute, and finalize | ||
| # methods which create and stage the runtime directory | ||
| # and create the YAML configuration | ||
| # to produce summary statistics from the desired analyses | ||
| import os | ||
|
|
||
| from wxflow import Logger, cast_strdict_as_dtypedict | ||
| from pygfs.task.analysis_stats import AnalysisStats | ||
|
|
||
| # Initialize root logger | ||
| logger = Logger(level='DEBUG', colored_log=True) | ||
|
|
||
|
|
||
| if __name__ == '__main__': | ||
|
|
||
| # Take configuration from environment and cast it as python dictionary | ||
| config = cast_strdict_as_dtypedict(os.environ) | ||
|
|
||
| # Instantiate the atm analysis task | ||
| AnlStats = AnalysisStats(config) | ||
|
|
||
| # Create list based on DA components | ||
| AnlStats.task_config['STAT_ANALYSES'] = [] | ||
| if AnlStats.task_config.DO_AERO_ANL: | ||
| AnlStats.task_config['STAT_ANALYSES'].append('aero') | ||
| if AnlStats.task_config.DO_JEDISNOWDA: | ||
| AnlStats.task_config['STAT_ANALYSES'].append('snow') | ||
| if AnlStats.task_config.DO_JEDIATMVAR: | ||
| AnlStats.task_config['STAT_ANALYSES'].append('atmos') | ||
|
|
||
| # Initialize JEDI variational analysis | ||
| AnlStats.initialize() | ||
| for anl in AnlStats.task_config.STAT_ANALYSES: | ||
| AnlStats.execute(anl) | ||
| AnlStats.finalize(anl) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.