diff --git a/src/replace_landsurface/replace_landsurface_with_BARRA2R_IC.py b/src/replace_landsurface/replace_landsurface_with_BARRA2R_IC.py index a420754..0c5af9f 100755 --- a/src/replace_landsurface/replace_landsurface_with_BARRA2R_IC.py +++ b/src/replace_landsurface/replace_landsurface_with_BARRA2R_IC.py @@ -201,6 +201,8 @@ def swap_land_barra(mask_fullpath, ec_cb_file_fullpath, ic_date): BARRA_FIELDN = 'ts' indir = os.path.join(BARRA_DIR, '1hr',BARRA_FIELDN, 'latest') barra_files = glob(os.path.join(indir, BARRA_FIELDN + '*' + yyyy + mm + '*nc')) + if not barra_files: + raise ImportError("BARRA files not found. This most likely means you're not a member of the ob53 group.") barra_fname = indir + '/' + barra_files[0].split('/')[-1] # Work out the grid bounds using the surface temperature file