Skip to content

Commit d731e85

Browse files
reint-fischerreint-fischer
authored andcommitted
expand text for dt guide
1 parent c05f4f6 commit d731e85

2 files changed

Lines changed: 263 additions & 135 deletions

File tree

docs/user_guide/examples/tutorial_dt_integrators.ipynb

Lines changed: 257 additions & 129 deletions
Large diffs are not rendered by default.

src/parcels/_core/converters.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ class Unity(UnitConverter):
4646
source_unit: None
4747
target_unit: None
4848

49-
def to_target(self, value, z, y, x):
49+
def to_target(self, value, z=None, y=None, x=None):
5050
return value
5151

52-
def to_source(self, value, z, y, x):
52+
def to_source(self, value, z=None, y=None, x=None):
5353
return value
5454

5555

@@ -59,10 +59,10 @@ class Geographic(UnitConverter):
5959
source_unit = "m"
6060
target_unit = "degree"
6161

62-
def to_target(self, value, z, y, x):
62+
def to_target(self, value, z=None, y=None, x=None):
6363
return value / 1000.0 / 1.852 / 60.0
6464

65-
def to_source(self, value, z, y, x):
65+
def to_source(self, value, z=None, y=None, x=None):
6666
return value * 1000.0 * 1.852 * 60.0
6767

6868

@@ -87,10 +87,10 @@ class GeographicSquare(UnitConverter):
8787
source_unit = "m2"
8888
target_unit = "degree2"
8989

90-
def to_target(self, value, z, y, x):
90+
def to_target(self, value, z=None, y=None, x=None):
9191
return value / pow(1000.0 * 1.852 * 60.0, 2)
9292

93-
def to_source(self, value, z, y, x):
93+
def to_source(self, value, z=None, y=None, x=None):
9494
return value * pow(1000.0 * 1.852 * 60.0, 2)
9595

9696

0 commit comments

Comments
 (0)