From 1f8ce1304a7c0939cbc4584e1b5afa5165821fb6 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Tue, 5 Jul 2022 16:10:21 -0600 Subject: [PATCH] Rename init_pio to driver_pio As per Jim Edwards suggestion (https://github.com/ESCOMP/CESM_CPL7andDataComps/pull/16#pullrequestreview-1029231612) --- cesm/driver/esm.F90 | 6 +-- .../{init_pio_mod.F90 => driver_pio_mod.F90} | 42 +++++++++---------- cesm/nuopc_cap_share/nuopc_shr_methods.F90 | 4 +- 3 files changed, 26 insertions(+), 26 deletions(-) rename cesm/nuopc_cap_share/{init_pio_mod.F90 => driver_pio_mod.F90} (93%) diff --git a/cesm/driver/esm.F90 b/cesm/driver/esm.F90 index 9be41b4d9..b6f39ad52 100644 --- a/cesm/driver/esm.F90 +++ b/cesm/driver/esm.F90 @@ -808,7 +808,7 @@ subroutine esm_init_pelayout(driver, maxthreads, rc) use mpi , only : MPI_COMM_NULL, mpi_comm_size #endif use mct_mod , only : mct_world_init - use init_pio_mod , only : init_pio_init, init_pio_component_init + use driver_pio_mod , only : driver_pio_init, driver_pio_component_init #ifdef MED_PRESENT use med_internalstate_mod , only : med_id @@ -934,7 +934,7 @@ subroutine esm_init_pelayout(driver, maxthreads, rc) ! Initialize PIO ! This reads in the pio parameters that are independent of component - call init_pio_init(driver, rc=rc) + call driver_pio_init(driver, rc=rc) if (chkerr(rc,__LINE__,u_FILE_u)) return allocate(comms(componentCount+1), comps(componentCount+1)) @@ -1182,7 +1182,7 @@ subroutine esm_init_pelayout(driver, maxthreads, rc) enddo ! Read in component dependent PIO parameters and initialize ! IO systems - call init_pio_component_init(driver, size(comps), rc) + call driver_pio_component_init(driver, size(comps), rc) if (chkerr(rc,__LINE__,u_FILE_u)) return ! Initialize MCT (this is needed for data models and cice prescribed capability) diff --git a/cesm/nuopc_cap_share/init_pio_mod.F90 b/cesm/nuopc_cap_share/driver_pio_mod.F90 similarity index 93% rename from cesm/nuopc_cap_share/init_pio_mod.F90 rename to cesm/nuopc_cap_share/driver_pio_mod.F90 index 94d6dc86e..0e743d669 100644 --- a/cesm/nuopc_cap_share/init_pio_mod.F90 +++ b/cesm/nuopc_cap_share/driver_pio_mod.F90 @@ -1,4 +1,4 @@ -module init_pio_mod +module driver_pio_mod use pio use shr_pio_mod, only : io_compname, pio_comp_settings, iosystems, io_compid, shr_pio_getindex use shr_kind_mod, only : CS=>shr_kind_CS, shr_kind_cl, shr_kind_in @@ -15,10 +15,10 @@ module init_pio_mod #include #endif private - public :: init_pio_init - public :: init_pio_component_init - public :: init_pio_finalize - public :: init_pio_log_comp_settings + public :: driver_pio_init + public :: driver_pio_component_init + public :: driver_pio_finalize + public :: driver_pio_log_comp_settings integer :: io_comm integer :: pio_debug_level=0, pio_blocksize=0 @@ -50,7 +50,7 @@ module init_pio_mod !! !< - subroutine init_pio_init(driver, rc) + subroutine driver_pio_init(driver, rc) use ESMF, only : ESMF_GridComp, ESMF_VM, ESMF_Config, ESMF_GridCompGet use ESMF, only : ESMF_VMGet, ESMF_RC_NOT_VALID, ESMF_LogSetError use NUOPC, only: NUOPC_CompAttributeGet @@ -66,7 +66,7 @@ subroutine init_pio_init(driver, rc) character(len=CS) :: pio_rearr_comm_type, pio_rearr_comm_fcd character(CS) :: msgstr - character(*), parameter :: subName = '(init_pio_init) ' + character(*), parameter :: subName = '(driver_pio_init) ' call ESMF_GridCompGet(driver, vm=vm, rc=rc) if (chkerr(rc,__LINE__,u_FILE_u)) return @@ -167,9 +167,9 @@ subroutine init_pio_init(driver, rc) write(shr_log_unit, *) " enable_isend (io2comp) = ", pio_rearr_opts%comm_fc_opts_io2comp%enable_isend end if - end subroutine init_pio_init + end subroutine driver_pio_init - subroutine init_pio_component_init(driver, ncomps, rc) + subroutine driver_pio_component_init(driver, ncomps, rc) use ESMF, only : ESMF_GridComp, ESMF_LogSetError, ESMF_RC_NOT_VALID, ESMF_GridCompIsCreated, ESMF_VM, ESMF_VMGet use ESMF, only : ESMF_GridCompGet, ESMF_GridCompIsPetLocal, ESMF_VMIsCreated use NUOPC, only : NUOPC_CompAttributeGet, NUOPC_CompAttributeSet, NUOPC_CompAttributeAdd @@ -278,7 +278,7 @@ subroutine init_pio_component_init(driver, ncomps, rc) call NUOPC_CompAttributeGet(gcomp(i), name="pio_netcdf_format", value=cval, rc=rc) if (chkerr(rc,__LINE__,u_FILE_u)) return - call init_pio_getioformatfromname(cval, pio_comp_settings(i)%pio_netcdf_ioformat, PIO_64BIT_DATA) + call driver_pio_getioformatfromname(cval, pio_comp_settings(i)%pio_netcdf_ioformat, PIO_64BIT_DATA) if (pio_async_interface(i)) then do_async_init = do_async_init + 1 @@ -308,9 +308,9 @@ subroutine init_pio_component_init(driver, ncomps, rc) endif deallocate(gcomp) - end subroutine init_pio_component_init + end subroutine driver_pio_component_init - subroutine init_pio_log_comp_settings(gcomp, logunit) + subroutine driver_pio_log_comp_settings(gcomp, logunit) use ESMF, only : ESMF_GridComp, ESMF_GridCompGet use NUOPC, only: NUOPC_CompAttributeGet @@ -341,21 +341,21 @@ subroutine init_pio_log_comp_settings(gcomp, logunit) write(logunit, *) trim(name),': PIO root=',pio_comp_settings(i)%pio_root - end subroutine init_pio_log_comp_settings + end subroutine driver_pio_log_comp_settings !=============================================================================== - subroutine init_pio_finalize( ) + subroutine driver_pio_finalize( ) integer :: ierr integer :: i do i=1,total_comps call pio_finalize(iosystems(i), ierr) end do - end subroutine init_pio_finalize + end subroutine driver_pio_finalize !=============================================================================== - subroutine init_pio_getioformatfromname(pio_netcdf_format, pio_netcdf_ioformat, pio_default_netcdf_ioformat) + subroutine driver_pio_getioformatfromname(pio_netcdf_format, pio_netcdf_ioformat, pio_default_netcdf_ioformat) use shr_string_mod, only : shr_string_toupper character(len=*), intent(inout) :: pio_netcdf_format integer, intent(out) :: pio_netcdf_ioformat @@ -372,10 +372,10 @@ subroutine init_pio_getioformatfromname(pio_netcdf_format, pio_netcdf_ioformat, pio_netcdf_ioformat = pio_default_netcdf_ioformat endif - end subroutine init_pio_getioformatfromname + end subroutine driver_pio_getioformatfromname - subroutine init_pio_getiotypefromname(typename, iotype, defaulttype) + subroutine driver_pio_getiotypefromname(typename, iotype, defaulttype) use shr_string_mod, only : shr_string_toupper character(len=*), intent(inout) :: typename integer, intent(out) :: iotype @@ -395,12 +395,12 @@ subroutine init_pio_getiotypefromname(typename, iotype, defaulttype) else if ( typename .eq. 'DEFAULT') then iotype = defaulttype else - write(shr_log_unit,*) 'init_pio_mod: WARNING Bad io_type argument - using iotype_netcdf' + write(shr_log_unit,*) 'driver_pio_mod: WARNING Bad io_type argument - using iotype_netcdf' iotype=pio_iotype_netcdf end if - end subroutine init_pio_getiotypefromname + end subroutine driver_pio_getiotypefromname !=============================================================================== -end module init_pio_mod +end module driver_pio_mod diff --git a/cesm/nuopc_cap_share/nuopc_shr_methods.F90 b/cesm/nuopc_cap_share/nuopc_shr_methods.F90 index 4fe80b534..8d472902b 100644 --- a/cesm/nuopc_cap_share/nuopc_shr_methods.F90 +++ b/cesm/nuopc_cap_share/nuopc_shr_methods.F90 @@ -132,7 +132,7 @@ end subroutine get_component_instance !=============================================================================== subroutine set_component_logging(gcomp, mastertask, logunit, shrlogunit, rc) - use init_pio_mod, only : init_pio_log_comp_settings + use driver_pio_mod, only : driver_pio_log_comp_settings ! input/output variables type(ESMF_GridComp) :: gcomp logical, intent(in) :: mastertask @@ -165,7 +165,7 @@ subroutine set_component_logging(gcomp, mastertask, logunit, shrlogunit, rc) open(newunit=logunit,file=trim(diro)//"/"//trim(logfile)) ! Write the PIO settings to the beggining of each component log - call init_pio_log_comp_settings(gcomp, logunit) + call driver_pio_log_comp_settings(gcomp, logunit) else logUnit = 6