diff --git a/data_override/README.MD b/data_override/README.MD index 64ecd05bb..f9e19464a 100644 --- a/data_override/README.MD +++ b/data_override/README.MD @@ -24,12 +24,12 @@ If it is desired to interpolate the data to a region of the model grid. The foll - **lat_start:** The starting longitude in the same units as the grid data in the file - **lon_end:** The ending longitude in the same units as the grid data in the file -If it is desired to use multiple(3) input netcf files instead of 1. The following **optional** keys are available. +If it is desired to use multiple(3) input netcdf files instead of 1. The following **optional** keys are available. - **is_multi_file:** Set to `True` is using the multi-file feature - **prev_file_name:** The name of the first file in the set - **next_file_name:** The name of the third file in the set -Note that **file_name** must be the second file in the set. **prev_file_name** and **next_file_name** are required if **is_multi_file** is set to `True` +Note that **file_name** must be the second file in the set. **prev_file_name** and/or **next_file_name** are required if **is_multi_file** is set to `True` #### 2. How to use it? In order to use the yaml data format, [libyaml](https://github.com/yaml/libyaml) needs to be installed and linked with FMS. Additionally, FMS must be compiled with -Duse_yaml macro. If using autotools, you can add `--with-yaml`, which will add the macro for you and check that libyaml is linked correctly. diff --git a/data_override/include/data_override.inc b/data_override/include/data_override.inc index 91e43372e..7a5999d6f 100644 --- a/data_override/include/data_override.inc +++ b/data_override/include/data_override.inc @@ -587,7 +587,7 @@ subroutine read_table_yaml(data_table) & is_optional=.true.) call get_value_from_key(file_id, entry_id(i), "next_file_name", data_table(i)%next_file_name, & & is_optional=.true.) - if (trim(data_table(i)%prev_file_name) .eq. "" .or. trim(data_table(i)%next_file_name) .eq. "") & + if (trim(data_table(i)%prev_file_name) .eq. "" .and. trim(data_table(i)%next_file_name) .eq. "") & call mpp_error(FATAL, "The prev_file_name and next_file_name must be present if is_multi_file. "//& "Check your data_table.yaml entry for field:"//trim(data_table(i)%gridname)//":"//& trim(data_table(i)%fieldname_code))