jeffnemesis / CDRJOBS

0 stars 0 forks source link

Questions regarding applying package for GCAM-China-MultiCDR #1

Open RuiWangWr opened 1 day ago

RuiWangWr commented 1 day ago

Hi Jeff,

I am currently testing this package to estimate the CDR jobs for multi CDR scenarios in GCAM-China.

While I installed the package successfully, But I encountered some issues when I ran the function.

Here is my questions: (1) Am I using the correct parameters? I am a bit confused about what exactly should be specified for dat_file = "file_name". (2) In GCAM-China, the technologies for [CO2 seqestration by tech] are named as "slow pyrolysis biochar", "cellulosic ethanol CCS level 1", etc., which could be different from "BECCS", "DAC", "Biochar", etc. Could these naming differences cause any inconsistency issues when using the package? (I am attaching a scenario excel file here). gcam-china-multicdr.xlsx

=================================== Following is my operation:

results <- calculate_cdr_jobs( db_path = "D:/gcam-china-dev-1/output/", # Path to the GCAM database db_name = "database_basexdb_beAFbiochar", # Name of the database dat_file = "CDR_jobs.dat", # File name (without the .dat extension) scenario_list = c("GCAM-China-beAFbiochar 2024-18-10T14:38:43+02:00"), # List of scenarios to include region_list = c("China", "Brazil"), # Regions to include output_path = "D:/gcam-china-dev-1/output/", # Path to save CSV files and plots output_type = "csv", # Save results as CSV create_plots = TRUE, # Generate and save visualizations job_metric = "mean", # Visualization metric ("min", "mean", "max") )

[console output] Database scenarios: GCAM-China-beAFbiochar
Scenario GCAM-China-beAFbiochar does not exist in this project. Creating.
Error in calculate_cdr_jobs(db_path = "D:/gcam-china-dev-1/output/", db_name = "database_basexdb_beAFbiochar", : No matching data after joining subsector and subtechnology.

Here is my output interface: 1e8cde27e022d741edac54e836b209a

Many Thanks!

-Rui

jeffnemesis commented 1 day ago

Hi Rui, thanks for the feedback. I have looked at your problem and it is a bit strange because the naming conventions for gcam-China and gcam-core under subsector for CDR technologies are the same and this shouldnt lead to a left-joining problem since the technology names under subsector in gcam-china matches the predefined technology names in the package.

I just tried it myself for gcam-China and it worked as you can see in the attached pictures.

For the dat file name it can be any name. But kindly remove the “.dat” you added and retry. I am sure that would resolve the problem. Let me know how it goes.

Best wishes!! -Jeff

f59bf28744d46ba3002e83e5e3883d4

843cd391d1e0c7ba70284474a55c882

RuiWangWr commented 1 day ago

Hi Jeff,

Thanks for your kindly reply. This tool is very interesting! Now the function works but the visualization may have some issues. It returns:

run_shiny_app(output_path = " D:/gcam-china-dev-1/JobEstimate_Jeff") Error in run_shiny_app(output_path = " D:/gcam-china-dev-1/JobEstimate_Jeff") : No regional datasets found in the specified output path.

Coud this error be caused by the scenario lacking sufficient other CDR technologies? I am attaching the output csv files generated by the function. cum_tech_facet_plot tech_year_facet_plot Job_cum_tech.csv Job_cum_tech_global.csv Job_cum_total.csv Job_cum_total_global.csv Job_total_year.csv Job_total_year_global.csv Job_by_tech_year_global.csv Job_by_tech_year.csv

Best, Rui

===================================== Following is my operation: results <- calculate_cdr_jobs( db_path = "D:/gcam-china-dev-1/output", # Path to the GCAM database db_name = "database_basexdb_nobiochar", # Name of the database dat_file = "CDR_jobs", # File name (without the .dat extension) scenario_list = c("carbon_neutrality_nobiochar"), # List of scenarios to include region_list = c("BJ",”TJ”), # Regions to include output_path = "D:/gcam-china-dev-1/JobEstimate_Jeff", # Path to save CSV files and plots output_type = "csv", # Save results as CSV create_plots = TRUE, # Generate and save visualizations job_metric = "mean", # Visualization metric ("min", "mean", "max") )

run_shiny_app(output_path = " D:/gcam-china-dev-1/JobEstimate_Jeff")

jeffnemesis commented 1 day ago

Hi Rui, I am glad to know the earlier problem has been resolved.

With regards to the current problem, I have still not figured out the cause since it opens on mine. I downloaded one of the csv files you attached and I tried it - it worked as you can see in the picture.

Can you kindly re-install the package and give it a try again. Because since you now have the csv files, the shiny app should open as well. I will also try to run it on another computer and see if I face a similar issue.

Best,

Jeff

523d47090a201912a14bbbb9006d0ef