rich-iannone / splitr

Use the HYSPLIT model from inside R and do more with it
Other
141 stars 60 forks source link

Executable not running when libgfortran3 not available #64

Open juliombarros opened 3 years ago

juliombarros commented 3 years ago

Hi, Similar to this previous issue, the executable file did could not be called in the absence of libgfortran3. However, on newer ubuntu versions, libgfortran3 is not available.

create_trajectory_model() %>%
  add_trajectory_params(
    lat = 43.45,
    lon = -79.70,
    height = 50,
    duration = 6,
    days = "2015-07-01",
    daily_hours = c(0, 12),
    direction = "backward",
    met_type = "reanalysis",
    met_dir = '/opt/hysplit.v5.0.0_Ubuntu/met',
    exec_dir = '/opt/hysplit.v5.0.0_Ubuntu/exec'
  ) %>%
  run_model()

As a result, I would get the following empty output plus a warning message:

A tibble: 0 x 12
 … with 12 variables: run <int>, receptor <int>, hour_along <int>,
   traj_dt <dttm>, lat <dbl>, lon <dbl>, height <dbl>, traj_dt_i <dttm>,
   lat_i <dbl>, lon_i <dbl>, height_i <dbl>, pressure <dbl>

...
Warning messages:
1: In system(sys_cmd) : error in running command
2: In system(sys_cmd) : error in running command
3: In file.copy(from = file.path(exec_dir, trajectory_files), to = recep_file_path,  :
  problem copying /opt/hysplit.v5.0.0_Ubuntu/exec/traj--bwd-15-07-01-00-1lat_43p45_lon_-79p7-hgt_50-              6h to /opt/hysplit.v5.0.0_Ubuntu/exec/1/traj-2021-03-18-14-37-15/traj--bwd-15-07-01-00-1lat_43p45_lo              n_-79p7-hgt_50-6h: No such file or directory

The solution: Ubuntu users might find useful this workaround on how to install libgfortran3 on new versions of the OS.

Rangsan-khamkhaon commented 1 year ago

I got this problem on LINUX CentOS 8 so How to fix this problem?

options(timeout=1500) trajectory_model <-

  • create_trajectory_model() %>%
  • add_trajectory_params(
  • lat = 13.783185,
  • lon = 100.540489,
  • height = 100,
  • duration = 72,
  • days = "2023-07-09",
  • daily_hours = c(0, 5, 11),
  • direction = "forward",
  • met_type = "gfs0.25",
  • model_height = 16000,
  • extended_met = TRUE,
  • met_dir = here::here("met"),
  • exec_dir = here::here("out")
  • ) %>%
  • run_model() Warning messages: 1: In system(sys_cmd) : error in running command 2: In system(sys_cmd) : error in running command 3: In system(sys_cmd) : error in running command