Skip to content

Wrapper never sets last_weight_year #13

Open

Description

@rishigraham

resilientsims/wrapper.R calls model_load(loc, data_dir) without last_weight_year, so every API calibration weights only 1950-2019.

  • resilientsims/wrapper.R:301
  • model_load() defaults last_weight_year to 2019 (R/data_loadmodel.R:12)
  • nothing checks last_weight_year <= calib_end_year (calib_end_year default 2021, resilientsims/wrapper.R:157)
    • when it is exceeded, V[year_to_idx(year)] runs past the simulated years
    • the tryCatch at R/IMIS_functions_st.r:262 returns NA and every draw scores -1e12

Fix on branch rsims-wrapper.

Line numbers refer to branch rsims-wrapper at 209120a, as of 2026-11-03.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions