PRO SRF_WRITE, FILE, SENSOR, PLATFORM, BAND, WVN, SRF, APPEND=APPEND ;+ ; NAME: ; SRF_WRITE ; ; PURPOSE: ; Write spectral response data in the format required by CIMSS/SSEC ; fast transmittance models. The data should be defined at ; 0.1 wavenumber spacing at 0.05 boundaries, e.g. ; 690.75, 690.85, 690.95, ... ; ; USAGE: ; SRF_WRITE, FILE, SENSOR, PLATFORM, BAND, WVN, SRF ; ; INPUT: ; FILE Name of output file ; SENSOR Name of sensor (e.g. MODIS, AVHRR) ; PLATFORM Name of sensor platform (e.g. EOS-AM, NOAA-15) ; BAND Band number ; WVN Wavenumber values (inverse cm) ; SRF Spectral response values (no units) ; ; OPTIONAL KEYWORDS: ; APPEND If set, the data is appended to an existing file ; ; OUTPUT: ; None ; ; REVISED: ; Liam.Gumley@ssec.wisc.edu ; $Id: srf_write.pro,v 1.2 1999/12/16 19:39:12 gumley Exp $ ;- ;- Open the file openw, lun, file, /get_lun, append=keyword_set(append) ;- Write the file header if required if not keyword_set(append) then begin printf, lun, strupcase(sensor), strupcase(platform), $ format='("BAND-AVERAGED ", a, " SPECTRAL RESPONSE FUNCTIONS FOR ", a)' endif ;- Write the information for this band npts = n_elements(wvn) printf, lun, band, npts, wvn[0], wvn[npts - 1], format='(i3, i5, 2f8.2)' ;- Write the file data printf, lun, srf, format='(8f9.6)' ;- Close the file free_lun, lun END