Skip to content

Commit 4b9aea7

Browse files
Adding CROCO idealised simulations setup
1 parent 8ae28d7 commit 4b9aea7

1 file changed

Lines changed: 169 additions & 0 deletions

File tree

parcels/_datasets/structured/circulation_models.py

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,4 +537,173 @@
537537
),
538538
},
539539
),
540+
"ds_CROCO_idealized": xr.Dataset(
541+
# CROCO idealized model dataset
542+
{
543+
"u": (
544+
["time", "s_rho", "eta_rho", "xi_u"],
545+
np.random.rand(T, Z, Y, X - 1, dtype="float32"),
546+
{
547+
"long_name": "u-momentum component",
548+
"units": "meter second-1",
549+
"field": "u-velocity, scalar, series",
550+
"standard_name": "sea_water_x_velocity_at_u_location",
551+
},
552+
),
553+
"v": (
554+
["time", "s_rho", "eta_v", "xi_rho"],
555+
np.random.rand(T, Z, Y - 1, X, dtype="float32"),
556+
{
557+
"long_name": "v-momentum component",
558+
"units": "meter second-1",
559+
"field": "v-velocity, scalar, series",
560+
"standard_name": "sea_water_y_velocity_at_v_location",
561+
},
562+
),
563+
"w": (
564+
["time", "s_rho", "eta_rho", "xi_rho"],
565+
np.random.rand(T, Z, Y, X, dtype="float32"),
566+
{
567+
"long_name": "vertical momentum component",
568+
"units": "meter second-1",
569+
"field": "w-velocity, scalar, series",
570+
"standard_name": "upward_sea_water_velocity",
571+
"coordinates": "lat_rho lon_rho",
572+
},
573+
),
574+
"h": (
575+
["eta_rho", "xi_rho"],
576+
np.random.rand(Y, X, dtype="float32"),
577+
{
578+
"long_name": "bathymetry at RHO-points",
579+
"units": "meter",
580+
"field": "bath, scalar",
581+
"standard_name": "model_sea_floor_depth_below_geoid",
582+
},
583+
),
584+
"zeta": (
585+
["time", "eta_rho", "xi_rho"],
586+
np.random.rand(T, Y, X, dtype="float32"),
587+
{
588+
"long_name": "free-surface",
589+
"units": "meter",
590+
"field": "free_surface, scalar, series",
591+
"standard_name": "sea_surface_height",
592+
},
593+
),
594+
"Cs_w": (
595+
["s_w"],
596+
np.random.rand(Z + 1, dtype="float32"),
597+
{
598+
"long_name": "S-coordinate stretching curves at W-points",
599+
},
600+
),
601+
"hc": (
602+
[],
603+
np.array(0.0, dtype="float32"),
604+
{
605+
"long_name": "S-coordinate parameter, critical depth",
606+
"units": "meter",
607+
},
608+
),
609+
},
610+
coords={
611+
"time": (
612+
["time"],
613+
np.arange(0, T, dtype="float64"),
614+
{
615+
"long_name": "time since initialization",
616+
"units": "second",
617+
"field": "time, scalar, series",
618+
"standard_name": "time",
619+
"axis": "T",
620+
},
621+
),
622+
"s_rho": (
623+
["s_rho"],
624+
np.linspace(-0.95, 0.05, Z, dtype="float32"),
625+
{
626+
"long_name": "S-coordinate at RHO-points",
627+
"standard_name": "ocean_s_coordinate_g1",
628+
"positive": "up",
629+
"axis": "Z",
630+
"formula_terms": "s: sc_r C: Cs_r eta: zeta depth: h depth_c: hc",
631+
},
632+
),
633+
"s_w": (
634+
["s_w"],
635+
np.linspace(-1, 0, Z + 1, dtype="float32"),
636+
{
637+
"long_name": "S-coordinate at W-points",
638+
"standard_name": "ocean_s_coordinate_g1_at_w_location",
639+
"positive": "up",
640+
"axis": "Z",
641+
"c_grid_axis_shift": -0.5,
642+
"formula_terms": "s: sc_w C: Cs_w eta: zeta depth: h depth_c: hc",
643+
},
644+
),
645+
"eta_rho": (
646+
["eta_rho"],
647+
np.arange(Y, dtype="float32"),
648+
{
649+
"long name": "y-dimension of the grid",
650+
"standard_name": "y_grid_index",
651+
"axis": "Y",
652+
"c_grid_dynamic_range": f"2:{Y}",
653+
},
654+
),
655+
"eta_v": (
656+
["eta_v"],
657+
np.arange(Y - 1, dtype="float32"),
658+
{
659+
"long name": "y-dimension of the grid at v location",
660+
"standard_name": "y_grid_index_at_v_location",
661+
"axis": "Y",
662+
"c_grid_axis_shift": 0.5,
663+
"c_grid_dynamic_range": f"2:{Y-1}",
664+
},
665+
),
666+
"xi_rho": (
667+
["xi_rho"],
668+
np.arange(X, dtype="float32"),
669+
{
670+
"long name": "x-dimension of the grid",
671+
"standard_name": "x_grid_index",
672+
"axis": "X",
673+
"c_grid_dynamic_range": f"2:{X}",
674+
},
675+
),
676+
"xi_u": (
677+
["xi_u"],
678+
np.arange(X - 1, dtype="float32"),
679+
{
680+
"long name": "x-dimension of the grid at u location",
681+
"standard_name": "x_grid_index_at_u_location",
682+
"axis": "X",
683+
"c_grid_axis_shift": 0.5,
684+
"c_grid_dynamic_range": f"2:{X-1}",
685+
},
686+
),
687+
"x_rho": (
688+
["eta_rho", "xi_rho"],
689+
np.tile(np.linspace(-179, 179, X, endpoint=False), (Y, 1)), # note that this is not curvilinear
690+
{
691+
"long_name": "x-locations of RHO-points",
692+
"units": "meter",
693+
"standard_name": "plane_x_coordinate",
694+
"field": "x_rho, scalar",
695+
},
696+
),
697+
"y_rho": (
698+
["eta_rho", "xi_rho"],
699+
np.tile(np.linspace(-89, 89, Y), (X, 1)).T, # note that this is not curvilinear
700+
{
701+
"long_name": "y-locations of RHO-points",
702+
"units": "meter",
703+
"standard_name": "plane_y_coordinate",
704+
"field": "y_rho, scalar",
705+
},
706+
),
707+
},
708+
),
540709
}

0 commit comments

Comments
 (0)