Skip to content

Commit

Permalink
Removes any fms_io uses
Browse files Browse the repository at this point in the history
  • Loading branch information
Uriel Ramirez committed Mar 3, 2021
1 parent 8e36568 commit b5d55ec
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 60 deletions.
11 changes: 2 additions & 9 deletions generic_tracers/FMS_ocmip2_co2calc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
10 changes: 1 addition & 9 deletions generic_tracers/generic_BLING.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion generic_tracers/generic_CFC.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 1 addition & 8 deletions generic_tracers/generic_COBALT.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 1 addition & 7 deletions generic_tracers/generic_ERGOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,'(/)')
Expand Down
1 change: 0 additions & 1 deletion generic_tracers/generic_SF6.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 1 addition & 8 deletions generic_tracers/generic_abiotic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
9 changes: 1 addition & 8 deletions generic_tracers/generic_blres.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
11 changes: 2 additions & 9 deletions generic_tracers/generic_tracer.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b5d55ec

Please sign in to comment.