Skip to content

Commit

Permalink
Loading or aggregating condition refined
Browse files Browse the repository at this point in the history
  • Loading branch information
valentijn7 committed Dec 13, 2024
1 parent f0127de commit e281f8a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions GoogleFloodHub/src/GRRR.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2922,7 +2922,7 @@
},
{
"cell_type": "code",
"execution_count": 552,
"execution_count": 603,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -3196,8 +3196,10 @@
" if not os.path.exists('../data/GRRR/aggregated/') or not os.path.exists('../data/GRRR/aggregated_rp/'):\n",
" os.makedirs('../data/GRRR/aggregated/', exist_ok = True)\n",
" os.makedirs('../data/GRRR/aggregated_rp/', exist_ok = True)\n",
" n_datasets_loaded = len([f for f in os.listdir('../data/GRRR/aggregated/') if f.endswith('.nc')])\n",
" n_rps_loaded = len([f for f in os.listdir('../data/GRRR/aggregated_rp/') if f.endswith('.nc')])\n",
" n_datasets_loaded = len([f for f in os.listdir('../data/GRRR/aggregated/') if \\\n",
" f.endswith(f'_{lt * 24}.nc')])\n",
" n_rps_loaded = len([f for f in os.listdir('../data/GRRR/aggregated_rp/') if \\\n",
" f.endswith(f'_{lt * 24}.nc')])\n",
" if (n_to_load == n_datasets_loaded) and (n_to_load == n_rps_loaded):\n",
" print('Loading in datasets...')\n",
" dict_datasets_au = import_datasets_from_netcdf('../data/GRRR/aggregated/', lt)\n",
Expand Down

0 comments on commit e281f8a

Please sign in to comment.