Skip to content

Commit

Permalink
Update docs and doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
cbegeman committed Sep 26, 2024
1 parent 50e68d7 commit bef6d72
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 13 deletions.
4 changes: 3 additions & 1 deletion docs/developers_guide/framework/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ method, you can set number of tasks, threads, etc. determined from the
`openmp_threads` attributes. These resources need to be set at construction or
in the {ref}`dev-step-setup` method (i.e. before calling {ref}`dev-step-run`)
so that the polaris framework can ensure that the required resources are
available.
available. If the graph partition file has been constructed prior to the ocean
model step, the path to the graph file should be provided in the
`graph_target` argument to {py:meth}`polaris.ocean.OceanModelStep.__init__()`.

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

Expand Down
1 change: 1 addition & 0 deletions docs/developers_guide/ocean/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@
init.Init
init.Init.run
init.Init.setup
viz.Viz
viz.Viz.run
Expand Down
6 changes: 0 additions & 6 deletions docs/developers_guide/organization/steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ class SetupMesh(Step):
self.add_input_file(filename='mpas_grid.nc',
target='dome_varres_grid.nc', database='')

self.add_output_file(filename='graph.info')
self.add_output_file(filename='landice_grid.nc')
```

Expand Down Expand Up @@ -366,8 +365,6 @@ class Forward(OceanModelStep):

self.add_input_file(filename='initial_state.nc',
target='../../init/initial_state.nc')
self.add_input_file(filename='graph.info',
target='../../init/culled_graph.info')

self.add_yaml_file('polaris.ocean.tasks.baroclinic_channel',
'forward.yaml')
Expand Down Expand Up @@ -803,9 +800,6 @@ def __init__(self, component, mesh, init):
self.add_input_file(
filename='forcing_data.nc',
work_dir_target=f'{init.path}/init/init_mode_forcing_data.nc')
self.add_input_file(
filename='graph.info',
work_dir_target=f'{mesh_path}/culled_graph.info')
```

(dev-step-input-polaris)=
Expand Down
5 changes: 1 addition & 4 deletions docs/tutorials/dev_add_test_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -1024,8 +1024,7 @@ class Init(Step):
self.resolution = resolution
for file in ['base_mesh.nc', 'culled_mesh.nc', 'culled_graph.info',
'initial_state.nc']:
for file in ['base_mesh.nc', 'culled_mesh.nc', 'initial_state.nc']:
self.add_output_file(file)
```

Expand Down Expand Up @@ -1286,8 +1285,6 @@ class Forward(OceanModelStep):
self.add_input_file(filename='initial_state.nc',
target='../init/initial_state.nc')
self.add_input_file(filename='graph.info',
target='../init/culled_graph.info')
self.add_output_file(filename='output.nc')
```
Expand Down
4 changes: 4 additions & 0 deletions polaris/ocean/convergence/forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ def __init__(self, component, name, subdir, resolution, mesh, init,
A nested dictionary of options and value for each ``config_model``
to replace model config options with new values
graph_target : str, optional
The graph file name (relative to the base work directory).
If none, it will be created.
output_filename : str, optional
The output file that will be written out at the end of the forward
run
Expand Down
3 changes: 2 additions & 1 deletion polaris/ocean/model/ocean_model_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def __init__(self, component, name, subdir=None, indir=None, ntasks=None,
option of the ``[executables]`` config section.
graph_target : str, optional
The name of the graph file to partition
The graph file name (relative to the base work directory).
If none, it will be created.
"""
if graph_target is None:
self.make_graph = True
Expand Down
4 changes: 4 additions & 0 deletions polaris/ocean/tasks/baroclinic_channel/forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ def __init__(self, component, resolution, name='forward', subdir=None,
run_time_steps : int, optional
Number of time steps to run for
graph_target : str, optional
The graph file name (relative to the base work directory).
If none, it will be created.
"""
self.resolution = resolution
self.run_time_steps = run_time_steps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ def __init__(self, component, resolution, name, indir, init):
indir : str
the directory the step is in, to which ``name`` will be appended
init: polaris.ocean.tasks.baroclinic_channel.init.Init
the initial state step
"""
self.resolution = resolution
super().__init__(component=component, name=name, indir=indir, ntasks=4,
Expand Down
2 changes: 1 addition & 1 deletion polaris/ocean/tasks/internal_wave/forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, component, init, name='forward', subdir=None,
name : str
the name of the task
init : polaris.Step
init : polaris.ocean.tasks.internal_wave.init.Init
the initial state step
subdir : str, optional
Expand Down
3 changes: 3 additions & 0 deletions polaris/ocean/tasks/internal_wave/rpe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ class Rpe(Task):
----------
resolution : float
The resolution of the test case in km
init : polaris.ocean.tasks.baroclinic_channel.init.Init
A shared step for creating the initial state
"""

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

0 comments on commit bef6d72

Please sign in to comment.