harphub / harpVis

Visualisation functions for harp.
https://harphub.github.io/harpVis/
Other
1 stars 16 forks source link

rds fails to open #8

Closed meteorolog90 closed 4 years ago

meteorolog90 commented 4 years ago

In shiny app i cannot open generated rds file for Aladin gribs. CLSTEMPERATURE_04.zip

loads libraries

library(tidyverse)
library(here)
library(harpIO)
library(harpVis)
library(harpPoint

stations list

stanice <- read.csv("~/HARP/STANICE.csv")
stanice <- as.data.frame(stanice)

set intervals:

start=2020071000
end=2020071500
end1=2020071700

set working directory setwd("/data/nwp/oper/grib/shmu/")

interpolate T2m

Aladin_T2m <- read_forecast(

start_date = start,
end_date   = end,
fcst_model  = "Aladin_45",
parameter="T2m",
lead_time= seq(0,48,3),
by= "6h",
file_path  = getwd(),
file_format="grib",
file_template ="{YYYY}-{MM}-{DD}_{HH}/CLSTEMPERATURE_{LDT2}.grb",
transformation="interpolate",

transformation_opts=interpolate_opts(
stations=stanice, 
clim_file ="/data/nwp/oper/grib/shmu/2020-07-11_00/SURFGEOPOTENTIEL_00.grb"),

output_file_opts=sqlite_opts(path="/work/users/ext005/sql/forecast"),
return_data=TRUE

)

observation read:

obs <- read_point_obs (

    start_date =start, 
    end_date=end,
    parameter="T2m",
    obs_path="/work/users/ext005/sql/observations"

)

forecast read:

T2m <- read_point_forecast (

  start_date = start,
  end_date   = end,
  fcst_model = "Aladin_45",
  fcst_type  = "det",
  parameter  = "T2m",
  by         = "6h",
  file_path  = "/work/users/ext005/sql/forecast"

)

det_verification:

t2m <- join_to_fcst(T2m, obs)
verif_t2m <- det_verify(t2m, T2m, thresholds = seq(0, 40, 2))
save_point_verif(verif_t2m, verif_path = "/data/nwp/products/harp/verfication/Aladin")`

rds file: harpPointVerif.harp.T2m.harp.2020071000-2020071500.harp.Aladin_45.zip

Error

Listening on http://127.0.0.1:5954 Warning: Error in [[: attempt to select less than one element in get1index 73: observeEventHandler 2: shiny::runApp 1: shiny_plot_point_verif

andrew-MET commented 4 years ago

The shiny app is not currently able to handle deterministic scores. Duplicate of #9