Skip to content

Commit 0475d67

Browse files
Adding CESM dataset
1 parent c9546a3 commit 0475d67

1 file changed

Lines changed: 83 additions & 0 deletions

File tree

parcels/_datasets/structured/circulation_models.py

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,4 +280,87 @@
280280
),
281281
},
282282
),
283+
"ds_CESM": xr.Dataset(
284+
# CESM model dataset
285+
{
286+
"UVEL": (
287+
["time", "z_t", "nlat", "nlon"],
288+
np.random.rand(T, Z, Y, X, dtype="float32"),
289+
{
290+
"long_name": "Velocity in grid-x direction",
291+
"units": "centimeter/s",
292+
"grid_loc": 3221,
293+
"cell_methods": "time:mean",
294+
},
295+
),
296+
"VVEL": (
297+
["time", "z_t", "nlat", "nlon"],
298+
np.random.rand(T, Z, Y, X, dtype="float32"),
299+
{
300+
"long_name": "Velocity in grid-y direction",
301+
"units": "centimeter/s",
302+
"grid_loc": 3221,
303+
"cell_methods": "time:mean",
304+
},
305+
),
306+
"WVEL": (
307+
["time", "z_w_top", "nlat", "nlon"],
308+
np.random.rand(T, Z, Y, X, dtype="float32"),
309+
{
310+
"long_name": "Vertical Velocity",
311+
"units": "centimeter/s",
312+
"grid_loc": 3112,
313+
"cell_methods": "time:mean",
314+
},
315+
),
316+
},
317+
coords={
318+
"time": (
319+
["time"],
320+
TIME,
321+
{
322+
"long_name": "time",
323+
"bounds": "time_bounds",
324+
},
325+
),
326+
"z_t": (
327+
["z_t"],
328+
np.linspace(0, 5000, Z, dtype="float32"),
329+
{
330+
"long_name": "depth from surface to midpoint of layer",
331+
"units": "centimeters",
332+
"positive": "down",
333+
"valid_min": 500.0,
334+
"valid_max": 537500.0,
335+
},
336+
),
337+
"z_w_top": (
338+
["z_w_top"],
339+
np.linspace(0, 5000, Z, dtype="float32"),
340+
{
341+
"long_name": "depth from surface to top of layer",
342+
"units": "centimeters",
343+
"positive": "down",
344+
"valid_min": 0.0,
345+
"valid_max": 525000.94,
346+
},
347+
),
348+
"ULONG": (
349+
["nlat", "nlon"],
350+
np.tile(np.linspace(-179, 179, X, endpoint=False), (Y, 1)), # note that this is not curvilinear
351+
{
352+
"long_name": "array of u-grid longitudes",
353+
"units": "degrees_east",
354+
},
355+
),
356+
"ULAT": (
357+
["nlat", "nlon"],
358+
np.tile(np.linspace(-75, 85, Y).reshape(-1, 1), (1, X)), # note that this is not curvilinear
359+
{
360+
"long_name": "array of u-grid latitudes",
361+
"units": "degrees_north",
362+
},
363+
),
364+
},
365+
),
283366
}

0 commit comments

Comments
 (0)