diff --git a/docs/demos/24-07-11-scipy-2024/images/joss-perf-metrics.png b/docs/demos/24-07-11-scipy-2024/images/joss-perf-metrics.png new file mode 100644 index 00000000..f3fb3386 Binary files /dev/null and b/docs/demos/24-07-11-scipy-2024/images/joss-perf-metrics.png differ diff --git a/docs/demos/24-07-11-scipy-2024/scipy-2024.ipynb b/docs/demos/24-07-11-scipy-2024/scipy-2024.ipynb index 1242072c..fda60cdd 100644 --- a/docs/demos/24-07-11-scipy-2024/scipy-2024.ipynb +++ b/docs/demos/24-07-11-scipy-2024/scipy-2024.ipynb @@ -323,7 +323,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "metadata": { "slideshow": { "slide_type": "fragment" @@ -359,7 +359,7 @@ }, { "cell_type": "code", - "execution_count": 87, + "execution_count": 2, "metadata": { "cell_style": "split", "slideshow": { @@ -371,8 +371,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "CPU times: user 1.94 s, sys: 2.48 s, total: 4.42 s\n", - "Wall time: 21.5 s\n" + "CPU times: user 4.37 s, sys: 305 ms, total: 4.67 s\n", + "Wall time: 5.03 s\n" ] } ], @@ -410,7 +410,7 @@ }, { "cell_type": "code", - "execution_count": 88, + "execution_count": 3, "metadata": { "cell_style": "split", "slideshow": { @@ -422,8 +422,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "CPU times: user 2 s, sys: 1.78 s, total: 3.77 s\n", - "Wall time: 13.1 s\n" + "CPU times: user 5.45 s, sys: 739 ms, total: 6.19 s\n", + "Wall time: 6.27 s\n" ] } ], @@ -458,7 +458,7 @@ }, { "cell_type": "code", - "execution_count": 94, + "execution_count": 4, "metadata": { "slideshow": { "slide_type": "fragment" @@ -618,7 +618,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 5, "metadata": { "slideshow": { "slide_type": "notes" @@ -646,7 +646,7 @@ "" ] }, - "execution_count": 3, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -680,7 +680,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 6, "metadata": { "slideshow": { "slide_type": "fragment" @@ -732,7 +732,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 7, "metadata": { "slideshow": { "slide_type": "fragment" @@ -740,14 +740,21 @@ }, "outputs": [], "source": [ - "data_tas_url = \"https://esgf-data1.llnl.gov/thredds/dodsC/css03_data/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r10i1p1f1/Amon/tas/gn/v20200605/tas_Amon_ACCESS-ESM1-5_historical_r10i1p1f1_gn_185001-201412.nc\"\n", + "# Download link: \"https://esgf-data1.llnl.gov/thredds/fileServer/css03_data/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r10i1p1f1/Amon/tas/gn/v20200605/tas_Amon_ACCESS-ESM1-5_historical_r10i1p1f1_gn_185001-201412.nc\"\n", + "data_tas_url = Path(\n", + " \"docs/demos/24-07-11-scipy-2024/tas_Amon_ACCESS-ESM1-5_historical_r10i1p1f1_gn_185001-201412.nc\"\n", + ")\n", + "\n", + "# Use OpeNDAP if file is not downloaded locally.\n", + "if not data_tas_url.is_file():\n", + " data_tas_url = \"https://esgf-data1.llnl.gov/thredds/dodsC/css03_data/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/historical/r10i1p1f1/Amon/tas/gn/v20200605/tas_Amon_ACCESS-ESM1-5_historical_r10i1p1f1_gn_185001-201412.nc\"\n", "\n", "ds = xc.open_dataset(data_tas_url, chunks={\"time\": \"auto\"})" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 8, "metadata": { "slideshow": { "slide_type": "subslide" @@ -1134,8 +1141,7 @@ " units: K\n", " cell_methods: area: time: mean\n", " cell_measures: area: areacella\n", - " history: 2020-06-05T04:06:10Z altered by CMOR: Treated scalar dime...\n", - " _ChunkSizes: [ 1 145 192]" + " freq=None))
  • standard_name :
    air_temperature
    long_name :
    Near-Surface Air Temperature
    comment :
    near-surface (usually, 2 meter) air temperature
    units :
    K
    cell_methods :
    area: time: mean
    cell_measures :
    area: areacella
    history :
    2020-06-05T04:06:10Z altered by CMOR: Treated scalar dimension: 'height'. 2020-06-05T04:06:10Z altered by CMOR: replaced missing value flag (-1.07374e+09) with standard missing value (1e+20).
  • " ], "text/plain": [ " Size: 220MB\n", @@ -1300,11 +1306,10 @@ " units: K\n", " cell_methods: area: time: mean\n", " cell_measures: area: areacella\n", - " history: 2020-06-05T04:06:10Z altered by CMOR: Treated scalar dime...\n", - " _ChunkSizes: [ 1 145 192]" + " history: 2020-06-05T04:06:10Z altered by CMOR: Treated scalar dime..." ] }, - "execution_count": 6, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -1341,7 +1346,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 9, "metadata": { "slideshow": { "slide_type": "fragment" @@ -1373,7 +1378,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 10, "metadata": { "slideshow": { "slide_type": "fragment" @@ -1386,7 +1391,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 11, "metadata": { "slideshow": { "slide_type": "fragment" @@ -1767,16 +1772,16 @@ "Dimensions without coordinates: bnds\n", "Data variables:\n", " lon_bnds (lon, bnds) float64 1kB 0.0 4.0 4.0 8.0 ... 356.0 356.0 360.0\n", - " lat_bnds (lat, bnds) float64 720B -90.0 -86.0 -86.0 ... 86.0 86.0 90.0
  • " ], "text/plain": [ " Size: 3kB\n", @@ -1881,7 +1886,7 @@ " lat_bnds (lat, bnds) float64 720B -90.0 -86.0 -86.0 ... 86.0 86.0 90.0" ] }, - "execution_count": 9, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -1908,7 +1913,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 12, "metadata": { "slideshow": { "slide_type": "fragment" @@ -2294,36 +2299,36 @@ " lon_bnds (lon, bnds) float64 1kB 0.0 4.0 4.0 8.0 ... 356.0 356.0 360.0\n", " lat_bnds (lat, bnds) float64 720B -90.0 -86.0 -86.0 ... 86.0 86.0 90.0\n", " time_bnds (time, bnds) object 32kB 1850-01-01 00:00:00 ... 2015-01-01 00...\n", - "Attributes: (12/48)\n", - " Conventions: CF-1.7 CMIP-6.2\n", - " activity_id: CMIP\n", - " branch_method: standard\n", - " branch_time_in_child: 0.0\n", - " branch_time_in_parent: 87658.0\n", - " creation_date: 2020-06-05T04:06:11Z\n", - " ... ...\n", - " variant_label: r10i1p1f1\n", - " version: v20200605\n", - " license: CMIP6 model data produced by CSIRO is li...\n", - " cmor_version: 3.4.0\n", - " tracking_id: hdl:21.14100/af78ae5e-f3a6-4e99-8cfe-5f2...\n", - " DODS_EXTRA.Unlimited_Dimension: time" + "seaIce: CICE4.1 (same grid as ocean)
    source_id :
    ACCESS-ESM1-5
    source_type :
    AOGCM
    sub_experiment :
    none
    sub_experiment_id :
    none
    table_id :
    Amon
    table_info :
    Creation Date:(30 April 2019) MD5:5bd755e94c2173cb3050a0f3480f60c4
    title :
    ACCESS-ESM1-5 output prepared for CMIP6
    variable_id :
    tas
    variant_label :
    r10i1p1f1
    version :
    v20200605
    license :
    CMIP6 model data produced by CSIRO is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (https://creativecommons.org/licenses/). Consult https://pcmdi.llnl.gov/CMIP6/TermsOfUse for terms of use governing CMIP6 output, including citation requirements and proper acknowledgment. Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in this file). The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law.
    cmor_version :
    3.4.0
    tracking_id :
    hdl:21.14100/af78ae5e-f3a6-4e99-8cfe-5f29eb467cd1
    " ], "text/plain": [ " Size: 32MB\n", @@ -2503,23 +2508,23 @@ " lon_bnds (lon, bnds) float64 1kB 0.0 4.0 4.0 8.0 ... 356.0 356.0 360.0\n", " lat_bnds (lat, bnds) float64 720B -90.0 -86.0 -86.0 ... 86.0 86.0 90.0\n", " time_bnds (time, bnds) object 32kB 1850-01-01 00:00:00 ... 2015-01-01 00...\n", - "Attributes: (12/48)\n", - " Conventions: CF-1.7 CMIP-6.2\n", - " activity_id: CMIP\n", - " branch_method: standard\n", - " branch_time_in_child: 0.0\n", - " branch_time_in_parent: 87658.0\n", - " creation_date: 2020-06-05T04:06:11Z\n", - " ... ...\n", - " variant_label: r10i1p1f1\n", - " version: v20200605\n", - " license: CMIP6 model data produced by CSIRO is li...\n", - " cmor_version: 3.4.0\n", - " tracking_id: hdl:21.14100/af78ae5e-f3a6-4e99-8cfe-5f2...\n", - " DODS_EXTRA.Unlimited_Dimension: time" + "Attributes: (12/47)\n", + " Conventions: CF-1.7 CMIP-6.2\n", + " activity_id: CMIP\n", + " branch_method: standard\n", + " branch_time_in_child: 0.0\n", + " branch_time_in_parent: 87658.0\n", + " creation_date: 2020-06-05T04:06:11Z\n", + " ... ...\n", + " variable_id: tas\n", + " variant_label: r10i1p1f1\n", + " version: v20200605\n", + " license: CMIP6 model data produced by CSIRO is licensed un...\n", + " cmor_version: 3.4.0\n", + " tracking_id: hdl:21.14100/af78ae5e-f3a6-4e99-8cfe-5f29eb467cd1" ] }, - "execution_count": 10, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -2531,7 +2536,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 13, "metadata": { "slideshow": { "slide_type": "subslide" @@ -2919,8 +2924,7 @@ " cell_methods: area: time: mean\n", " cell_measures: area: areacella\n", " history: 2020-06-05T04:06:10Z altered by CMOR: Treated scalar dime...\n", - " _ChunkSizes: [ 1 145 192]\n", - " regrid_method: bilinear" + " dtype='int64', name='lat'))
  • standard_name :
    air_temperature
    long_name :
    Near-Surface Air Temperature
    comment :
    near-surface (usually, 2 meter) air temperature
    units :
    K
    cell_methods :
    area: time: mean
    cell_measures :
    area: areacella
    history :
    2020-06-05T04:06:10Z altered by CMOR: Treated scalar dimension: 'height'. 2020-06-05T04:06:10Z altered by CMOR: replaced missing value flag (-1.07374e+09) with standard missing value (1e+20).
    regrid_method :
    bilinear
  • " ], "text/plain": [ " Size: 32MB\n", @@ -3057,11 +3061,10 @@ " cell_methods: area: time: mean\n", " cell_measures: area: areacella\n", " history: 2020-06-05T04:06:10Z altered by CMOR: Treated scalar dime...\n", - " _ChunkSizes: [ 1 145 192]\n", " regrid_method: bilinear" ] }, - "execution_count": 11, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -3085,7 +3088,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 14, "metadata": { "slideshow": { "slide_type": "fragment" @@ -3098,7 +3101,7 @@ "Text(0.5, 1.0, 'xESMF 4$^{\\\\circ}$ x 4$^{\\\\circ}$')" ] }, - "execution_count": 12, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" }, @@ -3170,7 +3173,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 15, "metadata": { "slideshow": { "slide_type": "fragment" @@ -3558,7 +3561,7 @@ " cell_methods: area: time: mean\n", " cell_measures: area: areacella\n", " history: 2022-08-30T14:43:34Z altered by CMOR: Inverted axis: lev.\n", - " _ChunkSizes: [ 1 36 90 180]" + " dtype='object', length=12, calendar='noleap', freq=None))
  • standard_name :
    cloud_area_fraction_in_atmosphere_layer
    long_name :
    Percentage Cloud Cover
    comment :
    Percentage cloud cover, including both large-scale and convective cloud.
    units :
    %
    cell_methods :
    area: time: mean
    cell_measures :
    area: areacella
    history :
    2022-08-30T14:43:34Z altered by CMOR: Inverted axis: lev.
    _ChunkSizes :
    [ 1 36 90 180]
  • " ], "text/plain": [ " Size: 224MB\n", @@ -3751,13 +3754,21 @@ " _ChunkSizes: [ 1 36 90 180]" ] }, - "execution_count": 13, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "data_url = \"https://esgf-data2.llnl.gov/thredds/dodsC/user_pub_work/CMIP6/CMIP/E3SM-Project/E3SM-2-0/historical/r1i1p1f1/Amon/cl/gr/v20220830/cl_Amon_E3SM-2-0_historical_r1i1p1f1_gr_185001-189912.nc\"\n", + "# Download link: https://esgf-data2.llnl.gov/thredds/fileServer/user_pub_work/CMIP6/CMIP/E3SM-Project/E3SM-2-0/historical/r1i1p1f1/Amon/cl/gr/v20220830/cl_Amon_E3SM-2-0_historical_r1i1p1f1_gr_185001-189912.nc\n", + "data_url = Path(\n", + " \"docs/demos/24-07-11-scipy-2024/cl_Amon_E3SM-2-0_historical_r1i1p1f1_gr_185001-189912.nc\"\n", + ")\n", + "\n", + "# Use OpeNDAP if file is not downloaded locally.\n", + "if not data_url.is_file():\n", + " data_url = \"https://esgf-data2.llnl.gov/thredds/dodsC/user_pub_work/CMIP6/CMIP/E3SM-Project/E3SM-2-0/historical/r1i1p1f1/Amon/cl/gr/v20220830/cl_Amon_E3SM-2-0_historical_r1i1p1f1_gr_185001-189912.nc\"\n", + "\n", "\n", "ds_3d = xc.open_dataset(data_url, chunks={\"time\": \"auto\"})\n", "ds_3d = ds_3d.sel(time=ds_3d.time.dt.year == 1850)\n", @@ -3789,7 +3800,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 16, "metadata": { "slideshow": { "slide_type": "fragment" @@ -3800,7 +3811,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/gpfs/fs1/home/ac.tvo/mambaforge/envs/xcdat_scipy_2024/lib/python3.11/site-packages/xgcm/grid.py:989: FutureWarning: From version 0.8.0 the Axis computation methods will be removed, in favour of using the Grid computation methods instead. i.e. use `Grid.transform` instead of `Axis.transform`\n", + "/opt/miniconda3/envs/xcdat_scipy_2024/lib/python3.11/site-packages/xgcm/grid.py:989: FutureWarning: From version 0.8.0 the Axis computation methods will be removed, in favour of using the Grid computation methods instead. i.e. use `Grid.transform` instead of `Axis.transform`\n", " warnings.warn(\n" ] }, @@ -4197,7 +4208,7 @@ " tracking_id: hdl:21.14100/0a50835e-df81-4d09-a2a6-fed...\n", " version: v20220830\n", " references: Golaz, J.-C., L. P. Van Roekel, X. Zheng...\n", - " DODS_EXTRA.Unlimited_Dimension: time