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

Feature request: Add ability to write plots to files, instead of displaying to screen #4

Closed
serbinsh opened this issue Aug 26, 2017 · 9 comments

Comments

@serbinsh
Copy link

@rgknox It would be good to set this up to allow for plots to be written to a file not to the screen to avoid any X11 issues when running remotely via SSH.

@rgknox
Copy link
Collaborator

rgknox commented Aug 28, 2017

great idea

@rgknox
Copy link
Collaborator

rgknox commented Sep 26, 2017

@serbinsh : my current plan is to pack all of the png's into a pdf. I was thinking of using the fpdf package in python, or maybe pdfpages on the matplotlib package. I think I will try the later first, as matplotlib is already a package requirement.

https://matplotlib.org/api/backend_pdf_api.html

@rgknox
Copy link
Collaborator

rgknox commented Sep 27, 2017

see #8, should be good to go now.

@serbinsh
Copy link
Author

@rgknox looking good.

fates_brazil_test_summary_table.txt

fates_brazil_test_plots.pdf

I'm still trying to figure out how to get FATES to leave all of the history files after completion. Right now it deletes all except the last year. In which case I seem to have to run acre while fates is still executing, or is that the idea?

@serbinsh
Copy link
Author

I also note that if I try to run again I get this

[sserbin@modex acre]$ python2.7 acre_driver.py --plotmode --eval-id=fates_brazil_test --test-hist-pref=/data/Model_Output/fates_testing/BR1x1_b00a5b0_1511028495/run/
Plotting is ON
Regression Testing is OFF
Site: 1x1_brazil was located in the restart grid
Processing File Timing information

Dimension information for history files

Traceback (most recent call last):
  File "acre_driver.py", line 783, in <module>
    main(sys.argv)
  File "acre_driver.py", line 656, in main
    hdims.timing([test_h0_list[0],test_h0_list[1],test_h0_list[-1]])
  File "/data/sserbin/Modeling/acre/acre_history_utils.py", line 549, in timing
    yrz,moyz,domz,hodz = hist_dateint_to_num(yyyymmdd_z[-1],sec_z[-1],db_z[-1,:])
IndexError: index -1 is out of bounds for axis 0 with size 0

@rgknox
Copy link
Collaborator

rgknox commented Nov 18, 2017

it looks like it couldn't find any files? Index -1 is the last index in any allocated array. Or possibly it only found 1 file, and therefore it can't index a scalar?

@serbinsh
Copy link
Author

@rgknox This error happened after I had already run acre once on the output directory. When I tried running again this error popped up.

I also seem to get this error if I try to run acre after the fates-clm run execution is complete

@rgknox
Copy link
Collaborator

rgknox commented Nov 18, 2017 via email

@rgknox
Copy link
Collaborator

rgknox commented Nov 20, 2018

this has been implemented

@rgknox rgknox closed this as completed Nov 20, 2018
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

No branches or pull requests

2 participants