defs['SLCAAAZX'] = 'Concentration of silicate {SiO4} per unit volume of the water body [unknown pha>' defs['SSALAGT1'] = 'Salinity of the water body by titration against silver nitrate (AgNO3)' defs['SSALBSTX'] = 'Salinity of the water body by bench salinometer' defs['TEMPPR01'] = 'Temperature of the water body' defs['TPHSPP01'] = 'Concentration of phosphorus (total) per unit volume of the water body [dissolve>' lon, lat = [-4.83333], [54.09167] data = {} zlev = [] indices = [0] duration = 0 for file in ncs: nc, ga = readFVCOM(os.path.join(base, 'raw_data', file), globalAtts=True) k, _ = os.path.splitext(file) nc['indices'] = int(ga['dims']['primary'].split(':')[-1]) duration += nc['indices'] indices.append(indices[-1] + nc['indices']) zlev.append(int(ga['dims']['secondary'].split(':')[-1])) data[k] = nc zlev = np.unique(zlev) if len(zlev) > 1: raise Exception('Non-uniform depth levels, so I can\'t concetenate these netCDFs.') # Now find all the unique keys for each file so we can find out how many # different variables we have.