subroutine ld_ccftabl(success) c============================================================================ c procedure name: ld_ccftabl c procedure type: fortran subroutine c version date: 19.vii.98 c c purpose: c this program reads the table used for the calculation of the cloud c correction factor (ccf) from the file "ccf.dat" into memory. c c calling parameters: c name type i/o units description c -------- ---- --- ----- -------------- c success l o successful completion flag c c external routines required: c c notes & caveats: c c revision history: c 19.vii.98 added documentation. changed from static assignment of c logical unit number to use of get_lun and unget_lun. (eac) c c============================================================================ implicit none c -- calling parameters logical success c -- common blocks include "ccf.cmn" c -- local variables integer*4 nin, i integer*4 isa, isz, irt, irs integer*4 lun c============================================================================ call get_lun(lun) open (unit=lun, file='ccf.dat',form='formatted',status='old') read(lun,*) nin if (nin .ne. nlam_t) goto 900 read(lun,*) lam_t read(lun,*) nin if (nin .ne. nsza_t) goto 901 read(lun,*) sza_t read(lun,*) nin if (nin .ne. ntcl_t) goto 902 read(lun,*) tcl_t read(lun,*) nin if (nin .ne. nrs_t) goto 903 read(lun,*) rs_t do i=0, nrs_t-1 rs_t(i)=100.*rs_t(i) end do read(lun,*) nin if (nin .ne. npt_t) goto 904 read(lun,*) pt_t read(lun,*) ccftab close(lun) call unget_lun(lun) success=.true. return 900 continue 901 continue 902 continue 903 continue 904 continue write(6,*)'unexpected file input to ld_ccftb' success=.false. return end