Skip to content

Instantly share code, notes, and snippets.

@emileten
Created July 17, 2024 10:48
Show Gist options
  • Save emileten/80b0a3e5c57820a741db5b991eac34be to your computer and use it in GitHub Desktop.
Save emileten/80b0a3e5c57820a741db5b991eac34be to your computer and use it in GitHub Desktop.
open_nasa_hazard_osc
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"from hazard.sources.nex_gddp_cmip6 import NexGddpCmip6"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"nasa_data = NexGddpCmip6()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<xarray.Dataset>\n",
"Dimensions: (time: 365, lat: 600, lon: 1440)\n",
"Coordinates:\n",
" * time (time) object 2030-01-01 12:00:00 ... 2030-12-31 12:00:00\n",
" * lat (lat) float64 -59.88 -59.62 -59.38 -59.12 ... 89.38 89.62 89.88\n",
" * lon (lon) float64 0.125 0.375 0.625 0.875 ... 359.1 359.4 359.6 359.9\n",
"Data variables:\n",
" tas (time, lat, lon) float32 ...\n",
"Attributes: (12/22)\n",
" activity: NEX-GDDP-CMIP6\n",
" contact: Dr. Rama Nemani: [email protected], Dr. Bridget...\n",
" Conventions: CF-1.7\n",
" creation_date: 2021-10-04T20:16:42.405302+00:00\n",
" frequency: day\n",
" institution: NASA Earth Exchange, NASA Ames Research Center, Mo...\n",
" ... ...\n",
" history: 2021-10-04T20:16:42.405302+00:00: install global a...\n",
" disclaimer: This data is considered provisional and subject to...\n",
" external_variables: areacella\n",
" cmip6_source_id: NorESM2-MM\n",
" cmip6_institution_id: NCC\n",
" cmip6_license: CC-BY-SA 4.0\n"
]
}
],
"source": [
"with nasa_data.open_dataset_year(gcm=\"NorESM2-MM\", scenario=\"ssp585\", quantity=\"tas\", year=2030) as ds:\n",
" print(ds)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"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.9.16"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment