diff --git a/model/fv_regional_bc.F90 b/model/fv_regional_bc.F90 index 40bbbb2af..1e76a7eb0 100644 --- a/model/fv_regional_bc.F90 +++ b/model/fv_regional_bc.F90 @@ -1381,7 +1381,7 @@ subroutine start_regional_restart(Atm & allocate(pes(mpp_npes())) call mpp_get_current_pelist(pes) if (mpp_pe() == pes(1)) then - if( open_file(Gfs_ctl, 'INPUT/gfs_ctrl.nc', "read", pelist=pes(1)) ) then + if( open_file(Gfs_ctl, 'INPUT/gfs_ctrl.nc', "read", pelist=pes(1:1)) ) then !--- read in the number of levsp call get_dimension_size(Gfs_ctl, 'levsp', levsp) call close_file(Gfs_ctl) @@ -1389,8 +1389,7 @@ subroutine start_regional_restart(Atm & call mpp_error(FATAL,'==> Error in fv_regional::start_regional_restart file INPUT/gfs_ctl.nc does not exist') endif endif - call mpp_broadcast(levsp, 1, pes(1), pes) - + call mpp_broadcast(levsp, pes(1), pes) levp = levsp-1 ! !----------------------------------------------------------------------- @@ -1416,12 +1415,12 @@ subroutine start_regional_restart(Atm & allocate (bk_in(levp+1)) ! remapping BC updates during the forecast. if (mpp_pe() == pes(1)) then if (Atm%flagstruct%hrrrv3_ic) then - if (open_file(Grid_input, 'INPUT/hrrr_ctrl.nc', "read", pelist=pes(1))) then + if (open_file(Grid_input, 'INPUT/hrrr_ctrl.nc', "read", pelist=pes(1:1))) then call read_data(Grid_input,'vcoord',wk2) call close_file(Grid_input) endif else - if (open_file(Grid_input, 'INPUT/gfs_ctrl.nc', "read", pelist=pes(1))) then + if (open_file(Grid_input, 'INPUT/gfs_ctrl.nc', "read", pelist=pes(1:1))) then call read_data(Grid_input,'vcoord',wk2) call close_file(Grid_input) endif @@ -6828,7 +6827,7 @@ subroutine get_data_source(data_source_fv3gfs,regional,directory) logical, intent(in):: regional logical, intent(out):: data_source_fv3gfs - character (len=80) :: source + character (len=80), dimension(1) :: source logical :: lstatus character(len=*), intent(in), optional :: directory character(len=128) :: dir @@ -6846,8 +6845,8 @@ subroutine get_data_source(data_source_fv3gfs,regional,directory) call mpp_get_current_pelist(pes) if (mpp_pe() == pes(1)) then - if (open_file(Gfs_data , trim(dir)//'/gfs_data.nc', "read", pelist=pes(1)) .or. & - open_file(Gfs_data , trim(dir)//'/gfs_data.tile1.nc', "read", pelist=pes(1))) then + if (open_file(Gfs_data , trim(dir)//'/gfs_data.nc', "read", pelist=pes(1:1)) .or. & + open_file(Gfs_data , trim(dir)//'/gfs_data.tile1.nc', "read", pelist=pes(1:1))) then lstatus = global_att_exists(Gfs_data, "source") if(lstatus) call get_global_attribute(Gfs_data, "source", source) call close_file(Gfs_data) @@ -6865,9 +6864,9 @@ subroutine get_data_source(data_source_fv3gfs,regional,directory) deallocate(pes) ! Logical flag for fv3gfs nemsio/netcdf/grib2 -------- - if ( trim(source)=='FV3GFS GAUSSIAN NEMSIO FILE' .or. & - trim(source)=='FV3GFS GAUSSIAN NETCDF FILE' .or. & - trim(source)=='FV3GFS GRIB2 FILE' ) then + if ( trim(source(1))=='FV3GFS GAUSSIAN NEMSIO FILE' .or. & + trim(source(1))=='FV3GFS GAUSSIAN NETCDF FILE' .or. & + trim(source(1))=='FV3GFS GRIB2 FILE' ) then data_source_fv3gfs = .TRUE. else data_source_fv3gfs = .FALSE. diff --git a/tools/external_ic.F90 b/tools/external_ic.F90 index 7c1fa4846..62ae168b0 100644 --- a/tools/external_ic.F90 +++ b/tools/external_ic.F90 @@ -395,7 +395,7 @@ subroutine get_nggps_ic (Atm) allocate(pes(mpp_npes())) call mpp_get_current_pelist(pes) if (mpp_pe() == pes(1)) then - if( open_file(Gfs_ctl, fn_gfs_ctl, "read", pelist=pes(1)) ) then + if( open_file(Gfs_ctl, fn_gfs_ctl, "read", pelist=pes(1:1)) ) then !--- read in the number of tracers in the NCEP NGGPS ICs call read_data (Gfs_ctl, 'ntrac', dum_i4(1)) !--- read in the number of levp @@ -408,7 +408,7 @@ subroutine get_nggps_ic (Atm) call mpp_broadcast(dum_i4, size(dum_i4), pes(1), pes) deallocate(pes) ntrac = dum_i4(1) - levsp = dum_14(2) + levsp = dum_i4(2) call mpp_error(NOTE,'==> External_ic::get_nggps_ic: using control file '//trim(fn_gfs_ctl)//' for NGGPS IC') @@ -738,7 +738,7 @@ subroutine read_gfs_ic() allocate(pes(mpp_npes())) call mpp_get_current_pelist(pes) if (mpp_pe() == pes(1)) then - if( open_file(Gfs_ctl, fn_gfs_ctl, "read", pelist=pes(1)) ) then + if( open_file(Gfs_ctl, fn_gfs_ctl, "read", pelist=pes(1:1)) ) then call read_data(Gfs_ctl,'vcoord',wk2) call close_file(Gfs_ctl) endif @@ -916,7 +916,7 @@ subroutine get_hrrr_ic (Atm) allocate(pes(mpp_npes())) call mpp_get_current_pelist(pes) if (mpp_pe() == pes(1)) then - if( open_file(Hrr_ctl, fn_hrr_ctl, "read", pelist=pes(1)) ) then + if( open_file(Hrr_ctl, fn_hrr_ctl, "read", pelist=pes(1:1)) ) then !--- read in the number of tracers in the HRRR ICs call read_data (Hrr_ctl, 'ntrac', ntrac) if (ntrac > ntracers) call mpp_error(FATAL,'==> External_ic::get_hrrr_ic: more HRRR tracers & @@ -1936,12 +1936,12 @@ subroutine get_ecmwf_ic( Atm ) allocate(pes(mpp_npes())) call mpp_get_current_pelist(pes) if (mpp_pe() == pes(1)) then - if( open_file(Gfs_ctl, fn_gfs_ctl, "read", pelist=pes(1)) ) then + if( open_file(Gfs_ctl, fn_gfs_ctl, "read", pelist=pes(1:1)) ) then call read_data(Gfs_ctl,'vcoord',wk2) call close_file(Gfs_ctl) endif endif - mpp_broadcast(wk2, size(wk2), pes(1), pes) + call mpp_broadcast(wk2, size(wk2), pes(1), pes) ak_gfs(1:levp_gfs+1) = wk2(1:levp_gfs+1,1) bk_gfs(1:levp_gfs+1) = wk2(1:levp_gfs+1,2) deallocate (wk2, pes) diff --git a/tools/fv_io.F90 b/tools/fv_io.F90 index b0a216381..4ec4f52b7 100644 --- a/tools/fv_io.F90 +++ b/tools/fv_io.F90 @@ -470,7 +470,7 @@ subroutine fv_io_read_restart(fv_domain,Atm,prefix,directory) if (mpp_pe() == pes(1)) then suffix = '' fname = ''//trim(dir)//'/'//trim(pre)//'fv_core.res.nc' - Atm(1)%Fv_restart_is_open = open_file(Atm(1)%Fv_restart,fname,"read", is_restart=.true., pelist=pes(1)) + Atm(1)%Fv_restart_is_open = open_file(Atm(1)%Fv_restart,fname,"read", is_restart=.true., pelist=pes(1:1)) if (Atm(1)%Fv_restart_is_open) then call fv_io_register_restart(Atm(1)) call read_restart(Atm(1)%Fv_restart) @@ -687,7 +687,7 @@ subroutine remap_restart(Atm) allocate(pes(mpp_npes())) call mpp_get_current_pelist(pes) if (mpp_pe() == pes(1)) then - if (open_file(Fv_restart_r,fname,"read", is_restart=.true., pelist=pes(1))) then + if (open_file(Fv_restart_r,fname,"read", is_restart=.true., pelist=pes(1:1))) then call read_data(Fv_restart_r, 'ak', ak_r(:)) call read_data(Fv_restart_r, 'bk', bk_r(:)) call close_file(Fv_restart_r)