JGCRI / gcamdata

The GCAM data system
https://jgcri.github.io/gcamdata/
Other
40 stars 26 forks source link

L223.electricity_USA #717

Closed gokuliyer closed 6 years ago

rynacui commented 6 years ago

@gokuliyer Does this chunk need to be replaced/combined with #718 L2232.electricity_FERC_USA? @bpbond Could you please send the chunk files?

rynacui commented 6 years ago

@bpbond the batch file requires outputs from both L223 and L2232. Could you also send the files for #718? Thanks! Again, just want to double check there is no overlapping effort between the two chunks. Both seem complicated...

rynacui commented 6 years ago

@bpbond I just talked to Gokul and he confirmed that there is no overlapping effort. I'll hold the batch chunk until L2232 is finished.

rynacui commented 6 years ago

@bpbond a bunch of gcam-usa level1 and level2 data are missing in the gcam-data-system-OLD

bpbond commented 6 years ago

@rynacui I've pushed up all the gcam-usa data files:

https://github.com/JGCRI/gcam-data-system-OLD/tree/master/gcam-usa-data/level1 https://github.com/JGCRI/gcam-data-system-OLD/tree/master/gcam-usa-data/level2

rynacui commented 6 years ago

Thanks a lot @bpbond !

rynacui commented 6 years ago

@bpbond Using two outputs from #688 and find two extra columns in each output, and it turns out FLAG_NO_TEST is not removed in that chunk. It should be an easy fix, if other parts are correct.

bpbond commented 6 years ago

Haha, whoops! Good catch Ryna–thanks. @russellhz can you go back to this and fix please?

rynacui commented 6 years ago

@bpbond I'm working on Part 3 in this chunk, from line 252 to line 299, it transforms the regional level energy file to the USA state level using a loop, but also involves curr_table and new functions like write_to_all_states. Could you please take a look and maybe we can talk through how to handle this part? Thanks!

bpbond commented 6 years ago

So the the original code takes a lot of datasets; put them into a single list; iterates through the list, writing USA to all states and (perhaps) re-setting USA to regional markets; and assigning the data back out to new *_USA objects.

One way to handle this would be stay with the list structure, and use lapply. Another, and what I'd probably do, is define a little process_USA_to_states function that does these steps and then do

L223.Supplysector_elec_USA = process_USA_to_states(L223.Supplysector_elec)
L223.ElecReserve_USA = process_USA_to_states(L223.ElecReserve)
(etc.)
rynacui commented 6 years ago

Hi @bpbond, I have several questions about this chunk. Maybe it's best if we sit down together and go through? Will you be in office tomorrow?

bpbond commented 6 years ago

Hi Ryna, yes, I will be–sounds good.