eco4cast / neon4cast

A helper R package for the neon4cast challenge
Other
7 stars 7 forks source link

Error: file missing metadata_standard_version #1

Open lzachmann opened 3 years ago

lzachmann commented 3 years ago

Hey @rqthomas, is it okay to post issues here? Happy to wait until this package is more developed to chime in. Or I can create a pull / merge request if you like? Trying to get the write_metadata_eml() function to work and hitting a couple of speed bumps.

Just a couple of quick observations....

  1. A call to basename() might be nice here forecast_file_name_base <- tools::file_path_sans_ext(tools::file_path_sans_ext(basename(forecast_file))) if folks are caching forecast files in subdirectories as opposed to the project root;
  2. num_variables still needs to be defined in the control flow for if ("statistic" %in% names(forecast))

Even with the above patches made I'm still hitting an error

Error: file missing metadata_standard_version

Not quite sure how deeply I wanted to dive into the EML package to sort that one out, and figured you might know the solution off hand.

Again, sorry if reporting here is not what is desired. Happy to delete this and engage offline too.

rqthomas commented 3 years ago

Hi @lzachmann Reporting here is great, especially because it signals to others to contribute as well. My class that is using the package to contribute forecasts discovered the metadata_standard_version bug last week and it should be fixed in the latest commit. Try reinstalling and reloading. Go ahead and create pull request for the others and I can look them over to integrate.

lzachmann commented 3 years ago

Thanks @rqthomas I can try to create that pull request this evening, or tomorrow. Your fix for the metadata_standard_version is working. The only other hangup at the moment appears to be that EFIstandards::forecast_validator() doesn't appear to accept the MCMC type propagation of initial condition uncertainty: Error: 'initial_conditions' Invalid uncertainty <propagation> <type> 'MCMC'. When I arbitrarily changed type to ensemble in the initial_conditions block of the metadata template as a test, everything worked.