|
92 | 92 | "### Available LLC2160 Datasets in the Cloud\n", |
93 | 93 | "\n", |
94 | 94 | "The datasets listed below represent different physical fields from the LLC2160 global ocean simulation. \n", |
95 | | - "Each dataset is over **200 TB** in size and is hosted on the cloud via **OSDF** for scalable, on-demand access.\n", |
| 95 | + "Each dataset is over **200 TB** in size and is hosted on the cloud via **SealStorage** for scalable, on-demand access.\n", |
96 | 96 | "\n", |
97 | 97 | "You can select any of these fields for analysis by referencing their corresponding URLs defined in the next cell." |
98 | 98 | ] |
99 | 99 | }, |
| 100 | + { |
| 101 | + "cell_type": "code", |
| 102 | + "execution_count": null, |
| 103 | + "id": "7e5ba72d", |
| 104 | + "metadata": {}, |
| 105 | + "outputs": [], |
| 106 | + "source": [ |
| 107 | + "# Step 1b: Define variable of interest \n", |
| 108 | + "\n", |
| 109 | + "variable = 'salt' # options are u,v,w,theta,salt\n", |
| 110 | + " \n", |
| 111 | + " #u: East-West Ocean Velocity\n", |
| 112 | + " #v: North-South Ocean Velocity\n", |
| 113 | + " #w: Vertical Ocean Velocity\n", |
| 114 | + " #theta: Ocean Temperature\n", |
| 115 | + " #salt: Ocean Salinity" |
| 116 | + ] |
| 117 | + }, |
100 | 118 | { |
101 | 119 | "cell_type": "code", |
102 | 120 | "execution_count": null, |
|
106 | 124 | }, |
107 | 125 | "outputs": [], |
108 | 126 | "source": [ |
109 | | - "# Step 1b: Define Cloud-Based LLC2160 Dataset URLs\n", |
110 | 127 | "\n", |
| 128 | + "# Cloud-Based LLC2160 Dataset URLs based on the variable above\n", |
111 | 129 | "# These variables point to IDX-formatted datasets hosted on OSDF\n", |
112 | 130 | "# Each URL provides access to a different physical variable from the LLC2160 ocean simulation\n", |
113 | | - "\n", |
114 | | - "eastwest_ocean_velocity_u = \"https://nsdf-climate3-origin.nationalresearchplatform.org:50098/nasa/nsdf/climate3/dyamond/mit_output/llc2160_arco/visus.idx\"\n", |
115 | | - "\n", |
116 | | - "northsouth_ocean_velocity_v = \"https://nsdf-climate3-origin.nationalresearchplatform.org:50098/nasa/nsdf/climate3/dyamond/mit_output//llc2160_v/v_llc2160_x_y_depth.idx\"\n", |
117 | | - "\n", |
118 | | - "vertical_velocity_w = \"https://nsdf-climate3-origin.nationalresearchplatform.org:50098/nasa/nsdf/climate3/dyamond/mit_output/llc2160_w/llc2160_w.idx\"\n", |
119 | | - "\n", |
120 | | - "temperature_theta = \"https://nsdf-climate3-origin.nationalresearchplatform.org:50098/nasa/nsdf/climate3/dyamond/mit_output//llc2160_theta/llc2160_theta.idx\"\n", |
121 | | - "\n", |
122 | | - "Salinity_salt = \"https://nsdf-climate3-origin.nationalresearchplatform.org:50098/nasa/nsdf/climate3/dyamond/mit_output/llc2160_salt/salt_llc2160_x_y_depth.idx\"\n", |
123 | | - "\n", |
| 131 | + "# DONOT TOUCH\n", |
| 132 | + "base_url= \"https://maritime.sealstorage.io/api/v0/s3/utah/nasa/dyamond/\"\n", |
| 133 | + "end_url=\"?access_key=any&secret_key=any&endpoint_url=https://maritime.sealstorage.io/api/v0/s3&cached=arco\"\n", |
| 134 | + "if variable==\"theta\" or variable==\"w\":\n", |
| 135 | + " base_dir=f\"mit_output/llc2160_{variable}/llc2160_{variable}.idx\"\n", |
| 136 | + "elif variable==\"u\":\n", |
| 137 | + " base_dir= \"mit_output/llc2160_arco/visus.idx\"\n", |
| 138 | + "else:\n", |
| 139 | + " base_dir=f\"mit_output/llc2160_{variable}/{variable}_llc2160_x_y_depth.idx\"\n", |
| 140 | + "\n", |
| 141 | + "field= base_url+base_dir+end_url\n", |
124 | 142 | "print(\"Step 1b done: Defined dataset URLs for u, v, w velocity components, temperature, and salinity.\")\n" |
125 | 143 | ] |
126 | 144 | }, |
|
148 | 166 | "\n", |
149 | 167 | "In this step, we read the metadata associated with a dataset hosted on the cloud.\n", |
150 | 168 | "\n", |
151 | | - "You can replace the example input variable `Salinity_salt` with any of the dataset URLs defined earlier in **Step 1** (e.g., `temperature_theta`, `eastwest_ocean_velocity_u`, etc.).\n", |
152 | | - "\n", |
153 | 169 | "The function `LoadDataset()` loads only the metadata—such as dimensions, number of timesteps, available fields, and data types—without downloading the full dataset. This allows you to inspect the structure and properties of the dataset before selecting a specific time or region in later steps.\n", |
154 | 170 | "\n", |
155 | 171 | " " |
|
167 | 183 | "# Step 2: Load dataset metadata for salinity and print key attributes\n", |
168 | 184 | "\n", |
169 | 185 | "# Load metadata for the salinity dataset\n", |
170 | | - "db = LoadDataset(Salinity_salt)\n", |
| 186 | + "db = LoadDataset(field)\n", |
171 | 187 | "\n", |
172 | 188 | "# Retrieve dimensions from the dataset's logic box: (depth, longitude, latitude)\n", |
173 | 189 | "depth_levels = db.getLogicBox()[1][0]\n", |
|
635 | 651 | "plt.imshow(\n", |
636 | 652 | " data_sub[0, :, :],\n", |
637 | 653 | " origin='lower',\n", |
638 | | - " vmin=33,\n", |
639 | | - " vmax=36,\n", |
| 654 | + " vmin=35,\n", |
| 655 | + " vmax=38.5,\n", |
640 | 656 | " cmap='viridis'\n", |
641 | 657 | ")\n", |
642 | 658 | "plt.colorbar()\n", |
|
694 | 710 | "\n", |
695 | 711 | "### 🔄 What You'll Do:\n", |
696 | 712 | "\n", |
697 | | - "- Load the `eastwest_ocean_velocity_u` dataset \n", |
| 713 | + "- Load the `East-West Velocity` dataset \n", |
698 | 714 | "- Select a specific **time step**, **resolution**, and **region** covering the Agulhas leakage area \n", |
699 | 715 | "- Visualize the **east-west velocity component** of ocean currents with proper colormap\n", |
700 | 716 | "- Compute and report:\n", |
|
748 | 764 | "name": "python", |
749 | 765 | "nbconvert_exporter": "python", |
750 | 766 | "pygments_lexer": "ipython3", |
751 | | - "version": "3.11.11" |
| 767 | + "version": "3.9.18" |
752 | 768 | } |
753 | 769 | }, |
754 | 770 | "nbformat": 4, |
|
0 commit comments