real function rf_hirsbright(r, k, opt) c * Inverse Planck function for HIRS c .... version of 01.03.06 c r = radiance, standard units c k = channel number: 1...20 c opt (1=unshifted Planck coefficients, 2=shifted Planck coefficients) integer nb, nt parameter (nb=20,nt=2) real cwn, fk1, fk2, tc real cwn_shifted, fk1_shifted, fk2_shifted, tc_shifted common/hirpfc/cwn(nb),fk1(nb),fk2(nb),tc(nt,nb) common/hirpfc_shifted/cwn_shifted(nb),fk1_shifted(nb),fk2_shifted(nb),tc_shifted(nt,nb) integer k, opt real r, expn, tt if(opt .eq. 1) then expn=fk1(k)/r+1. tt=fk2(k)/alog(expn) rf_hirsbright=(tt-tc(1,k))/tc(2,k) c write(*,'(''Opt1: '',i5,7f15.5)') k, cwn(k), fk1(k), fk2(k), tc(1,k), tc(2,k), c * tt, rf_hirsbright else if(opt .eq. 2) then expn=fk1_shifted(k)/r+1. tt=fk2_shifted(k)/alog(expn) rf_hirsbright=(tt-tc_shifted(1,k))/tc_shifted(2,k) c write(*,'(''Opt2: '',i5,7f15.5)') k, cwn_shifted(k), fk1_shifted(k), fk2_shifted(k), c * tc_shifted(1,k), tc_shifted(2,k), tt, rf_hirsbright end if return end