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

Outputs scripts for FSDP runs #408

Merged
merged 11 commits into from
Jul 11, 2022
Merged

Outputs scripts for FSDP runs #408

merged 11 commits into from
Jul 11, 2022

Conversation

flohump
Copy link
Contributor

@flohump flohump commented Jul 7, 2022

🐦 Purpose of this PR 🐦

  • The central script for collecting FSDP outputs at regional, iso and grid level is FSDP_collect.R
  • As soon as other gridded output become available, they should be add to FSDP_collect.R in the same way as for BII and land.
  • The script also creates plots. For this we need the [m4fsdp] R library on the cluster. https://github.com/pik-piam/m4fsdp
  • No test runs needed. Just output scripts.

🔧 Checklist for PR creator 🔧

  • Low risk : Simple bugfixes (missing files, updated documentation, typos) or Start/output scripts
  • Medium risk : New realization / Changes to existing realization / Other changes which don't modify default.cfg
  • High risk : New input files (if cfg$input is changed in default.cfg) / Modification to core model (eg. changes in equations, calculations, introduction of new sets etc.) / Other changes in default.cfg
  • Providing additional information based on PR label
  • Low risk : No new model run needed.
  • Medium risk : Default run based on the current version of the fork from which PR is made
  • High risk
    • Default run from the current develop branch
    • Default run based on the current version of the fork from which PR is made
  • 📉 Performance loss/gain from current default behavior 📈

    • Current develop branch default : ** mins
    • This PR's default : ** mins
  • Added changes to CHANGELOG.md

  • Compilation check (model starts without compilation errors - use gams main.gms action=c in model folder for testing).

  • No hard coded numbers and cluster/country/region names.

  • The new code doesn't contain declared but unused parameters or variables.

  • Where relevant, In-code comments added including documentation comments.

  • Made sure that documentation created with goxygen is okay (use goxygen::goxygen() for testing).

  • Changes to magpie4 R library for post processing of model output (ideally backward compatible).

  • Self-review of my own code.

  • For high risk runs: validation of major model indicators - Land-use, emissions, food prices, Tau. %Delete this line in case it is not a high risk run%

⚠️ Additional notes or warnings ⚠️

NA

🚨 Checklist for RSE reviewer 🚨

  • PR is labeled correctly.
  • CHANGELOG is updated correctly
  • No hard coded numbers and cluster/country/region names.
  • No unnecessary increase in module interfaces
  • All required updates in interfaces (if any) have been properly adressed in the module contracts
  • In-code comments and documentation comments are satisfactory.
  • model behavior/performance is satisfactory.
  • Requested changes (if any) were applied correctly

🚨 Checklist for MAgPIE reviewer 🚨

  • PR is labeled correctly.
  • CHANGELOG is updated correctly
  • No hard coded numbers and cluster/country/region names.
  • Changes to the model are scientifically sound
  • In-code comments and documentation comments are satisfactory.
  • model behavior/performance is satisfactory.
  • Requested changes (if any) were applied correctly

@flohump flohump added enhancement New feature or request Minor Smaller modifications Low risk Low risk labels Jul 7, 2022
@flohump flohump marked this pull request as ready for review July 7, 2022 09:56
Copy link
Member

@k4rst3ns k4rst3ns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Two comments:

  1. some of the filter statements (like x <- unlist(lapply(strsplit(basename(outputdir),"_"),function(x) x[2])) or if(unlist(strsplit(title,"_"))[3] %in% scen)) seem to work only with a specific naming convention and are not to easy to grasp. I guess this works fine for now, for long term and more generic applicability it might be cool to find more generic statements maybe.
  2. Maybe let a lintr run over the scripts to improve coding style (like spaces, line length etc.) for better readibility.

scripts/output/projects/FSDP_collect.R Outdated Show resolved Hide resolved
scripts/output/rds_report_iso.R Outdated Show resolved Hide resolved
@flohump flohump requested a review from k4rst3ns July 8, 2022 09:38
Copy link
Member

@k4rst3ns k4rst3ns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good for me now.

@bodirsky
Copy link
Member

Mergin this as Florian is not here anymore!

@bodirsky bodirsky merged commit 527c439 into magpiemodel:develop Jul 11, 2022
@flohump flohump deleted the f_FSDP branch January 28, 2023 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Low risk Low risk Minor Smaller modifications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants