-
Notifications
You must be signed in to change notification settings - Fork 3
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
Issue when creating user criterion #80
Comments
Hi Willy, Hoping I can address this below: The error you are getting when you try to use the inbuilt criterion ini_file <- system.file("input/hector_ssp245.ini", package = "hector")
core <- newcore(ini_file, name="SSP_245")
core
set.seed(2455)
param_sets <- generate_params (core = core, draws = 10)
print(param_sets)
results_100 <- iterate_model(core = core, params = param_sets, save_vars = GMST(), save_years = 1850:2100)
print(results_100)
# continue with weighting steps... "Also, am I correct to think this criterion of global_tas included in the vignette (shown below) uses a generated sequence of values as opposed to actual observational data? Either way, using the snippet below I still receive scored values of 0.01 for all 100 observations." Thats correct, the vignette is simply showing how one could theoretically build their own criterion using any vector they provide. The sequence of values in the vignette is arbitrary and could very well produce a nonsensical result, especially when using Give this a shot to test your code after re-running to fetch Here is a link to preprint of the matilda paper, the accepted version is currently in press at PLOS Climate: https://eartharxiv.org/repository/view/5938/ |
@jk-brown Thank you for the direction here- I'll work through this now! The paper has been incredible and has helped get me this far along before asking for help! |
Sorry to bother again, but wondering if you'd have any thoughts on this error `
can include any other code as needed - thank you so much!! Willy |
My first inclination is that the long term metric you are defining is using Thanks for pointing this out. I agree that this error is not well coded. But it means that in this line of code: Based on the previous comments in the issue I would guess that is the problem. So I would guess running for metric_lt <- new_metric(var = "gmst", years = 2081:2100, op = mean)
print(metric_lt)
values_metric_lt <- metric_calc(results_10, metric_lt) This should give you the 2081-2100 mean global average surface temperature anomaly for each run. hope this helps |
Hi Willy @Scoobys-keeper , wanted to see if issues you raised here were resolved for now? |
Hi @jk-brown Yes all sorted here! Thanks so much :) |
Hi there!
I am currently trying to use Matilda/Hector to score my 100 ensemble runs against observed global temperatures. When I try and define a new criterion for observational data, I am met with scored runs all equal to 0.01. I am trying to set my own criterion because when I attempt to use the inbuilt
criterion_gmst_obs()
The error below is returned.
Error in score_runs(results_100, criterion_gmst_obs(), score_ramp, w1 = 2, : criterion year and variable combination not represented in data
Any ideas why the
criterion_gmst_obs()
would return such an error? My ideal fix is solving this so I dont have to fuss with creating my own criterionAlso, am I correct to think this criterion of global_tas included in the vignette (shown below) uses a generated sequence of values as opposed to actual observational data? Either way, using the snippet below I still receive scored values of 0.01 for all 100 observations.
my_criterion <- new_criterion(GLOBAL_TAS(), years = 1951:2000, obs_values = seq(0.4, 1.0, length.out = 50)
Thank you for your help!! Code pasted below.
Thank you for your time and apologies if I missed anything in the explanation!
Willy
The text was updated successfully, but these errors were encountered: