From 62e3aae96f104516b9c3dcc5f0d74f4fb663b298 Mon Sep 17 00:00:00 2001 From: Tom Robinson <33458882+thomas-robinson@users.noreply.github.com> Date: Wed, 23 Mar 2022 14:52:18 -0400 Subject: [PATCH] chore: Remove use_mpp_io from diag manager (#940) --- diag_manager/diag_data.F90 | 3 --- diag_manager/diag_manager.F90 | 28 ++++++++------------- diag_manager/diag_util.F90 | 2 +- test_fms/diag_manager/test_diag_manager2.sh | 1 - 4 files changed, 11 insertions(+), 23 deletions(-) diff --git a/diag_manager/diag_data.F90 b/diag_manager/diag_data.F90 index 4eb191197..e7b2e3712 100644 --- a/diag_manager/diag_data.F90 +++ b/diag_manager/diag_data.F90 @@ -354,9 +354,6 @@ MODULE diag_data_mod !! .TRUE. 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 - LOGICAL :: use_refactored_send = .false. !< Namelist flag to use refactored send_data math funcitons. - ! REAL :: FILL_VALUE = NF_FILL_REAL !< Fill value used. Value will be NF90_FILL_REAL if using the diff --git a/diag_manager/diag_manager.F90 b/diag_manager/diag_manager.F90 index 5cb7189a5..a13e408db 100644 --- a/diag_manager/diag_manager.F90 +++ b/diag_manager/diag_manager.F90 @@ -230,8 +230,8 @@ MODULE diag_manager_mod & diag_log_unit, time_unit_list, pelist_name, max_axes, module_is_initialized, max_num_axis_sets,& & 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 + & max_file_attributes, max_axis_attributes, prepend_date, DIAG_FIELD_NOT_FOUND, diag_init_time,diag_data_init,& + & 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 @@ -3828,8 +3828,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_mpp_io, field_log_separator,& - & use_modern_diag + & max_file_attributes, max_axis_attributes, prepend_date, field_log_separator, use_modern_diag ! If the module was already initialized do nothing IF ( module_is_initialized ) RETURN @@ -3918,21 +3917,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)) - !> 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 + 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" ALLOCATE(pelist(mpp_npes())) CALL mpp_get_current_pelist(pelist, pelist_name) diff --git a/diag_manager/diag_util.F90 b/diag_manager/diag_util.F90 index b4f6eecb8..3a36b0720 100644 --- a/diag_manager/diag_util.F90 +++ b/diag_manager/diag_util.F90 @@ -57,7 +57,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 !