subroutine get_csrbs(debug, csrb_file, csrbs) c----------------------------------------------------------------------------------- c Description: Acquire HIRS monthly zonal clear sky radiance bias (CSRB) data from c input file. c c Input parameters: c debug Debug level index c csrb_file CSRB file name (command line input) c c Output parameters: c csrbs Array containing CSRB data. c c File contains 180 zonal means for 8 bands and 3 scene types: c HIRS bands 4, 5, 6, 7, 8, 10, 11, 12 c Scene types: 1=ocean, 2=AN land, 3=DN land c c Revision history: c 06/11 R. Frey Original version c c Calls c None c c----------------------------------------------------------------------------------- IMPLICIT NONE c----------------------------------------------------------------------------------- c Parameter definitions. integer nlat_bins parameter (nlat_bins = 180) integer nbands parameter (nbands = 8) integer num_scenes parameter (num_scenes = 3) c----------------------------------------------------------------------------------- c Arguments. character*120 csrb_file integer debug real*4 csrbs(nlat_bins, nbands, num_scenes) c Local variables. integer iok, j, k real*4 rlat c----------------------------------------------------------------------------------- c Open the file. open(60, file=csrb_file, access='sequential', form='unformatted') c----------------------------------------------------------------------------------- c Read the file. read(60, iostat=iok) csrbs if(iok .lt. 0) then write(*,'(/,''Error reading CSRB file '', a120)') csrb_file stop100 end if c----------------------------------------------------------------------------------- c Close the file. close(60) c----------------------------------------------------------------------------------- c Debug section. if(debug .gt. 0) then write(*,'(/,''CSRB values, bands 4-8, 10-12: '')') write(*,'(/,''Ocean'')') do j = 1, 180 rlat = (90.0 - (j*1.0)) + 0.5 write(*,'(i5,9f12.3)') j, rlat, (csrbs(j,k,1),k=1,nbands) enddo write(*,'(/,''AN Land'')') do j = 1, 180 rlat = (90.0 - (j*1.0)) + 0.5 write(*,'(i5,9f12.3)') j, rlat, (csrbs(j,k,2),k=1,nbands) enddo write(*,'(/,''DN Land'')') do j = 1, 180 rlat = (90.0 - (j*1.0)) + 0.5 write(*,'(i5,9f12.3)') j, rlat, (csrbs(j,k,3),k=1,nbands) enddo write(*,'(1x)') end if c----------------------------------------------------------------------------------- return end