|
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": "366faba5", |
| 104 | + "metadata": {}, |
| 105 | + "outputs": [], |
| 106 | + "source": [ |
| 107 | + "# Set your variable of interest\n", |
| 108 | + "\n", |
| 109 | + "variable='salt' # options are: u,v,w,salt,theta" |
| 110 | + ] |
| 111 | + }, |
100 | 112 | { |
101 | 113 | "cell_type": "code", |
102 | 114 | "execution_count": null, |
|
111 | 123 | "# These variables point to IDX-formatted datasets hosted on OSDF\n", |
112 | 124 | "# Each URL provides access to a different physical variable from the LLC2160 ocean simulation\n", |
113 | 125 | "\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", |
| 126 | + "base_url= \"https://nsdf-climate3-origin.nationalresearchplatform.org:50098/nasa/nsdf/climate3/dyamond/\"\n", |
| 127 | + "if variable==\"theta\" or variable==\"w\":\n", |
| 128 | + " base_dir=f\"mit_output/llc2160_{variable}/llc2160_{variable}.idx\"\n", |
| 129 | + "elif variable==\"u\":\n", |
| 130 | + " base_dir= \"mit_output/llc2160_arco/visus.idx\"\n", |
| 131 | + "else:\n", |
| 132 | + " base_dir=f\"mit_output/llc2160_{variable}/{variable}_llc2160_x_y_depth.idx\"\n", |
| 133 | + " \n", |
| 134 | + "field= base_url+base_dir\n", |
123 | 135 | "\n", |
124 | 136 | "print(\"Step 1b done: Defined dataset URLs for u, v, w velocity components, temperature, and salinity.\")\n" |
125 | 137 | ] |
|
165 | 177 | "# Step 2: Load dataset metadata for salinity and print key attributes\n", |
166 | 178 | "\n", |
167 | 179 | "# Load metadata for the salinity dataset\n", |
168 | | - "db = LoadDataset(Salinity_salt)\n", |
| 180 | + "db = LoadDataset(field)\n", |
169 | 181 | "\n", |
170 | 182 | "# Retrieve dimensions from the dataset's logic box: (depth, longitude, latitude)\n", |
171 | 183 | "depth_levels = db.getLogicBox()[1][0]\n", |
|
0 commit comments