Skip to content

Commit

Permalink
Look at number of requests uploaded
Browse files Browse the repository at this point in the history
  • Loading branch information
jonseddon committed Jul 20, 2020
1 parent c9bbb05 commit b5af6f1
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.ipynb_checkpoints
39 changes: 32 additions & 7 deletions d9_6.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,10 @@
" institute__short_name__in=['MOHC', 'NERC'],\n",
" experiment__short_name__in=expts,\n",
" rip_code__in=mohc_stream2_members,\n",
" datafile__isnull=False\n",
"))\n",
"\n",
"others = DataRequest.objects.filter(\n",
" experiment__short_name__in=expts,\n",
" datafile__isnull=False\n",
").exclude(\n",
" # Exclude MOHC Stream 2\n",
" institute__short_name__in=['MOHC', 'NERC'],\n",
Expand All @@ -102,7 +100,7 @@
" rip_code='r1i1p1f1'\n",
").distinct()\n",
"\n",
"stream_1_2 = hadgem_s2 | others"
"stream_1_2 = (hadgem_s2 | others).filter(datafile__isnull=False)"
]
},
{
Expand Down Expand Up @@ -131,7 +129,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"30955 data requests were uploaded consisting of 1.5 PB\n"
"31048 data requests were uploaded consisting of 1.5 PB\n"
]
}
],
Expand Down Expand Up @@ -175,8 +173,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"5941 unique data requests were restored, 19.2% of the total uploaded\n",
"417.6 TB of unique data requests were restored, 26.5% of the volume uploaded\n"
"6070 unique data requests were restored, 19.6% of the total uploaded\n",
"426.3 TB of unique data requests were restored, 27.3% of the volume uploaded\n"
]
}
],
Expand All @@ -187,6 +185,33 @@
" f'were restored, '\n",
" f'{volume_stream_1_2_restored / volume_stream_1_2:.1%} of the volume uploaded')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Find planned Stream 1 and 2 (ignore additional HadGEM)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"60275 data requests were originally planned to be uploaded. 31048 data requests were actually uploaded, which is 51.5% of the number planned\n"
]
}
],
"source": [
"stream_1_2_planned = hadgem_s2 | others\n",
"print(f'{stream_1_2_planned.count()} data requests were originally planned to be uploaded. '\n",
" f'{stream_1_2.count()} data requests were actually uploaded, which is '\n",
" f'{stream_1_2.count() / stream_1_2_planned.count():.1%} of the number planned')"
]
}
],
"metadata": {
Expand All @@ -205,7 +230,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.6.7"
}
},
"nbformat": 4,
Expand Down

0 comments on commit b5af6f1

Please sign in to comment.