Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use FMS2 file_exists, remove domain args #1532

Merged
merged 2 commits into from
Oct 26, 2021
Merged
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
11 changes: 4 additions & 7 deletions config_src/infra/FMS1/MOM_io_infra.F90
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,12 @@ logical function MOM_file_exists(filename, MOM_Domain)
end function MOM_file_exists

!> Returns true if the named file or its domain-decomposed variant exists.
logical function FMS_file_exists(filename, domain, no_domain)
logical function FMS_file_exists(filename)
character(len=*), intent(in) :: filename !< The name of the file being inquired about
type(domain2d), optional, intent(in) :: domain !< The mpp domain2d that describes the decomposition
logical, optional, intent(in) :: no_domain !< This file does not use domain decomposition
! This function uses the fms_io function file_exist to determine whether
! a named file (or its decomposed variant) exists.

FMS_file_exists = file_exist(filename, domain, no_domain)
! This function uses the fms_io function file_exist to determine whether
! a named file (or its decomposed variant) exists.

FMS_file_exists = file_exist(filename)
end function FMS_file_exists

!> indicates whether an I/O handle is attached to an open file
Expand Down
12 changes: 5 additions & 7 deletions config_src/infra/FMS2/MOM_io_infra.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module MOM_io_infra
use fms2_io_mod, only : get_variable_dimension_names, is_dimension_registered, get_dimension_size
use fms2_io_mod, only : is_dimension_unlimited, register_axis, unlimited
use fms2_io_mod, only : get_global_io_domain_indices
use fms_io_utils_mod, only : fms2_file_exist => file_exists

use fms_mod, only : write_version_number, open_namelist_file, check_nml_error
use fms_io_mod, only : file_exist, field_exist, field_size, read_data
Expand Down Expand Up @@ -170,15 +171,12 @@ logical function MOM_file_exists(filename, MOM_Domain)
end function MOM_file_exists

!> Returns true if the named file or its domain-decomposed variant exists.
logical function FMS_file_exists(filename, domain, no_domain)
logical function FMS_file_exists(filename)
character(len=*), intent(in) :: filename !< The name of the file being inquired about
type(domain2d), optional, intent(in) :: domain !< The mpp domain2d that describes the decomposition
logical, optional, intent(in) :: no_domain !< This file does not use domain decomposition
! This function uses the fms_io function file_exist to determine whether
! a named file (or its decomposed variant) exists.

FMS_file_exists = file_exist(filename, domain, no_domain)
! This function uses the fms_io function file_exist to determine whether
! a named file (or its decomposed variant) exists.

FMS_file_exists = fms2_file_exist(filename)
end function FMS_file_exists

!> indicates whether an I/O handle is attached to an open file
Expand Down