Closed swilliamson7 closed 10 months ago
I've also removed the Manifest.toml
, I know that was in the folder before, but that shouldn't be commited, hence my changes to the .gitignore
file. Still the CI fails for some reason
ERROR: LoadError: LoadError: libnetcdf not properly installed. Please run Pkg.build("NetCDF")
ouuuuh?
ERROR: LoadError: LoadError: libnetcdf not properly installed. Please run Pkg.build("NetCDF")
ouuuuh?
I've had this happen to me before with other functions, I have no idea why. Sometimes it'll tell me something is wrong with SparseArrays for example
This output function still works for me, and fixed the mess up with path
,
function get_run_id_path(S::ModelSetup)
@unpack output,outpath,get_id_mode = S.parameters
if output
pattern = r"run_\d\d\d\d" # run_???? in regex
runlist = filter(x->startswith(x,pattern),readdir(outpath))
runlist = filter(x->endswith( x,pattern),runlist)
existing_runs = [parse(Int,id[5:end]) for id in runlist]
# get the run id from existing folders
if length(existing_runs) == 0 # if no runfolder exists yet
run_id = 1 # start with run_0001
else
run_id = maximum(existing_runs)+1 # next run gets id +1
end
id = @sprintf("%04d",run_id)
run_id2 = string("run_",id)
run_path = joinpath(outpath,run_id2)
@assert !(run_id2 in readdir(outpath)) "Run folder $run_path already exists."
mkdir(run_path) # actually create the folder
return run_id, run_path
else
return 0,"no runpath"
end
end
Note sure why there's a precompile error with libnetcdf
. Can you check whether the tests pass locally?
I think this fixes that output error I was getting before. I basically changed the function
get_run_id_path
to return arun_id
and arun_path
in the same way that SpeedyWeather does it like you suggested. It seems to be working for me now but you should probably still check, just in case