You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Note that it is unclear which vertical velocity ('w' or 'omega') to use in 3D CROCO fields.\nSee https://docs.oceanparcels.org/en/latest/examples/tutorial_croco_3D.html for more information",
745
-
FieldSetWarning,
746
-
stacklevel=2,
747
-
)
746
+
croco3D=Trueif"depth"indimsUelseFalse
747
+
748
+
ifcroco3D:
749
+
if"W"invariablesandvariables["W"] =="omega":
750
+
warnings.warn(
751
+
"Note that Parcels expects 'w' for vertical velicites in 3D CROCO fields.\nSee https://docs.oceanparcels.org/en/latest/examples/tutorial_croco_3D.html for more information",
752
+
FieldSetWarning,
753
+
stacklevel=2,
754
+
)
748
755
if"H"notinvariables:
749
-
raiseValueError("FieldSet.from_croco() requires a field 'H' for the bathymetry")
756
+
raiseValueError("FieldSet.from_croco() requires a bathymetry field 'H' for 3D CROCO fields")
757
+
if"Zeta"notinvariables:
758
+
raiseValueError("FieldSet.from_croco() requires a free-surface field 'Zeta' for 3D CROCO fields")
759
+
if"Cs_w"notinvariables:
760
+
raiseValueError(
761
+
"FieldSet.from_croco() requires the S-coordinate stretching curves at W-points 'Cs_w' for 3D CROCO fields"
762
+
)
750
763
751
764
interp_method= {}
752
765
forvinvariables:
@@ -776,6 +789,10 @@ def from_croco(
776
789
gridindexingtype="croco",
777
790
**kwargs,
778
791
)
792
+
ifcroco3D:
793
+
ifhcisNone:
794
+
raiseValueError("FieldSet.from_croco() requires the hc parameter for 3D CROCO fields")
0 commit comments