Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Cannot open file './FLake/flake.nml': No such file or directory #277

Open
simontye opened this issue Mar 14, 2024 · 6 comments
Open

"Cannot open file './FLake/flake.nml': No such file or directory #277

simontye opened this issue Mar 14, 2024 · 6 comments

Comments

@simontye
Copy link

Hello,

I am running into a similar issue as this closed post. I have a 2020 MacBook Air and have tried installing the brew packages that are recommended to help with the installation on Macs and have tried removing the "libm.so.6" files from the various package directories. Neither of those options worked and still give the same error. Does anyone else have suggestions on how to make the models work in R on Macs? Thank you for all your help and expertise.

Simon

LakeEnsemblR::export_config(config_file = config_file, model = model)
export_dirs complete!
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") :
cannot open file './FLake/flake.nml': No such file or directory

@JFeldbauer
Copy link
Collaborator

Hello Simon,
flake.nml is the configuration file for FLake. This file should be copied to the folder when running export_config(). Do you have the latest versions of all model specific packages installed? because some time ago we moved the template configuration files from the LakeEnsemblR package to the model packages e.g. FLakeR

@simontye
Copy link
Author

Hey JFeldbaur,

Thank you so much for your help. I think that I have all of the model specific packages installed. These are the packages that I have loaded:

library(GLM3r)
library(GOTMr)
library(gotmtools)
library(rLakeAnalyzer)
library(SimstratR)
library(MyLakeR)
library(glmtools)
library(MyLakeR)
library(FLakeR)
library(LakeEnsemblR)

Beyond loading those, I am just trying to perform the example run in the vignette. I tried reinstalling all of the packages then looked through their folders and my computer directory but could not find the "flake.nml" file. I'm trying to run this on macOs 12.6 with R 4.3.3. Do you have any other suggestions? I will look again for that file. Thank you again!

Simon

@JFeldbauer
Copy link
Collaborator

you should be able to get the FLake configuration file by using LakeEnsemblR::get_template("FLake_config", folder = ".") (this is what is done by export_config()). You could check where the config file is supposed to be located using system.file("extdata", package = "FLakeR")

Do you specify a different name for the FLake config file in your LakeEnsemblR configuration yaml file? This can be donme under config_files:

@IsabelHerr
Copy link

Hello,

I am having the same problem, I did this

system.file("extdata", package = "FLakeR")

I found the folder with extdata from Flake but there is no file named Flake.nml only those from the Flake examples (Heiligensee80-96.nml, Mueggelsee80-96.nml, and Stechlin94-98.nmk) Can I just rename one of these three ?

thank you

@JFeldbauer
Copy link
Collaborator

a possible reason could be that you installed the main tree of the FLakeR package. can you try to install the inflow branch using: remotes::install_github("aemon-j/FLakeR", ref = "inflow") and try again?

@IsabelHerr
Copy link

This worked,

Thanks for the help,
Isabel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants