Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/source/bmi.best_practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ here are some tips to help when writing a BMI for a model.
coupling models written in different languages. It's the developer's
responsibility to ensure that array information is
flattened/redimensionalized in the correct order.
- Recall that models can have multiple grids. This can be particularly
useful for defining {term}`exchange items <exchange item>` that
don't vary over the model domain; e.g., a diffusivity -- just define
the variable on a separate {ref}`scalar grid <unstructured-grids>`.
- Recall that model variables do not have to be attached to a grid.
This can be useful for defining {term}`exchange items <exchange item>`
that don't vary over the model domain.
- Models can have multiple grids.
- Avoid using global variables, if possible. This isn't strictly a BMI
requirement, but if a model only uses local variables, its BMI will
be self-contained. This may allow multiple instances of the model to
Expand Down
9 changes: 1 addition & 8 deletions docs/source/bmi.grid_funcs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,12 @@

The functions in this section describe {ref}`model grids <model-grids>`.
In the BMI,
every {term}`exchange item` is defined on a grid,
if an {term}`exchange item` is defined on a grid,
Copy link

Copilot AI Jun 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider clarifying that not all exchange items are defined on a grid, and explicitly mention that variables without a grid will have their get_var_location return 'none'.

Copilot uses AI. Check for mistakes.
and is referenced by a {term}`grid identifier`
returned from the {ref}`get-var-grid` function.
This identifier is a required input to the functions listed below.

A model can have multiple grids.
For example,
consider modeling the diffusion of temperature over a flat plate.
One grid could be a uniform rectilinear grid on which
temperature is defined.
A second grid could be a scalar,
on which a constant thermal diffusivity is defined.

Not all grid functions are used by each type of grid.
However, all BMI grid functions must be implemented.
Expand Down Expand Up @@ -58,7 +52,6 @@ However, all BMI grid functions must be implemented.
Given a {term}`grid identifier`, get the type of that grid as a string.
Valid grid types are:

- `scalar`
- `points`
- `vector`
- `unstructured`
Expand Down
2 changes: 0 additions & 2 deletions docs/source/bmi.var_funcs.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,6 @@ element the variable is defined. Valid return values are:
is returned from the function.
- In C and Fortran, an integer status code indicating success (zero) or failure
(nonzero) is returned.
- If the given variable is a scalar (i.e., defined on a {ref}`scalar
grid <unstructured-grids>`), the location from this function is ignored.

:::{include} links.md
:::
4 changes: 2 additions & 2 deletions docs/source/model_grids.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ Structured quadrilateral grids use the following BMI functions:
```

This category includes the *unstructured* type,
as well as the special cases
*scalar*, *points*, and *vector*.
as well as the special case of a grid of *points* (i.e.
unconnected nodes).
This is the most general grid type.
It can be used for any type of grid.
This grid type must be used if the grid consists of cells
Expand Down