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

Refactoring of vrfy - transferred bulk of plotting to sub-script #538

Merged
merged 19 commits into from
Aug 3, 2023

Conversation

AndrewEichmann-NOAA
Copy link
Collaborator

No functional changes, just moved plotting-specific code from vrfy script to script in ush. Also cleaned up some superfluous variables.

@AndrewEichmann-NOAA AndrewEichmann-NOAA added hera-GW-RT Queue for automated testing with global-workflow on Hera orion-GW-RT Queue for automated testing with global-workflow on Orion labels Jul 17, 2023
@emcbot emcbot added hera-GW-RT-Running Automated testing with global-workflow running on Hera orion-GW-RT-Running Automated testing with global-workflow running on Orion and removed hera-GW-RT Queue for automated testing with global-workflow on Hera orion-GW-RT Queue for automated testing with global-workflow on Orion labels Jul 17, 2023
@emcbot
Copy link

emcbot commented Jul 17, 2023

Automated Global-Workflow GDASApp Testing Results:
Machine: hera

Start: Mon Jul 17 21:18:30 UTC 2023 on hfe07
---------------------------------------------------
Build:                                 *SUCCESS*
Build: Completed at Mon Jul 17 22:26:19 UTC 2023
---------------------------------------------------
Tests:                                 *SUCCESS*
Tests: Completed at Mon Jul 17 22:47:59 UTC 2023
Tests: 100% tests passed, 0 tests failed out of 53

@emcbot emcbot added hera-GW-RT-Passed Automated testing with global-workflow successful on Hera and removed hera-GW-RT-Running Automated testing with global-workflow running on Hera labels Jul 17, 2023
@emcbot
Copy link

emcbot commented Jul 17, 2023

Automated Global-Workflow GDASApp Testing Results:
Machine: orion

Start: Mon Jul 17 16:17:47 CDT 2023 on Orion-login-1.HPC.MsState.Edu
---------------------------------------------------
Build:                                 *SUCCESS*
Build: Completed at Mon Jul 17 17:32:22 CDT 2023
---------------------------------------------------
Tests:                                 *SUCCESS*
Tests: Completed at Mon Jul 17 17:55:26 CDT 2023
Tests: 100% tests passed, 0 tests failed out of 53

@emcbot emcbot added orion-GW-RT-Passed Automated testing with global-workflow successful on Orion and removed orion-GW-RT-Running Automated testing with global-workflow running on Orion labels Jul 17, 2023
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.

Still a bit of a mess ... Which I created!

1 - For the state figures, we have 4 cases that are generating similar figures, the difference being the bounds, and input files ...

Instead of splitting into plot_analysis and plot_increment, split into:

  • plot_increment
  • plot_background
  • plot_analysis
  • plot_bkgerr

Ideally, we should create a simple ViewState class that would look something like this:

class ViewState:
    def __init__(self, config_dict):
        self.config = config_dict
        self.stuff = config_dict['stuff']
        ...
        # Where config contains the bounds, filename and whatever else is needed to plot stuff

    def plot(self):
        # Loop over variables, slices (horiz and vertical) and projections ... and whatever else is needed

Now instead of having 4 separate function, you have one class that you "instantiate" 4 times with different configurations. In the ex global script, you'd do something like this:

config= ...
viewIncr = ViewState(config)
viewIncr.plot()

config= ...
viewBkg = ViewState(config)
viewBkg.plot()

config= ...
viewAna = ViewState(config)
viewAna.plot()

config= ...
viewBkgErr = ViewState(config)
viewBkgErr.plot()

That should remove quite a bit of code and make things a bit more readable.
Hope that makes sense, happy to chat if not.

2 - Move the soca_vrfy.py into ush/soca

@AndrewEichmann-NOAA
Copy link
Collaborator Author

@guillaumevernieres This is a minor thing, but should ush/diag_statistics.py go into soca as well? It's run only from our vrfy task

@guillaumevernieres
Copy link
Contributor

@guillaumevernieres This is a minor thing, but should ush/diag_statistics.py go into soca as well? It's run only from our vrfy task

If we're the only one using it, I would say yes.

@emcbot emcbot added orion-GW-RT-Running Automated testing with global-workflow running on Orion and removed orion-GW-RT Queue for automated testing with global-workflow on Orion labels Jul 27, 2023
@emcbot
Copy link

emcbot commented Jul 27, 2023

Automated Global-Workflow GDASApp Testing Results:
Machine: orion

