From e27a8c7ac9892e0e8df7da0a778edd11d899481f Mon Sep 17 00:00:00 2001 From: mcflugen Date: Sat, 31 May 2025 17:16:31 -0600 Subject: [PATCH 1/2] add "none" location to get_var_location description --- docs/source/bmi.var_funcs.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/source/bmi.var_funcs.md b/docs/source/bmi.var_funcs.md index c283b71..52b463e 100644 --- a/docs/source/bmi.var_funcs.md +++ b/docs/source/bmi.var_funcs.md @@ -297,6 +297,10 @@ element the variable is defined. Valid return values are: - `node` - `edge` - `face` +- `none` + +A value of `none` indicates the variable is not attached to a grid and +that `get_var_grid` will not be implemented for this variable. **Implementation notes** @@ -304,8 +308,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 `), the location from this function is ignored. :::{include} links.md ::: From 17844c8636e437770fc27b78a6e23809ae8e1cbb Mon Sep 17 00:00:00 2001 From: mcflugen Date: Mon, 2 Jun 2025 12:53:19 -0600 Subject: [PATCH 2/2] add note about grid location of none --- docs/source/bmi.var_funcs.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/source/bmi.var_funcs.md b/docs/source/bmi.var_funcs.md index 52b463e..ae51e76 100644 --- a/docs/source/bmi.var_funcs.md +++ b/docs/source/bmi.var_funcs.md @@ -297,11 +297,19 @@ element the variable is defined. Valid return values are: - `node` - `edge` - `face` -- `none` +- `none` (see note) A value of `none` indicates the variable is not attached to a grid and that `get_var_grid` will not be implemented for this variable. +:::{attention} + +The return value `"none"` from `get_var_location` is not part of the current +BMI specification, but has seen informal use to indicate variables not tied +to a grid location. This usage may be formally supported in a future version +of the specification. +::: + **Implementation notes** - In C++, Java, and Python, the *location* argument is omitted and the location