Skip to content

Commit

Permalink
changed text for dask intitiation
Browse files Browse the repository at this point in the history
  • Loading branch information
shanicetbailey committed Jun 20, 2024
1 parent fb0cca8 commit 0e84535
Showing 1 changed file with 4 additions and 116 deletions.
120 changes: 4 additions & 116 deletions notebooks/cfc-ocean.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"Extreme weather events, both atmospheric and oceanic, are increasing in frequency and intensity as a consequence of anthropogenic warming. The processes responsible for such events and their impacts on Caribbean lives remain to be well understood. Our Caribbeans for Climate community (a community of Caribbean-identified climate scientists, oceanographers, and practitioners) have created a cookbook analyzing Caribbean atmospheric and oceanic extreme weather variability from 1850-2015, using Coupled Model Intercomparison Project Phase 6 (CMIP6) data. In this notebook, we execute basic statistical analysis to investigate the linkages between extreme atmospheric and oceanic heat-related events and the possible causes behind them.\n",
"\n",
"\n",
"1. Locate times when sea surface temperatures exceeded the 99th percentile threshold and persisted for >10 days (MHW events)\n",
"1. Locate times when sea surface temperatures exceeded the 99th percentile threshold and persisted for $\\geq$10 days (MHW events)\n",
"1. Timeseries of ENSO 3.4 index overlaid on top of MHW events\n",
"1. Run basic statistics to determine any correlation between the aforementioned metrics"
]
Expand Down Expand Up @@ -75,137 +75,25 @@
]
},
{
"cell_type": "code",
"execution_count": 2,
"cell_type": "raw",
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Collecting git+https://github.com/mathause/regionmask.git\n",
" Cloning https://github.com/mathause/regionmask.git to /tmp/pip-req-build-2cr33sip\n",
" Running command git clone --filter=blob:none --quiet https://github.com/mathause/regionmask.git /tmp/pip-req-build-2cr33sip\n",
" Resolved https://github.com/mathause/regionmask.git to commit 8fa448e1ae9131ecb028b52ce3740d3627d8fe75\n",
" Installing build dependencies ... \u001b[?25ldone\n",
"\u001b[?25h Getting requirements to build wheel ... \u001b[?25ldone\n",
"\u001b[?25h Installing backend dependencies ... \u001b[?25ldone\n",
"\u001b[?25h Preparing metadata (pyproject.toml) ... \u001b[?25ldone\n",
"\u001b[?25hRequirement already satisfied: geopandas>=0.10 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from regionmask==0.9.0.post1.dev95+g8fa448e) (0.14.4)\n",
"Requirement already satisfied: numpy>=1.21 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from regionmask==0.9.0.post1.dev95+g8fa448e) (1.26.4)\n",
"Requirement already satisfied: packaging>=21.3 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from regionmask==0.9.0.post1.dev95+g8fa448e) (24.0)\n",
"Requirement already satisfied: pooch>=1.4 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from regionmask==0.9.0.post1.dev95+g8fa448e) (1.8.1)\n",
"Requirement already satisfied: rasterio>=1.2 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from regionmask==0.9.0.post1.dev95+g8fa448e) (1.3.9)\n",
"Requirement already satisfied: shapely>=1.8 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from regionmask==0.9.0.post1.dev95+g8fa448e) (2.0.4)\n",
"Requirement already satisfied: xarray>=0.20 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from regionmask==0.9.0.post1.dev95+g8fa448e) (2024.5.0)\n",
"Requirement already satisfied: fiona>=1.8.21 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from geopandas>=0.10->regionmask==0.9.0.post1.dev95+g8fa448e) (1.9.6)\n",
"Requirement already satisfied: pandas>=1.4.0 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from geopandas>=0.10->regionmask==0.9.0.post1.dev95+g8fa448e) (2.2.2)\n",
"Requirement already satisfied: pyproj>=3.3.0 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from geopandas>=0.10->regionmask==0.9.0.post1.dev95+g8fa448e) (3.6.1)\n",
"Requirement already satisfied: platformdirs>=2.5.0 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from pooch>=1.4->regionmask==0.9.0.post1.dev95+g8fa448e) (4.2.2)\n",
"Requirement already satisfied: requests>=2.19.0 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from pooch>=1.4->regionmask==0.9.0.post1.dev95+g8fa448e) (2.32.1)\n",
"Requirement already satisfied: affine in /srv/conda/envs/notebook/lib/python3.11/site-packages (from rasterio>=1.2->regionmask==0.9.0.post1.dev95+g8fa448e) (2.4.0)\n",
"Requirement already satisfied: attrs in /srv/conda/envs/notebook/lib/python3.11/site-packages (from rasterio>=1.2->regionmask==0.9.0.post1.dev95+g8fa448e) (23.2.0)\n",
"Requirement already satisfied: certifi in /srv/conda/envs/notebook/lib/python3.11/site-packages (from rasterio>=1.2->regionmask==0.9.0.post1.dev95+g8fa448e) (2024.2.2)\n",
"Requirement already satisfied: click>=4.0 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from rasterio>=1.2->regionmask==0.9.0.post1.dev95+g8fa448e) (8.1.7)\n",
"Requirement already satisfied: cligj>=0.5 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from rasterio>=1.2->regionmask==0.9.0.post1.dev95+g8fa448e) (0.7.2)\n",
"Requirement already satisfied: snuggs>=1.4.1 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from rasterio>=1.2->regionmask==0.9.0.post1.dev95+g8fa448e) (1.4.7)\n",
"Requirement already satisfied: click-plugins in /srv/conda/envs/notebook/lib/python3.11/site-packages (from rasterio>=1.2->regionmask==0.9.0.post1.dev95+g8fa448e) (1.1.1)\n",
"Requirement already satisfied: setuptools in /srv/conda/envs/notebook/lib/python3.11/site-packages (from rasterio>=1.2->regionmask==0.9.0.post1.dev95+g8fa448e) (69.5.1)\n",
"Requirement already satisfied: six in /srv/conda/envs/notebook/lib/python3.11/site-packages (from fiona>=1.8.21->geopandas>=0.10->regionmask==0.9.0.post1.dev95+g8fa448e) (1.16.0)\n",
"Requirement already satisfied: python-dateutil>=2.8.2 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from pandas>=1.4.0->geopandas>=0.10->regionmask==0.9.0.post1.dev95+g8fa448e) (2.8.2)\n",
"Requirement already satisfied: pytz>=2020.1 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from pandas>=1.4.0->geopandas>=0.10->regionmask==0.9.0.post1.dev95+g8fa448e) (2024.1)\n",
"Requirement already satisfied: tzdata>=2022.7 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from pandas>=1.4.0->geopandas>=0.10->regionmask==0.9.0.post1.dev95+g8fa448e) (2024.1)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from requests>=2.19.0->pooch>=1.4->regionmask==0.9.0.post1.dev95+g8fa448e) (3.3.2)\n",
"Requirement already satisfied: idna<4,>=2.5 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from requests>=2.19.0->pooch>=1.4->regionmask==0.9.0.post1.dev95+g8fa448e) (3.7)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from requests>=2.19.0->pooch>=1.4->regionmask==0.9.0.post1.dev95+g8fa448e) (1.26.18)\n",
"Requirement already satisfied: pyparsing>=2.1.6 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from snuggs>=1.4.1->rasterio>=1.2->regionmask==0.9.0.post1.dev95+g8fa448e) (3.1.2)\n",
"Building wheels for collected packages: regionmask\n",
" Building wheel for regionmask (pyproject.toml) ... \u001b[?25ldone\n",
"\u001b[?25h Created wheel for regionmask: filename=regionmask-0.9.0.post1.dev95+g8fa448e-py3-none-any.whl size=68020 sha256=01b64382bca02fa9df8f8ce8f0e9a0a4ae284181d908e34eac603c65e48cf5db\n",
" Stored in directory: /tmp/pip-ephem-wheel-cache-ir618ba8/wheels/12/3c/e1/f1c2864aa8015b011d0c6dca10f004441dd966f8b80b6e0583\n",
"Successfully built regionmask\n",
"Installing collected packages: regionmask\n",
"Successfully installed regionmask-0.9.0.post1.dev95+g8fa448e\n"
]
}
],
"source": [
"!pip install git+https://github.com/mathause/regionmask.git"
]
},
{
"cell_type": "code",
"execution_count": 3,
"cell_type": "raw",
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Collecting git+https://github.com/jbusecke/xmip.git\n",
" Cloning https://github.com/jbusecke/xmip.git to /tmp/pip-req-build-tbbtazrc\n",
" Running command git clone --filter=blob:none --quiet https://github.com/jbusecke/xmip.git /tmp/pip-req-build-tbbtazrc\n",
" Resolved https://github.com/jbusecke/xmip.git to commit aff665950556abc1bdbae521c308a86f9ef8899a\n",
" Installing build dependencies ... \u001b[?25ldone\n",
"\u001b[?25h Getting requirements to build wheel ... \u001b[?25ldone\n",
"\u001b[?25h Preparing metadata (pyproject.toml) ... \u001b[?25ldone\n",
"\u001b[?25hRequirement already satisfied: numpy in /srv/conda/envs/notebook/lib/python3.11/site-packages (from xmip==0.7.3.dev20+gaff6659) (1.26.4)\n",
"Requirement already satisfied: pandas in /srv/conda/envs/notebook/lib/python3.11/site-packages (from xmip==0.7.3.dev20+gaff6659) (2.2.2)\n",
"Requirement already satisfied: xarray>=0.17.0 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from xmip==0.7.3.dev20+gaff6659) (2024.5.0)\n",
"Collecting xgcm<0.7.0 (from xmip==0.7.3.dev20+gaff6659)\n",
" Using cached xgcm-0.6.1-py3-none-any.whl.metadata (6.0 kB)\n",
"Requirement already satisfied: cftime in /srv/conda/envs/notebook/lib/python3.11/site-packages (from xmip==0.7.3.dev20+gaff6659) (1.6.3)\n",
"Requirement already satisfied: xarrayutils in /srv/conda/envs/notebook/lib/python3.11/site-packages (from xmip==0.7.3.dev20+gaff6659) (2.0.1)\n",
"Requirement already satisfied: pint in /srv/conda/envs/notebook/lib/python3.11/site-packages (from xmip==0.7.3.dev20+gaff6659) (0.23)\n",
"Requirement already satisfied: cf-xarray>=0.6.0 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from xmip==0.7.3.dev20+gaff6659) (0.9.0)\n",
"Requirement already satisfied: pint-xarray in /srv/conda/envs/notebook/lib/python3.11/site-packages (from xmip==0.7.3.dev20+gaff6659) (0.3)\n",
"Requirement already satisfied: packaging>=23.1 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from xarray>=0.17.0->xmip==0.7.3.dev20+gaff6659) (24.0)\n",
"Requirement already satisfied: python-dateutil>=2.8.2 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from pandas->xmip==0.7.3.dev20+gaff6659) (2.8.2)\n",
"Requirement already satisfied: pytz>=2020.1 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from pandas->xmip==0.7.3.dev20+gaff6659) (2024.1)\n",
"Requirement already satisfied: tzdata>=2022.7 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from pandas->xmip==0.7.3.dev20+gaff6659) (2024.1)\n",
"Requirement already satisfied: dask in /srv/conda/envs/notebook/lib/python3.11/site-packages (from xgcm<0.7.0->xmip==0.7.3.dev20+gaff6659) (2024.5.1)\n",
"Requirement already satisfied: future in /srv/conda/envs/notebook/lib/python3.11/site-packages (from xgcm<0.7.0->xmip==0.7.3.dev20+gaff6659) (1.0.0)\n",
"Requirement already satisfied: typing-extensions in /srv/conda/envs/notebook/lib/python3.11/site-packages (from pint->xmip==0.7.3.dev20+gaff6659) (4.11.0)\n",
"Requirement already satisfied: scipy in /srv/conda/envs/notebook/lib/python3.11/site-packages (from xarrayutils->xmip==0.7.3.dev20+gaff6659) (1.13.0)\n",
"Requirement already satisfied: six>=1.5 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from python-dateutil>=2.8.2->pandas->xmip==0.7.3.dev20+gaff6659) (1.16.0)\n",
"Requirement already satisfied: click>=8.1 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from dask->xgcm<0.7.0->xmip==0.7.3.dev20+gaff6659) (8.1.7)\n",
"Requirement already satisfied: cloudpickle>=1.5.0 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from dask->xgcm<0.7.0->xmip==0.7.3.dev20+gaff6659) (3.0.0)\n",
"Requirement already satisfied: fsspec>=2021.09.0 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from dask->xgcm<0.7.0->xmip==0.7.3.dev20+gaff6659) (2024.5.0)\n",
"Requirement already satisfied: partd>=1.2.0 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from dask->xgcm<0.7.0->xmip==0.7.3.dev20+gaff6659) (1.4.2)\n",
"Requirement already satisfied: pyyaml>=5.3.1 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from dask->xgcm<0.7.0->xmip==0.7.3.dev20+gaff6659) (6.0.1)\n",
"Requirement already satisfied: toolz>=0.10.0 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from dask->xgcm<0.7.0->xmip==0.7.3.dev20+gaff6659) (0.12.1)\n",
"Requirement already satisfied: importlib-metadata>=4.13.0 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from dask->xgcm<0.7.0->xmip==0.7.3.dev20+gaff6659) (7.1.0)\n",
"Requirement already satisfied: zipp>=0.5 in /srv/conda/envs/notebook/lib/python3.11/site-packages (from importlib-metadata>=4.13.0->dask->xgcm<0.7.0->xmip==0.7.3.dev20+gaff6659) (3.17.0)\n",
"Requirement already satisfied: locket in /srv/conda/envs/notebook/lib/python3.11/site-packages (from partd>=1.2.0->dask->xgcm<0.7.0->xmip==0.7.3.dev20+gaff6659) (1.0.0)\n",
"Using cached xgcm-0.6.1-py3-none-any.whl (60 kB)\n",
"Building wheels for collected packages: xmip\n",
" Building wheel for xmip (pyproject.toml) ... \u001b[?25ldone\n",
"\u001b[?25h Created wheel for xmip: filename=xmip-0.7.3.dev20+gaff6659-py3-none-any.whl size=58791 sha256=a9e1f74e23b7ecb7b975453cc32b6cec4983fa4b375c42eff9fa923c89e8eeb6\n",
" Stored in directory: /tmp/pip-ephem-wheel-cache-d7n1k7g6/wheels/cc/cb/e0/c0e3e2261ea5177d2f86070a483c40d9c878e6dd2e14a7f824\n",
"Successfully built xmip\n",
"Installing collected packages: xgcm, xmip\n",
" Attempting uninstall: xgcm\n",
" Found existing installation: xgcm 0.8.1\n",
" Uninstalling xgcm-0.8.1:\n",
" Successfully uninstalled xgcm-0.8.1\n",
" Attempting uninstall: xmip\n",
" Found existing installation: xmip 0.7.2\n",
" Uninstalling xmip-0.7.2:\n",
" Successfully uninstalled xmip-0.7.2\n",
"Successfully installed xgcm-0.6.1 xmip-0.7.3.dev20+gaff6659\n"
]
}
],
"source": [
"!pip install git+https://github.com/jbusecke/xmip.git"
]
Expand All @@ -214,7 +102,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"To initiate your ```Client```, navigate to the ```Dask```![<Dask>](dask_icon_v2.ico \"Dask logo\") tab in the far-left sidebar and click on the `+New` button in the lower left of the sidebar window (you can `Scale` to 8 workers to make the computation faster). Once the cluster is active, a `<>` button will appear left of the `Scale` button . Click on it and it will paste a cell with the Client code (like the one below) - run that and delete this old cell. Click on the `Launch dashboard in JupyterLab` button and the Task Stream, Workers Memory and Progress windows will open. In order to get them to render you have to replace `tcp://127.0.0.1:` with `proxy` in the searchbar at the top of the sidebar window"
"To initiate your ```Client```, navigate to the Dask ![<Dask>](dask_icon_v2.ico \"Dask logo\") tab in the far-left sidebar and click on the `+New` button in the lower left of the sidebar window (you can `Scale` to 8 workers to make the computation faster). Once the cluster is active, a `<>` button will appear left of the `Scale` button . Click on it and it will paste a cell with the Client code (like the one below) - run that and delete this old cell. Click on the `Launch dashboard in JupyterLab` button and the Task Stream, Workers Memory and Progress windows will open. In order to get them to render you have to replace `tcp://127.0.0.1:` with `proxy` in the searchbar at the top of the sidebar window"
]
},
{
Expand Down

0 comments on commit 0e84535

Please sign in to comment.