Start: Thu Jul 27 14:02:30 CDT 2023 on Orion-login-1.HPC.MsState.Edu
---------------------------------------------------
Build:                                 *SUCCESS*
Build: Completed at Thu Jul 27 15:34:03 CDT 2023
---------------------------------------------------
Tests:                                  *Failed*
Tests: Failed at Thu Jul 27 16:14:29 CDT 2023
Tests: 98% tests passed, 1 tests failed out of 53
Tests: see output at /work2/noaa/stmp/cmartin/CI/GDASApp/workflow/PR/538/global-workflow/sorc/gdas.cd/build/log.ctest

@emcbot emcbot added orion-GW-RT-Failed Automated testing with global-workflow failed on Orion and removed orion-GW-RT-Running Automated testing with global-workflow running on Orion labels Jul 27, 2023
@emcbot
Copy link

emcbot commented Jul 27, 2023

Automated Global-Workflow GDASApp Testing Results:
Machine: hera

Start: Thu Jul 27 19:06:04 UTC 2023 on hfe07
---------------------------------------------------
Build:                                 *SUCCESS*
Build: Completed at Thu Jul 27 20:10:56 UTC 2023
---------------------------------------------------
Tests:                                  *Failed*
Tests: Failed at Thu Jul 27 21:28:17 UTC 2023
Tests: 94% tests passed, 3 tests failed out of 53
	1535 - test_gdasapp_atm_jjob_ens_final (Failed)
Tests: see output at /scratch1/NCEPDEV/da/Cory.R.Martin/CI/GDASApp/workflow/PR/538/global-workflow/sorc/gdas.cd/build/log.ctest

@emcbot emcbot added hera-GW-RT-Failed Automated testing with global-workflow failed on Hera and removed hera-GW-RT-Running Automated testing with global-workflow running on Hera labels Jul 27, 2023
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.

Thanks for doing this @AndrewEichmann-NOAA . Looks good. Just one comment related to variable naming convention.

@AndrewEichmann-NOAA
Copy link
Collaborator Author

Now python coding style is failing on ush/ufsda/genYAML.py, which I don't touch

@guillaumevernieres
Copy link
Contributor

Now python coding style is failing on ush/ufsda/genYAML.py, which I don't touch

It looks like it's a simple fix @AndrewEichmann-NOAA . Maybe pycodestyle was recently updated. Can you try what's suggested, replace == with is L34 of genYAML.py

@AndrewEichmann-NOAA AndrewEichmann-NOAA added hera-GW-RT Queue for automated testing with global-workflow on Hera orion-GW-RT Queue for automated testing with global-workflow on Orion and removed hera-GW-RT-Failed Automated testing with global-workflow failed on Hera orion-GW-RT-Failed Automated testing with global-workflow failed on Orion labels Aug 3, 2023
@emcbot emcbot added hera-GW-RT-Running Automated testing with global-workflow running on Hera and removed hera-GW-RT Queue for automated testing with global-workflow on Hera labels Aug 3, 2023
@emcbot
Copy link

emcbot commented Aug 3, 2023

Automated Global-Workflow GDASApp Testing Results:
Machine: hera

Start: Thu Aug  3 14:04:56 UTC 2023 on hfe07
---------------------------------------------------
Build:                                 *SUCCESS*
Build: Completed at Thu Aug  3 15:05:29 UTC 2023
---------------------------------------------------
Tests:                                  *Failed*
Tests: Failed at Thu Aug  3 15:19:24 UTC 2023
Tests: 91% tests passed, 5 tests failed out of 53
	1587 - test_gdasapp_atm_jjob_var_run (Failed)
	1588 - test_gdasapp_atm_jjob_var_final (Failed)
	1590 - test_gdasapp_atm_jjob_ens_run (Failed)
	1591 - test_gdasapp_atm_jjob_ens_final (Failed)
Tests: see output at /scratch1/NCEPDEV/da/Cory.R.Martin/CI/GDASApp/workflow/PR/538/global-workflow/sorc/gdas.cd/build/log.ctest

@emcbot emcbot added hera-GW-RT-Failed Automated testing with global-workflow failed on Hera and removed hera-GW-RT-Running Automated testing with global-workflow running on Hera labels Aug 3, 2023
@AndrewEichmann-NOAA
Copy link
Collaborator Author

@guillaumevernieres This currently passes soca ctests on Hera

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.

👍

@guillaumevernieres guillaumevernieres merged commit 12c3d4f into develop Aug 3, 2023
13 checks passed
@AndrewEichmann-NOAA AndrewEichmann-NOAA deleted the feature/vrfy-refactor branch August 3, 2023 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hera-GW-RT-Failed Automated testing with global-workflow failed on Hera orion-GW-RT Queue for automated testing with global-workflow on Orion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants