jgcri / hectordata Goto Github PK
View Code? Open in Web Editor NEWPrepare and format the inputs for hector.
License: Other
Prepare and format the inputs for hector.
License: Other
This is a possible package enhancement. Do we want to include the capabilities to go from GCAM results to hector emission input file? Unclear how useful this may be but @ouyang363 asked a question related to this and it sounds like their might be other users that would find this capability helpful.
Rough draft of the description
provide a gcam query that works with rgcam to extract results from a data base or do we want to assume the data has already been extracted. Then do the correct aggregating / unit conversion to prep the data. At which point users could either read the emissions into the hector R interface to write out to the emissions file/csv file.... ๐ค
Right now the hectordata inputs are saved in ins/ds
and documented in a read-me.csv, due to the size of the rcmip files they should probably be included as internal package data/committed to the repo which is kind of unideal but in the previous version loaded directly from URL but this is time-intensive and also ends up being a repetitive chunk of code. Figure out a better way to work around this...
@bpbond could you take a look at this package and let me know what you think? So far I have only added the ssp scenarios to the package and figured we could add other scenarios as needed.
Things that would be helpful to get your input on:
hector
.data-raw/generate_inputs.R
does that make sense? Or should that script be located elsewhere?Right now the generate_input_tables
only has the ability to process CMIP6 RCMIP scenarios. Add the capability to generate other input tables
This is something that I've been wrestling with for a while now. For the CMIP6 scenarios do we want the scenarios to match the nomenclature of pervious Hector runs or the CMIP6 scenarios?
If we take a look at the ini files in the Hector input.
[1] "api-example.ini" "constraints" "emissions"
[4] "hector_rcp26_constrained.ini" "hector_rcp26_histconstrain.ini" "hector_rcp26.ini"
[7] "hector_rcp45_constrained.ini" "hector_rcp45.ini" "hector_rcp60_constrained.ini"
[10] "hector_rcp60.ini" "hector_rcp85_constrained.ini" "hector_rcp85.ini"
[13] "hector-gcam.ini"
The runs named hector_rcp45.ini
use the scenario inputs from CMIP5 RCP 4.5 but the big difference is that in hector these are purely emission driven where as in CMIP5 these runs were driven with prescribed CO2 concentrations + emissions.
So that being said for hectordata ini files do we want to set it up so that they are all purely emission driven like the runs or do we want them to match the CMIP definition of the scenarios?
@bpbond I would be happy to hear your thoughts & the thoughts of others that want to weigh in. I am inclined to think that we should be consistent with how Hector does it but as a user that is also kind of a pain...
Add a row to the csv tables stating which version of Hector will run with the ini files??
How do we want to handle the fact that not all inputs will work with every version of Hector?
@crvernon could you help us figure out the license for hectodata?
udunits 2 is orphaned ๐ข consider switching to another package
FYI @bpbond ran into this issue hector github issue where the size of the inst directory is related to the number of decimals in the emissions table can bloat the size of the directory! He suggests limiting the number of decimals printed out to 4.
As discussed with @ssmithClimate and @bpbond Hector, users should be easily able to run the historical AR6 & future scenarios. While not immediately needed for Hector v3, however, this is a high-priority scenario to be able to run.
AR6 replication scenario would have to be some combination of concentration & emission driven. One idea that @ssmithClimate had would be to run Hector with the concentration constraints (concentration constraints for non CO2 GHGs) & do some sort of inverse calculation to be generated the corresponding emission time series.
Inputs for the AR6 will come from https://github.com/chrisroadmap/ar6
rn have to make inst/input/tables manually if it does not exist, would be better if some internal package data did this for users
Based on a slack conversation with @crvernon here is a check list (until a more official list or template is distributed) for R package development guidelines.
After the read_remote
capability is merged into rpackageutils JGCRI/rpackageutils#2 use that function to download the rcmip csv files.
Add some sort of method to make sure that the data frame contains all of the required emissions or constraints. Otherwise errors will not be triggered until trying to run the Hector core.
If we merge JGCRI/hector#643 then emissions time series will have to start at 1745, not 1750, because interpolation will no longer be allowed for the LUC, FFI, and DACCS time series.
Add capabilities to process the constraints
We want to provide users with the ability to run Hector with a hector_gcam.ini file & the input csv table.
Outstanding Questions/Problems
The Hector package and hectordata package will eventually interact with one another, we will need to add documentation so that it is clear to hector users when they will need to use hectordata and how they will do so.
Generate ini files in some method that makes it easy to determine what emissions or concentrations to use... what changes is if the constraints are used or not... may be some function that is capable of replacing all of the strings (with the exception of the volcanic related ones)
may be what we really need is ability to turn on and off constraints.... ๐ค
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.