ideas-lab-nus / epwshiftr

Create future EnergyPlus Weather files using CMIP6 data
https://ideas-lab-nus.github.io/epwshiftr/
Other
30 stars 7 forks source link

Problem getting index file for monthly data #1

Closed lolow closed 4 years ago

lolow commented 4 years ago

Cannot build index file for monthy data. There is conflict as "mon" becomes "Amon" after the first esfg query.

library(epwshiftr)

options(epwshiftr.dir = "tmp")
options(epwshiftr.verbose = TRUE)

# get CMIP6 data nodes
nodes <- get_data_node()

idx <- init_cmip6_index(
  activity = "ScenarioMIP",
  variable = "tas",
  frequency = "mon",
  source = c("EC-Earth3"),
  experiment = c("ssp126"),
  data_node = nodes[status == "UP", data_node],
  years = c(2050, 2080)
)

Here is the error I receive:

Error in esgf_query(activity = unique(q$activity_drs), variable = unique(q$variable_id),  : 
  Assertion on 'frequency' failed: Must be a subset of {'1hr','1hrCM','1hrPt','3hr','3hrPt','6hr','6hrPt','day','dec','fx','mon','monC','monPt','subhrPt','yr','yrPt'}, but is {'Amon'}.
hongyuanjia commented 4 years ago

Thanks for reporting this issue. It should have been fixed now. Please let me know if there are still problems on specifying frequencies.

lolow commented 4 years ago

It's working. Thanks for the fix. Very helpful package!

hongyuanjia commented 4 years ago

Good to know that and thanks for the words.