Skip to content

Commit

Permalink
chore: Remove use_mpp_io from diag manager (NOAA-GFDL#940)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-robinson authored and rem1776 committed May 1, 2024
1 parent d2f4c69 commit 62e3aae
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 23 deletions.
3 changes: 0 additions & 3 deletions diag_manager/diag_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,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
LOGICAL :: use_refactored_send = .false. !< Namelist flag to use refactored send_data math funcitons.

! <!-- netCDF variable -->

REAL :: FILL_VALUE = NF_FILL_REAL !< Fill value used. Value will be <TT>NF90_FILL_REAL</TT> if using the
Expand Down
28 changes: 10 additions & 18 deletions diag_manager/diag_manager.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)

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 @@ -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 !<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,&
& string, write_version_number
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

0 comments on commit 62e3aae

Please sign in to comment.