-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add carbon cycle variables to output #84
Comments
Can you check the numberof lines with meta info, i.e. the number of lines to skip when reading the file? |
Yep, here are the details. The first 22 lines should be skipped to get to
the first data row. Column headers are row 22.
&THISFILE_SPECIFICATIONS
THISFILE_DATACOLUMNS=38 ,
THISFILE_DATAROWS=551 ,
THISFILE_FIRSTYEAR=1750 ,
THISFILE_LASTYEAR=2300 ,
THISFILE_ANNUALSTEPS=1 ,
THISFILE_FIRSTDATAROW=23 ,
THISFILE_UNITS="MISC
",
THISFILE_DATTYPE="CARBONCYCLEDAT
",
THISFILE_REGIONMODE="RCPPLUSBUNKERS ",
/
…On Tue, Jul 24, 2018 at 4:19 PM, Robert Gieseke ***@***.***> wrote:
Can you check the numberof lines with meta info, i.e. the number of lines
to skip when reading the file?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#84 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJI_BdWKNQZ4rjnfb-Ld7L1J2Dowb_QXks5uJryJgaJpZM4VcIC8>
.
--
Alexander Norton
PhD Candidate
School of Earth Sciences, University of Melbourne, 3010, Vic, Australia
tel: +61 (0)3 8344 9980
email: nortona@student.unimelb.edu.au
|
Alright, this means we need some special treatment here: https://github.com/openclimatedata/pymagicc/blob/master/pymagicc/api.py#L163 Filenames and lines to skip need to accept this special case. Could you also check whether there is a difference in rows to skip between MAGICC6 and 7 carboncycle output? |
Okay. @znicholls are you able to check this please? I'm unsure where to look |
Would be better to change the name of the output file from CARBONCYCLE.OUT to DAT_CARBONCYCLE.OUT in the source code or to modify pymagicc? |
For the compiled MAGICC6 we can't change it, so we need a fix/workaround. If "DAT_" has no specific meaning it might be worth considering for MAGICC7. Is your info re rows to skip based on the latest MAGICC, then I can check MAGICC6 myself. |
@NortonAlex what's your level of Python knowledge btw? |
Yes, my info is on the latest version of MAGICC. I thought it was good until I saw this code. I would say I'm "competent". I've done a lot of python coding for isolated analysis tasks, but not as much on using multiple modules together as is applied here. |
MAGICC6 has 19 rows to skip: &THISFILE_SPECIFICATIONS |
Not all output files start with `DAT_`. Closes #84
Is your feature request related to a problem? Please describe.
Enabling carbon cycle output in pymagicc does not return carbon cycle output variables. It seems that the output file name (CARBONCYCLE.OUT) may need to be standardised by placing DAT at the start of the filename in the same format as other optional output.
Describe the solution you'd like
It would be good to return the carbon cycle output variables (currently in CARBONCYCLE.OUT) when the flag is on (i.e. out_carboncycle=1).
Describe alternatives you've considered
I could write my own python script to handle this. But, the infrastructure is already in place with pymagicc so it "should be" trivial to add this feature in.
Additional context
Note that the carbon cycle output file differs from others such that the columns are different variables (e.g. CURRENT_GPP), not different regions (e.g. GLOBAL, NH-OCEAN). However, I don't think this should change how it is handled.
The text was updated successfully, but these errors were encountered: