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

Refactor plotting behavior and grid/plot saving routines #59

Merged
merged 7 commits into from
Jun 13, 2020

Conversation

amoodie
Copy link
Member

@amoodie amoodie commented Jun 10, 2020

Refactor plotting according to #28.

defaults

I went with defaults all false:

save_eta_figs: False
save_stage_figs: False
save_depth_figs: False
save_discharge_figs: False
save_velocity_figs: False
save_eta_grids: False
save_stage_grids: False
save_depth_grids: False
save_discharge_grids: False
save_velocity_grids: False

sequential saving

I went with sequential saving by default (eta_00000.png, eta_00001.png), and there is now a flag called save_figs_sequential that takes a boolean. Setting this to False gives eta_latest.png which is repeatedly overwritten.

refactoring

  • wrap each of the make_figure and save_figure operations into functions
  • remove color bar limit from eta plotting
  • add variable name and timestep as title of plots
  • added a bunch of tests for grid and plot saving

Andrew Moodie added 6 commits June 9, 2020 18:21
…, add flags to initialization for whether plotting or saving happens at all, then use those to enter if statements, only print to log once for figs and once for grids
…easier interaction with postprocessing, update tests
@amoodie amoodie linked an issue Jun 10, 2020 that may be closed by this pull request
@amoodie amoodie added enhancement New feature or request testing labels Jun 10, 2020
@amoodie amoodie changed the title Refactor plotting behavior Refactor plotting behavior and grid/plot saving routines Jun 10, 2020
@amoodie amoodie added this to In progress in Version 2.0 via automation Jun 10, 2020
Copy link
Member

@elbeejay elbeejay 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 to me.

Version 2.0 automation moved this from In progress to Reviewer approved Jun 13, 2020
Copy link
Collaborator

@ericbarefoot ericbarefoot left a comment

Choose a reason for hiding this comment

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

This looks great. I'm stoked that you tackled the plotting and files. That was a thorn bush I was dreading, and thus ignored. I'll go ahead and merge.

@ericbarefoot ericbarefoot merged commit 6ced8d2 into DeltaRCM:develop Jun 13, 2020
Version 2.0 automation moved this from Reviewer approved to Done Jun 13, 2020
@amoodie amoodie deleted the refactor_plotting branch February 25, 2021 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request testing
Projects
Version 2.0
  
Done
Development

Successfully merging this pull request may close these issues.

change plotting and grid saving behavior
3 participants