sunset_prov_indices<-function(recipe,data,graph){
graph_main<-graph$main_graph
parentnodenames<-graph$main_graph$parentnodename
graph_hcst<-graph$graph_hcst
graph_obs<-graph$graph_obs
browser()
#climate4R_object_hcst<- s2dv_cube2Climate4R(data$hcst, time_dim = "time", sdate_dim = "syear", 
                             #  lat_dim = "latitude", lon_dim = "longitude",
                             #  memb_dim = "ensemble", copy_data = FALSE )

indi_hcst<- metaclipR.ClimateIndex(graph_hcst, package = "indices",
  version = "2.0" , index.code=names(recipe$Analysis$Workflow$Indices),
  fun = "modules/Indices/Indices.R", disable.command = TRUE)

#climate4R_object_obs<- s2dv_cube2Climate4R(data$obs, time_dim = "time", sdate_dim = "syear", 
                              # lat_dim = "latitude", lon_dim = "longitude",
                              # memb_dim = "ensemble", copy_data = FALSE )

indi_obs<- metaclipR.ClimateIndex(graph_obs, package = "indices",
  version = "2.0" , index.code=names(recipe$Analysis$Workflow$Indices),
  fun = "modules/Indices/Indices.R", disable.command = TRUE)

graph<-my_union_graph(graph_main$graph, indi_hcst$graph, indi_obs$graph)
parentnodename<-list(indi_hcst$parentnodename, indi_obs$parentnodename)

graph <- metaclip.graph.Command(graph, "Indices", "2.0.0", "/modules/Indices/Indices.R", arg.list=list("Recipe"=recipe$Run$output_dir, "Calibrated_Data"),parentnodename)

graph<-list("graph"=graph, "parentnodename"=list(graph_fcst$parentnodename,graph_hcst$parentnodename, indi_hcst$parentnodename,graph_obs$parentnodename, indi_obs$parentnodename))

return(list("main_graph"=graph, "indi_hcst"=indi_hcst, "indi_obs"=indi_obs))
}

