SUBROUTINE PHOTIN C Received from Randy Kawa 1/24/95 - adapted from ptest_2d.f C use this with photcodes7.f subroutines C rlam -- array of wavelength values (nlam) used to generate s table C sza_tab -- array of sza values (nsza) used to generate s table C o3_tab -- array of col o3 values (no3,npr) used to generate s table C stab -- array of s data (nsza,no3s,nprs,nwavelengths) #include "comphot.h" write (6,*) ' enter photin program ' c Read in cross-section, quantum yield, and solar flux data. lun3=41 lun4=42 OPEN (UNIT=lun3,NAME='stab_2d69.xdr', 1 FORM='system') OPEN (UNIT=lun4,NAME='indx_2d69.dat', 1 FORM='formatted') C PURPOSE: read in radiation source function data table for subsequent C interpolation. Also read table indexing arrays. C CATEGORY: C INPUTS: C lun4 -- unit number of file containing table index values, ie., pressures, C wavelengths, sza, and o3 cols (no3,npr) used to generate stab C Values were written at same time as stab. C lun3 -- unit number of file containing s data table. C Data must be on wavelength grid consistent with x-sections. C Table is written by wrt_stab.pro C nlam -- number of wavelength intervals used (checked against read-in) C nsza -- number of zenith angles in table C no3s -- number of column o3 values in table C OPTIONAL INPUT PARAMETERS: C KEYWORD PARAMETERS: C OUTPUTS: C rlam -- array of wavelength values (nlam) used to generate s table C sza_tab -- array of sza values (nsza) used to generate s table C o3_tab -- array of col o3 values (no3,npr) used to generate s table C stab -- array of s data (nzens,no3s,nprs,nwavelengths) C o2jdat -- array (nzens,no3s,nprs) of J(O2) values from srcfun output C COMMON BLOCKS: C SIDE EFFECTS: C PROCEDURE: C Straightforward. C RESTRICTIONS: C C REQUIRED ROUTINES: Open (FORM='system') and Close units in calling C program C MODIFICATION HISTORY: C Created 930824 - SR Kawa C Modified 950404 to read in J(O2) values from srcfun appended to s table C $Header: /home/kawa/3d/rdstab.f $ C- C40 C Read in dimensions of index arrays and check for consistency READ (lun4,*) npr_in,nlam_in,nsza_in,no3_in PRINT *,'s data array dimensions:',nsza_in,no3_in,npr_in,nlam_in write (6,*) IF((npr_in.NE.npr).OR.(nlam_in.NE.nlam).OR.(nsza_in.NE.nsza).OR. 1 (no3_in.NE.no3)) THEN PRINT *,'Array dimensions of table indices do not match', 1 ' those expected',npr_in,npr,nlam_in,nlam,nsza_in, 2 nsza,no3_in,no3 RETURN ENDIF C Read in indexing values READ (lun4,*) pr_tab print *,pr_tab READ (lun4,*) rlam print *,rlam READ (lun4,*) sza_tab print *,sza_tab READ (lun4,*) o3_tab c print *,o3_tab C Read in s function data in binary format. READ (lun3) stab READ (lun3) o2jdat RETURN END