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

Remove use_mpp_io from diag manager #940

Merged
merged 3 commits into from
Mar 23, 2022
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
2 changes: 0 additions & 2 deletions diag_manager/diag_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,6 @@ MODULE diag_data_mod
!! <TT>.TRUE.</TT> is only supported if the diag_manager_init
!! routine is called with the optional time_init parameter.
LOGICAL :: use_modern_diag = .false. !< Namelist flag to use the modernized diag_manager code
LOGICAL :: use_mpp_io = .false. !< false is fms2_io (default); true is mpp_io

! <!-- netCDF variable -->

#ifdef use_netCDF
Expand Down
26 changes: 8 additions & 18 deletions diag_manager/diag_manager.F90
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,6 @@ MODULE diag_manager_mod
! The values are defined as <TT>GLO_REG_VAL</TT> (-999) and <TT>GLO_REG_VAL_ALT</TT>
! (-1) in <TT>diag_data_mod</TT>.
! </DATA>
! <DATA NAME="use_mpp_io" TYPE="LOGICAL" DEFAULT=".false.">
! Set to true, diag_manager uses mpp_io. Default is fms2_io.
! </DATA>
! </NAMELIST>

USE time_manager_mod, ONLY: set_time, set_date, get_time, time_type, OPERATOR(>=), OPERATOR(>),&
Expand Down Expand Up @@ -234,7 +231,7 @@ MODULE diag_manager_mod
& use_cmor, issue_oor_warnings, oor_warnings_fatal, oor_warning, pack_size,&
& max_out_per_in_field, flush_nc_files, region_out_use_alt_value, max_field_attributes, output_field_type,&
& max_file_attributes, max_axis_attributes, prepend_date, DIAG_FIELD_NOT_FOUND, diag_init_time,diag_data_init,&
& use_mpp_io, use_modern_diag
& use_modern_diag
USE diag_data_mod, ONLY: fileobj, fileobjU, fnum_for_domain, fileobjND
USE diag_table_mod, ONLY: parse_diag_table
USE diag_output_mod, ONLY: get_diag_global_att, set_diag_global_att
Expand Down Expand Up @@ -3638,7 +3635,7 @@ SUBROUTINE diag_manager_init(diag_model_subset, time_init, err_msg)
& max_input_fields, max_axes, do_diag_field_log, write_bytes_in_file, debug_diag_manager,&
& max_num_axis_sets, max_files, use_cmor, issue_oor_warnings,&
& oor_warnings_fatal, max_out_per_in_field, flush_nc_files, region_out_use_alt_value, max_field_attributes,&
& max_file_attributes, max_axis_attributes, prepend_date, use_modern_diag, use_mpp_io
& max_file_attributes, max_axis_attributes, prepend_date, use_modern_diag

! If the module was already initialized do nothing
IF ( module_is_initialized ) RETURN
Expand Down Expand Up @@ -3727,21 +3724,14 @@ SUBROUTINE diag_manager_init(diag_model_subset, time_init, err_msg)
DO j = 1, max_input_fields
ALLOCATE(input_fields(j)%output_fields(MAX_OUT_PER_IN_FIELD))
END DO
!> Allocate files
ALLOCATE(files(max_files))
if (.not.use_mpp_io) then
ALLOCATE(fileobjU(max_files))
ALLOCATE(fileobj(max_files))
ALLOCATE(fileobjND(max_files))
ALLOCATE(fnum_for_domain(max_files))
ALLOCATE(fileobjU(max_files))
ALLOCATE(fileobj(max_files))
ALLOCATE(fileobjND(max_files))
ALLOCATE(fnum_for_domain(max_files))
!> Initialize fnum_for_domain with "dn" which stands for done
fnum_for_domain(:) = "dn"
CALL error_mesg('diag_manager_mod::diag_manager_init',&
& 'diag_manager is using fms2_io', NOTE)
else
CALL error_mesg('diag_manager_mod::diag_manager_init',&
&'MPP_IO is no longer supported. Please remove use_mpp_io from diag_manager_nml namelist',&
&FATAL)
endif
fnum_for_domain(:) = "dn"
ALLOCATE(pelist(mpp_npes()))
CALL mpp_get_current_pelist(pelist, pelist_name)

Expand Down
2 changes: 1 addition & 1 deletion diag_manager/diag_util.F90
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ MODULE diag_util_mod
& get_axis_reqfld, axis_is_compressed, get_compressed_axes_ids
USE diag_output_mod, ONLY: diag_output_init, write_axis_meta_data,&
& write_field_meta_data, done_meta_data, diag_flush
USE diag_output_mod, ONLY: diag_field_write, diag_write_time !<fms2_io use_mpp_io=.false.
USE diag_output_mod, ONLY: diag_field_write, diag_write_time !<fms2_io
USE diag_grid_mod, ONLY: get_local_indexes
USE fms_mod, ONLY: error_mesg, FATAL, WARNING, NOTE, mpp_pe, mpp_root_pe, lowercase, fms_error_handler,&
& write_version_number, do_cf_compliance
Expand Down
1 change: 0 additions & 1 deletion test_fms/diag_manager/test_diag_manager2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ setup_test () {
&diag_manager_nml
max_field_attributes=3
debug_diag_manager=.true.
use_mpp_io = .false.
/

&ensemble_nml
Expand Down