Skip to content

Commit e59fbbf

Browse files
authored
Merge pull request #146 from neuromatch/staging
Staging
2 parents 213e303 + 8dbc98d commit e59fbbf

51 files changed

Lines changed: 117 additions & 60 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tutorials/W1D3_RemoteSensing/W1D3_Tutorial5.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@
594594
},
595595
"outputs": [],
596596
"source": [
597-
"# calculate 12-month rolling mean for the selected location\n",
597+
"# calculate 12-month rolling mean for the selected location, add in .compute() at the end if using Google Colab if it throws an error\n",
598598
"grid_month = precip_anom.sel(latitude=0, longitude=0, method=\"nearest\")\n",
599599
"grid_rolling = grid_month.rolling(time=12, center=True).mean()"
600600
]
@@ -787,7 +787,7 @@
787787
},
788788
"outputs": [],
789789
"source": [
790-
"# calculate weighted global monthly mean\n",
790+
"# calculate weighted global monthly mean, add .compute() if using Google Colab and it throws an error\n",
791791
"anom_weighted = precip_anom.weighted(weights)\n",
792792
"global_weighted_mean = anom_weighted.mean((\"latitude\", \"longitude\"))\n",
793793
"global_weighted_mean"
@@ -1001,7 +1001,7 @@
10011001
"name": "python",
10021002
"nbconvert_exporter": "python",
10031003
"pygments_lexer": "ipython3",
1004-
"version": "3.9.19"
1004+
"version": "3.9.18"
10051005
}
10061006
},
10071007
"nbformat": 4,

tutorials/W1D3_RemoteSensing/W1D3_Tutorial8.ipynb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,11 @@
557557
"# open all the monthly data files and concatenate them along the time dimension.\n",
558558
"# this process will take ~ 1 minute to complete due to the number of data files.\n",
559559
"ds_gpcp = xr.open_mfdataset(file_ob, combine=\"nested\", concat_dim=\"time\")\n",
560+
"\n",
561+
"# comment for colab users only: this could toss an error message for you.\n",
562+
"# you should still be able to use the dataset with this error just not print ds\n",
563+
"# you can try uncommenting the following line to avoid the error\n",
564+
"# ds_gpcp.attrs['history']='' # the history attribute have unique chars that cause a crash on Google colab.\n",
560565
"ds_gpcp"
561566
]
562567
},
@@ -1058,7 +1063,7 @@
10581063
"name": "python",
10591064
"nbconvert_exporter": "python",
10601065
"pygments_lexer": "ipython3",
1061-
"version": "3.9.19"
1066+
"version": "3.9.18"
10621067
}
10631068
},
10641069
"nbformat": 4,

tutorials/W1D3_RemoteSensing/instructor/W1D3_Tutorial5.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@
594594
},
595595
"outputs": [],
596596
"source": [
597-
"# calculate 12-month rolling mean for the selected location\n",
597+
"# calculate 12-month rolling mean for the selected location, add in .compute() at the end if using Google Colab if it throws an error\n",
598598
"grid_month = precip_anom.sel(latitude=0, longitude=0, method=\"nearest\")\n",
599599
"grid_rolling = grid_month.rolling(time=12, center=True).mean()"
600600
]
@@ -789,7 +789,7 @@
789789
},
790790
"outputs": [],
791791
"source": [
792-
"# calculate weighted global monthly mean\n",
792+
"# calculate weighted global monthly mean, add .compute() if using Google Colab and it throws an error\n",
793793
"anom_weighted = precip_anom.weighted(weights)\n",
794794
"global_weighted_mean = anom_weighted.mean((\"latitude\", \"longitude\"))\n",
795795
"global_weighted_mean"
@@ -1005,7 +1005,7 @@
10051005
"name": "python",
10061006
"nbconvert_exporter": "python",
10071007
"pygments_lexer": "ipython3",
1008-
"version": "3.9.19"
1008+
"version": "3.9.18"
10091009
}
10101010
},
10111011
"nbformat": 4,

tutorials/W1D3_RemoteSensing/instructor/W1D3_Tutorial8.ipynb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,11 @@
557557
"# open all the monthly data files and concatenate them along the time dimension.\n",
558558
"# this process will take ~ 1 minute to complete due to the number of data files.\n",
559559
"ds_gpcp = xr.open_mfdataset(file_ob, combine=\"nested\", concat_dim=\"time\")\n",
560+
"\n",
561+
"# comment for colab users only: this could toss an error message for you.\n",
562+
"# you should still be able to use the dataset with this error just not print ds\n",
563+
"# you can try uncommenting the following line to avoid the error\n",
564+
"# ds_gpcp.attrs['history']='' # the history attribute have unique chars that cause a crash on Google colab.\n",
560565
"ds_gpcp"
561566
]
562567
},
@@ -1060,7 +1065,7 @@
10601065
"name": "python",
10611066
"nbconvert_exporter": "python",
10621067
"pygments_lexer": "ipython3",
1063-
"version": "3.9.19"
1068+
"version": "3.9.18"
10641069
}
10651070
},
10661071
"nbformat": 4,
1.87 KB
Loading
1.12 KB
Loading
138 KB
Loading
4.01 KB
Loading
Binary file not shown.

tutorials/W1D3_RemoteSensing/student/W1D3_Tutorial5.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@
594594
},
595595
"outputs": [],
596596
"source": [
597-
"# calculate 12-month rolling mean for the selected location\n",
597+
"# calculate 12-month rolling mean for the selected location, add in .compute() at the end if using Google Colab if it throws an error\n",
598598
"grid_month = precip_anom.sel(latitude=0, longitude=0, method=\"nearest\")\n",
599599
"grid_rolling = grid_month.rolling(time=12, center=True).mean()"
600600
]
@@ -678,7 +678,7 @@
678678
"\n",
679679
"*Example output:*\n",
680680
"\n",
681-
"<img alt='Solution hint' align='left' width=774.0 height=575.0 src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W1D3_RemoteSensing/static/W1D3_Tutorial5_Solution_b9708e8c_0.png>\n",
681+
"<img alt='Solution hint' align='left' width=775.0 height=575.0 src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W1D3_RemoteSensing/static/W1D3_Tutorial5_Solution_b9708e8c_0.png>\n",
682682
"\n"
683683
]
684684
},
@@ -767,7 +767,7 @@
767767
},
768768
"outputs": [],
769769
"source": [
770-
"# calculate weighted global monthly mean\n",
770+
"# calculate weighted global monthly mean, add .compute() if using Google Colab and it throws an error\n",
771771
"anom_weighted = precip_anom.weighted(weights)\n",
772772
"global_weighted_mean = anom_weighted.mean((\"latitude\", \"longitude\"))\n",
773773
"global_weighted_mean"
@@ -959,7 +959,7 @@
959959
"name": "python",
960960
"nbconvert_exporter": "python",
961961
"pygments_lexer": "ipython3",
962-
"version": "3.9.19"
962+
"version": "3.9.18"
963963
}
964964
},
965965
"nbformat": 4,

0 commit comments

Comments
 (0)