Skip to content
Snippets Groups Projects
Commit cc752117 authored by GUEZ Lionel's avatar GUEZ Lionel
Browse files

Manage the absence of time dimension

parent a33fdfd2
No related branches found
No related tags found
No related merge requests found
......@@ -84,9 +84,12 @@ else:
my_slice = 0 # same default value as in Fortran program
with netCDF4.Dataset(args.NetCDF_files[0]) as SSH_dataset:
n_dates = SSH_dataset.dimensions[
find_coord.find_coord(SSH_dataset, "time")
].size
time_dimension = find_coord.find_coord(SSH_dataset, "time")
if time_dimension is None:
n_dates = 1
else:
n_dates = SSH_dataset.dimensions[time_dimension].size
if "uniform_lon_lat" not in inst_eddies_nml["input_ssh_nml"]:
inst_eddies_nml["input_ssh_nml"]["uniform_lon_lat"] = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment