-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add nest_asyncio to deal with multiple event loops
- Loading branch information
1 parent
d385ff7
commit d3e0c56
Showing
6 changed files
with
125 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"id": "2c3659e1-ede1-4a79-b0bb-5346c5336300", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"downloading https://www.earthbyte.org/webdav/ftp/Data_Collections/Muller_etal_2019_Tectonics/Muller_etal_2019_Agegrids/Muller_etal_2019_Tectonics_v2.0_netCDF/Muller_etal_2019_Tectonics_v2.0_AgeGrid-0.ncdownloading https://www.earthbyte.org/webdav/ftp/Data_Collections/Muller_etal_2019_Tectonics/Muller_etal_2019_Agegrids/Muller_etal_2019_Tectonics_v2.0_netCDF/Muller_etal_2019_Tectonics_v2.0_AgeGrid-1.nc\n", | ||
"\n", | ||
"The local file(s) is/are still good. Will not download again at this moment.\n", | ||
"The local file(s) is/are still good. Will not download again at this moment.\n", | ||
"downloading https://repo.gplates.org/webdav/pmm/muller2019/Coastlines.zip\n", | ||
"downloading https://repo.gplates.org/webdav/pmm/muller2019/Rotations.zip\n", | ||
"downloading https://repo.gplates.org/webdav/pmm/muller2019/ContinentalPolygons.zip\n", | ||
"downloading https://repo.gplates.org/webdav/pmm/muller2019/StaticPolygons.zip\n", | ||
"downloading https://repo.gplates.org/webdav/pmm/muller2019/Topologies.zip\n", | ||
"downloading https://repo.gplates.org/webdav/pmm/muller2019/COBs.zip\n", | ||
"The local file(s) is/are still good. Will not download again at this moment.\n", | ||
"The local file(s) is/are still good. Will not download again at this moment.\n", | ||
"The local file(s) is/are still good. Will not download again at this moment.\n", | ||
"The local file(s) is/are still good. Will not download again at this moment.\n", | ||
"The local file(s) is/are still good. Will not download again at this moment.\n", | ||
"The local file(s) is/are still good. Will not download again at this moment.\n" | ||
] | ||
}, | ||
{ | ||
"name": "stderr", | ||
"output_type": "stream", | ||
"text": [ | ||
"/Users/mchin/workspace/plate-model-manager.git/src/plate_model_manager/plate_model.py:360: RuntimeWarning: coroutine 'PlateModel.download_time_dependent_rasters.<locals>.f' was never awaited\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"#import nest_asyncio\n", | ||
"#nest_asyncio.apply()\n", | ||
"#you need to uncomment the two lines above if you don't what to see a warning\n", | ||
"\n", | ||
"import sys,os\n", | ||
"sys.path.insert(0, f\"/Users/mchin/workspace/plate-model-manager.git/src\")\n", | ||
"from plate_model_manager import PlateModelManager\n", | ||
"pm_manager = PlateModelManager()\n", | ||
"muller2019_model = pm_manager.get_model(\"Muller2019\", data_dir=\"plate-model-repo\")\n", | ||
"muller2019_model.get_rasters(\"AgeGrids\", [0,1])\n", | ||
"muller2019_model.download_all_layers()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "47900e7f-4074-4834-b6e5-30e30b828b8c", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.12.0" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |