Skip to content

Commit d928e0c

Browse files
committed
reformat links
1 parent 56eef6c commit d928e0c

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

hands-on/session III/3.Tutorial_PetascaleAnalysis.ipynb

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,18 @@
9797
"You can select any of these fields for analysis by referencing their corresponding URLs defined in the next cell."
9898
]
9999
},
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+
},
100112
{
101113
"cell_type": "code",
102114
"execution_count": null,
@@ -111,15 +123,15 @@
111123
"# These variables point to IDX-formatted datasets hosted on OSDF\n",
112124
"# Each URL provides access to a different physical variable from the LLC2160 ocean simulation\n",
113125
"\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",
123135
"\n",
124136
"print(\"Step 1b done: Defined dataset URLs for u, v, w velocity components, temperature, and salinity.\")\n"
125137
]
@@ -165,7 +177,7 @@
165177
"# Step 2: Load dataset metadata for salinity and print key attributes\n",
166178
"\n",
167179
"# Load metadata for the salinity dataset\n",
168-
"db = LoadDataset(Salinity_salt)\n",
180+
"db = LoadDataset(field)\n",
169181
"\n",
170182
"# Retrieve dimensions from the dataset's logic box: (depth, longitude, latitude)\n",
171183
"depth_levels = db.getLogicBox()[1][0]\n",

0 commit comments

Comments
 (0)