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---------------------------------------------------------------------------- c Compile parameters c c---------------------------------------------------------------------------- c Calling parameters c LOGICAL success c---------------------------------------------------------------------------- c Common blocks c INCLUDE "ccf.cmn" c---------------------------------------------------------------------------- c Local variables c INTEGER*4 nin, i INTEGER*4 isa, isz, irt, irs INTEGER*4 lun c============================================================================ write(6,*) 'ld_ccftabl..' 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