Skip to content

Commit

Permalink
allow for two and/or three files
Browse files Browse the repository at this point in the history
  • Loading branch information
uramirez8707 committed Nov 28, 2023
1 parent f916b31 commit 4c19eb3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions data_override/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion data_override/include/data_override.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 4c19eb3

Please sign in to comment.