Skip to content

Commit bef6d72

Browse files
committed
Update docs and doc strings
1 parent 50e68d7 commit bef6d72

File tree

10 files changed

+22
-13
lines changed

10 files changed

+22
-13
lines changed

docs/developers_guide/framework/model.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ method, you can set number of tasks, threads, etc. determined from the
2020
`openmp_threads` attributes. These resources need to be set at construction or
2121
in the {ref}`dev-step-setup` method (i.e. before calling {ref}`dev-step-run`)
2222
so that the polaris framework can ensure that the required resources are
23-
available.
23+
available. If the graph partition file has been constructed prior to the ocean
24+
model step, the path to the graph file should be provided in the
25+
`graph_target` argument to {py:meth}`polaris.ocean.OceanModelStep.__init__()`.
2426

2527
(dev-model-yaml-namelists-and-streams)=
2628

docs/developers_guide/ocean/api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@
215215
216216
init.Init
217217
init.Init.run
218+
init.Init.setup
218219
219220
viz.Viz
220221
viz.Viz.run

docs/developers_guide/organization/steps.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ class SetupMesh(Step):
244244
self.add_input_file(filename='mpas_grid.nc',
245245
target='dome_varres_grid.nc', database='')
246246

247-
self.add_output_file(filename='graph.info')
248247
self.add_output_file(filename='landice_grid.nc')
249248
```
250249

@@ -366,8 +365,6 @@ class Forward(OceanModelStep):
366365

367366
self.add_input_file(filename='initial_state.nc',
368367
target='../../init/initial_state.nc')
369-
self.add_input_file(filename='graph.info',
370-
target='../../init/culled_graph.info')
371368

372369
self.add_yaml_file('polaris.ocean.tasks.baroclinic_channel',
373370
'forward.yaml')
@@ -803,9 +800,6 @@ def __init__(self, component, mesh, init):
803800
self.add_input_file(
804801
filename='forcing_data.nc',
805802
work_dir_target=f'{init.path}/init/init_mode_forcing_data.nc')
806-
self.add_input_file(
807-
filename='graph.info',
808-
work_dir_target=f'{mesh_path}/culled_graph.info')
809803
```
810804

811805
(dev-step-input-polaris)=

docs/tutorials/dev_add_test_group.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,8 +1024,7 @@ class Init(Step):
10241024
10251025
self.resolution = resolution
10261026
1027-
for file in ['base_mesh.nc', 'culled_mesh.nc', 'culled_graph.info',
1028-
'initial_state.nc']:
1027+
for file in ['base_mesh.nc', 'culled_mesh.nc', 'initial_state.nc']:
10291028
self.add_output_file(file)
10301029
```
10311030

@@ -1286,8 +1285,6 @@ class Forward(OceanModelStep):
12861285
12871286
self.add_input_file(filename='initial_state.nc',
12881287
target='../init/initial_state.nc')
1289-
self.add_input_file(filename='graph.info',
1290-
target='../init/culled_graph.info')
12911288
12921289
self.add_output_file(filename='output.nc')
12931290
```

polaris/ocean/convergence/forward.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ def __init__(self, component, name, subdir, resolution, mesh, init,
5050
A nested dictionary of options and value for each ``config_model``
5151
to replace model config options with new values
5252
53+
graph_target : str, optional
54+
The graph file name (relative to the base work directory).
55+
If none, it will be created.
56+
5357
output_filename : str, optional
5458
The output file that will be written out at the end of the forward
5559
run

polaris/ocean/model/ocean_model_step.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ def __init__(self, component, name, subdir=None, indir=None, ntasks=None,
8484
option of the ``[executables]`` config section.
8585
8686
graph_target : str, optional
87-
The name of the graph file to partition
87+
The graph file name (relative to the base work directory).
88+
If none, it will be created.
8889
"""
8990
if graph_target is None:
9091
self.make_graph = True

polaris/ocean/tasks/baroclinic_channel/forward.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ def __init__(self, component, resolution, name='forward', subdir=None,
6565
6666
run_time_steps : int, optional
6767
Number of time steps to run for
68+
69+
graph_target : str, optional
70+
The graph file name (relative to the base work directory).
71+
If none, it will be created.
6872
"""
6973
self.resolution = resolution
7074
self.run_time_steps = run_time_steps

polaris/ocean/tasks/baroclinic_channel/restart/restart_step.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ def __init__(self, component, resolution, name, indir, init):
2424
2525
indir : str
2626
the directory the step is in, to which ``name`` will be appended
27+
28+
init: polaris.ocean.tasks.baroclinic_channel.init.Init
29+
the initial state step
2730
"""
2831
self.resolution = resolution
2932
super().__init__(component=component, name=name, indir=indir, ntasks=4,

polaris/ocean/tasks/internal_wave/forward.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def __init__(self, component, init, name='forward', subdir=None,
2828
name : str
2929
the name of the task
3030
31-
init : polaris.Step
31+
init : polaris.ocean.tasks.internal_wave.init.Init
3232
the initial state step
3333
3434
subdir : str, optional

polaris/ocean/tasks/internal_wave/rpe/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ class Rpe(Task):
1313
----------
1414
resolution : float
1515
The resolution of the test case in km
16+
17+
init : polaris.ocean.tasks.baroclinic_channel.init.Init
18+
A shared step for creating the initial state
1619
"""
1720

1821
def __init__(self, component, indir, init, config, vadv_method='standard'):

0 commit comments

Comments
 (0)