diff --git a/model/fv_regional_bc.F90 b/model/fv_regional_bc.F90 index 4bd4c0704..df6eada52 100644 --- a/model/fv_regional_bc.F90 +++ b/model/fv_regional_bc.F90 @@ -6758,21 +6758,17 @@ subroutine get_data_source(data_source_fv3gfs,regional) ! Use the fms call here so we can actually get the return code value. ! The term 'source' is specified by 'chgres_cube' ! + lstatus=.false. allocate(pes(mpp_npes())) call mpp_get_current_pelist(pes) - if (regional) then - if (open_file(Gfs_data , 'INPUT/gfs_data.nc', "read", pelist=pes)) then - lstatus = global_att_exists(Gfs_data, "source") - if(lstatus) call get_global_attribute(Gfs_data, "source", source) - call close_file(Gfs_data) - endif - else - if (open_file(Gfs_data , 'INPUT/gfs_data.tile1.nc', "read", pelist=pes)) then + + if (open_file(Gfs_data , 'INPUT/gfs_data.nc', "read", pelist=pes) .or. & + open_file(Gfs_data , 'INPUT/gfs_data.tile1.nc', "read", pelist=pes)) then lstatus = global_att_exists(Gfs_data, "source") if(lstatus) call get_global_attribute(Gfs_data, "source", source) call close_file(Gfs_data) endif - endif + deallocate(pes) if (.not. lstatus) then if (mpp_pe() == 0) write(0,*) 'INPUT source not found ',lstatus,' set source=No Source Attribute'