From b5d55ec195040ddc5d989923c38552041e3b4f9f Mon Sep 17 00:00:00 2001 From: Uriel Ramirez Date: Wed, 3 Mar 2021 14:43:05 -0500 Subject: [PATCH] Removes any fms_io uses --- generic_tracers/FMS_ocmip2_co2calc.F90 | 11 ++--------- generic_tracers/generic_BLING.F90 | 10 +--------- generic_tracers/generic_CFC.F90 | 1 - generic_tracers/generic_COBALT.F90 | 9 +-------- generic_tracers/generic_ERGOM.F90 | 8 +------- generic_tracers/generic_SF6.F90 | 1 - generic_tracers/generic_abiotic.F90 | 9 +-------- generic_tracers/generic_blres.F90 | 9 +-------- generic_tracers/generic_tracer.F90 | 11 ++--------- 9 files changed, 9 insertions(+), 60 deletions(-) diff --git a/generic_tracers/FMS_ocmip2_co2calc.F90 b/generic_tracers/FMS_ocmip2_co2calc.F90 index 977302e..e5345ad 100644 --- a/generic_tracers/FMS_ocmip2_co2calc.F90 +++ b/generic_tracers/FMS_ocmip2_co2calc.F90 @@ -40,7 +40,7 @@ module FMS_ocmip2_co2calc_mod !{ ! use fm_util_mod, only: fm_util_start_namelist, fm_util_end_namelist -use fms_mod, only: open_namelist_file, check_nml_error, close_file +use fms_mod, only: check_nml_error use mpp_mod, only: input_nml_file, mpp_error, stdout, stdlog, WARNING, FATAL use mocsy_vars, only: vars @@ -98,16 +98,9 @@ subroutine read_mocsy_namelist() integer :: ioun, ierr, io_status, stdoutunit, stdlogunit stdoutunit=stdout();stdlogunit=stdlog() -#ifdef INTERNAL_FILE_NML read (input_nml_file, nml=mocsy_nml, iostat=io_status) ierr = check_nml_error(io_status,'mocsy_nml') -#else - ioun = open_namelist_file() - read (ioun, mocsy_nml,iostat=io_status) - ierr = check_nml_error(io_status,'mocsy_nml') - call close_file (ioun) -#endif - + write (stdoutunit,'(/)') write (stdoutunit, mocsy_nml) write (stdlogunit, mocsy_nml) diff --git a/generic_tracers/generic_BLING.F90 b/generic_tracers/generic_BLING.F90 index d5f4586..4576f93 100644 --- a/generic_tracers/generic_BLING.F90 +++ b/generic_tracers/generic_BLING.F90 @@ -172,8 +172,7 @@ module generic_BLING use coupler_types_mod, only: coupler_2d_bc_type use field_manager_mod, only: fm_string_len, fm_path_name_len use mpp_mod, only: input_nml_file, mpp_error, stdlog, NOTE, WARNING, FATAL, stdout, mpp_chksum - use fms_mod, only: write_version_number, open_namelist_file, check_nml_error, close_file - use fms_mod, only: field_exist, file_exist + use fms_mod, only: write_version_number, check_nml_error use time_manager_mod, only: time_type use fm_util_mod, only: fm_util_start_namelist, fm_util_end_namelist use constants_mod, only: WTMCO2, WTMO2 @@ -776,15 +775,8 @@ subroutine generic_BLING_register(tracer_list) ! stdoutunit=stdout();stdlogunit=stdlog() -#ifdef INTERNAL_FILE_NML read (input_nml_file, nml=generic_bling_nml, iostat=io_status) ierr = check_nml_error(io_status,'generic_bling_nml') -#else -ioun = open_namelist_file() -read (ioun, generic_bling_nml,iostat=io_status) -ierr = check_nml_error(io_status,'generic_bling_nml') -call close_file (ioun) -#endif write (stdoutunit,'(/)') write (stdoutunit, generic_bling_nml) diff --git a/generic_tracers/generic_CFC.F90 b/generic_tracers/generic_CFC.F90 index db9b868..e0d4f42 100644 --- a/generic_tracers/generic_CFC.F90 +++ b/generic_tracers/generic_CFC.F90 @@ -47,7 +47,6 @@ module generic_CFC use mpp_mod, only : mpp_error, NOTE, WARNING, FATAL, stdout use time_manager_mod, only: time_type use fm_util_mod, only: fm_util_start_namelist, fm_util_end_namelist - use fms_mod, only: open_namelist_file, check_nml_error, close_file use fms_mod, only: stdout, stdlog, mpp_pe, mpp_root_pe use g_tracer_utils, only : g_tracer_type,g_tracer_start_param_list,g_tracer_end_param_list diff --git a/generic_tracers/generic_COBALT.F90 b/generic_tracers/generic_COBALT.F90 index d4d3cf4..074682e 100644 --- a/generic_tracers/generic_COBALT.F90 +++ b/generic_tracers/generic_COBALT.F90 @@ -136,7 +136,7 @@ module generic_COBALT use constants_mod, only: WTMCO2, WTMO2,WTMN,rdgas,wtmair use data_override_mod, only: data_override use fms_mod, only: write_version_number, FATAL, WARNING, stdout, stdlog,mpp_pe,mpp_root_pe - use fms_mod, only: open_namelist_file, check_nml_error, close_file + use fms_mod, only: check_nml_error use g_tracer_utils, only : g_tracer_type,g_tracer_start_param_list,g_tracer_end_param_list use g_tracer_utils, only : g_tracer_add,g_tracer_add_param, g_tracer_set_files @@ -1539,15 +1539,8 @@ subroutine generic_COBALT_register(tracer_list) ! stdoutunit=stdout();stdlogunit=stdlog() -#ifdef INTERNAL_FILE_NML read (input_nml_file, nml=generic_COBALT_nml, iostat=io_status) ierr = check_nml_error(io_status,'generic_COBALT_nml') -#else -ioun = open_namelist_file() -read (ioun, generic_COBALT_nml,iostat=io_status) -ierr = check_nml_error(io_status,'generic_COBALT_nml') -call close_file (ioun) -#endif write (stdoutunit,'(/)') write (stdoutunit, generic_COBALT_nml) diff --git a/generic_tracers/generic_ERGOM.F90 b/generic_tracers/generic_ERGOM.F90 index 874f57e..70a51c6 100644 --- a/generic_tracers/generic_ERGOM.F90 +++ b/generic_tracers/generic_ERGOM.F90 @@ -34,7 +34,7 @@ module generic_ERGOM use coupler_types_mod, only: coupler_2d_bc_type use field_manager_mod, only: fm_string_len - use fms_mod, only: write_version_number, open_namelist_file, close_file, check_nml_error + use fms_mod, only: write_version_number, check_nml_error use mpp_mod, only: mpp_error, NOTE, WARNING, FATAL, stdout, stdlog, input_nml_file use mpp_mod, only: mpp_clock_id, mpp_clock_begin, mpp_clock_end, CLOCK_ROUTINE use time_manager_mod, only: time_type @@ -856,13 +856,7 @@ subroutine generic_ERGOM_register(tracer_list) call write_version_number( version, tagname ) ! provide for namelist over-ride of defaults -#ifdef INTERNAL_FILE_NML read (input_nml_file, nml=ergom_nml, iostat=io_status) -#else - ioun = open_namelist_file() - read (ioun, ergom_nml,iostat=io_status) - call close_file (ioun) -#endif ierr = check_nml_error(io_status,'ergom_nml') write (stdoutunit,'(/)') diff --git a/generic_tracers/generic_SF6.F90 b/generic_tracers/generic_SF6.F90 index 267cbe9..cd0619d 100644 --- a/generic_tracers/generic_SF6.F90 +++ b/generic_tracers/generic_SF6.F90 @@ -37,7 +37,6 @@ module generic_SF6 use mpp_mod, only : mpp_error, NOTE, WARNING, FATAL, stdout use time_manager_mod, only : time_type use fm_util_mod, only: fm_util_start_namelist, fm_util_end_namelist - use fms_mod, only: open_namelist_file, check_nml_error, close_file use fms_mod, only: stdout, stdlog, mpp_pe, mpp_root_pe use g_tracer_utils, only : g_tracer_type,g_tracer_start_param_list,g_tracer_end_param_list diff --git a/generic_tracers/generic_abiotic.F90 b/generic_tracers/generic_abiotic.F90 index 2cc787f..bff863d 100644 --- a/generic_tracers/generic_abiotic.F90 +++ b/generic_tracers/generic_abiotic.F90 @@ -180,7 +180,7 @@ module generic_abiotic use data_override_mod, only: data_override use field_manager_mod, only: fm_string_len use fm_util_mod, only: fm_util_start_namelist, fm_util_end_namelist - use fms_mod, only: open_namelist_file, check_nml_error, close_file + use fms_mod, only: check_nml_error use mpp_mod, only: input_nml_file, mpp_error, stdlog, NOTE, WARNING, FATAL, stdout, mpp_chksum use time_manager_mod, only: time_type @@ -329,15 +329,8 @@ subroutine generic_abiotic_register(tracer_list) stdoutunit=stdout();stdlogunit=stdlog() -#ifdef INTERNAL_FILE_NML read (input_nml_file, nml=generic_abiotic_nml, iostat=io_status) ierr = check_nml_error(io_status,'generic_abiotic_nml') -#else - ioun = open_namelist_file() - read (ioun, generic_abiotic_nml,iostat=io_status) - ierr = check_nml_error(io_status,'generic_abiotic_nml') - call close_file (ioun) -#endif write (stdoutunit,'(/)') write (stdoutunit, generic_abiotic_nml) diff --git a/generic_tracers/generic_blres.F90 b/generic_tracers/generic_blres.F90 index f417e5d..38ca4f9 100644 --- a/generic_tracers/generic_blres.F90 +++ b/generic_tracers/generic_blres.F90 @@ -23,7 +23,7 @@ module generic_blres use field_manager_mod, only: fm_string_len !use mpp_mod, only : mpp_error, NOTE, WARNING, FATAL, stdout use mpp_mod, only: input_nml_file, mpp_error, stdlog, NOTE, WARNING, FATAL, stdout, mpp_chksum - use fms_mod, only: write_version_number, open_namelist_file, check_nml_error, close_file + use fms_mod, only: write_version_number, check_nml_error use time_manager_mod, only : time_type use fm_util_mod, only: fm_util_start_namelist, fm_util_end_namelist @@ -92,15 +92,8 @@ subroutine generic_blres_register(tracer_list) ! stdoutunit=stdout();stdlogunit=stdlog() -#ifdef INTERNAL_FILE_NML read (input_nml_file, nml=generic_blres_nml, iostat=io_status) ierr = check_nml_error(io_status,'generic_blres_nml') -#else -ioun = open_namelist_file() -read (ioun, generic_bling_nml,iostat=io_status) -ierr = check_nml_error(io_status,'generic_blres_nml') -call close_file (ioun) -#endif write (stdoutunit,'(/)') write (stdoutunit, generic_blres_nml) diff --git a/generic_tracers/generic_tracer.F90 b/generic_tracers/generic_tracer.F90 index 53fc921..53897ae 100644 --- a/generic_tracers/generic_tracer.F90 +++ b/generic_tracers/generic_tracer.F90 @@ -33,7 +33,7 @@ module generic_tracer - use fms_mod, only: open_namelist_file, close_file, check_nml_error + use fms_mod, only: check_nml_error use field_manager_mod, only: fm_string_len use mpp_mod, only : input_nml_file, mpp_error, NOTE, WARNING, FATAL, stdout, stdlog use time_manager_mod, only : time_type @@ -159,15 +159,8 @@ subroutine generic_tracer_register(verbosity) stdoutunit=stdout();stdlogunit=stdlog() ! provide for namelist over-ride of defaults -#ifdef INTERNAL_FILE_NML -read (input_nml_file, nml=generic_tracer_nml, iostat=io_status) -ierr = check_nml_error(io_status,'generic_tracer_nml') -#else - ioun = open_namelist_file() - read (ioun, generic_tracer_nml,iostat=io_status) + read (input_nml_file, nml=generic_tracer_nml, iostat=io_status) ierr = check_nml_error(io_status,'generic_tracer_nml') - call close_file (ioun) -#endif write (stdoutunit,'(/)') write (stdoutunit, generic_tracer_nml)