read_esri_ascii_header Subroutine

public subroutine read_esri_ascii_header(filename_ascii_sub, ncols_sub, nrows_sub, cellsize_sub, xllcorner, yllcorner, read_nodata_flag)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: filename_ascii_sub
integer :: ncols_sub
integer :: nrows_sub
real :: cellsize_sub
real :: xllcorner
real :: yllcorner
logical :: read_nodata_flag

Called by

proc~~read_esri_ascii_header~~CalledByGraph proc~read_esri_ascii_header read_esri_ascii_header proc~uemep_read_landuse_rivm_data uEMEP_read_landuse_rivm_data proc~uemep_read_landuse_rivm_data->proc~read_esri_ascii_header program~uemep uEMEP program~uemep->proc~uemep_read_landuse_rivm_data

Source Code

    subroutine read_esri_ascii_header(filename_ascii_sub, ncols_sub, nrows_sub, cellsize_sub, xllcorner, yllcorner, read_nodata_flag)
        character(*) :: filename_ascii_sub
        integer :: ncols_sub, nrows_sub
        real :: cellsize_sub
        real :: xllcorner
        real :: yllcorner
        logical :: read_nodata_flag

        ! Local variables
        real :: NODATA_value = -999.0
        integer :: unit_in = 20
        character(256) :: temp_str

        open(unit_in, file=filename_ascii_sub, access='sequential', form='formatted', status='old', readonly)
        rewind(unit_in)
        read(unit_in,*) temp_str, ncols_sub
        read(unit_in,*) temp_str, nrows_sub
        read(unit_in,*) temp_str, xllcorner
        read(unit_in,*) temp_str, yllcorner
        read(unit_in,*) temp_str, cellsize_sub
        if (read_nodata_flag) read(unit_in,*) temp_str, NODATA_value
        write(unit_logfile,'(2a10,4a12)') 'ncols', 'nrows', 'xllcorner', 'yllcorner', 'cellsize', 'NODATA_val'
        write(unit_logfile,'(2i10,4f12.1)') ncols_sub, nrows_sub, xllcorner, yllcorner, cellsize_sub, NODATA_value
        close(unit_in)
    end subroutine read_esri_ascii_header