real function rf_hirsplanck(t, k, opt) c * Planck function for HIRS c .... version of 01.03.06 c t = temperature, deg K 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) real tt, t, expn integer k, opt if(opt .eq. 1) then tt=tc(1,k)+tc(2,k)*t expn=exp(fk2(k)/tt) - 1. rf_hirsplanck=fk1(k)/expn c write(*,'(''Opt1: '',i5,7f15.5)') k, cwn(k), fk1(k), fk2(k), tc(1,k), tc(2,k), c * t, rf_hirsplanck else if(opt .eq. 2) then tt=tc_shifted(1,k)+tc_shifted(2,k)*t expn=exp(fk2_shifted(k)/tt) - 1. rf_hirsplanck=fk1_shifted(k)/expn 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), t, rf_hirsplanck end if return end