PRO dustem_write_grain_web3p8,file,st Ncomments=100 c=strarr(Ncomments) ii=0L c(ii)='# DUSTEM: definition of grain populations' & ii=ii+1 c(ii)='# for each grain TYPE make sure you have the following files' & ii=ii+1 c(ii)='# Q_TYPE.DAT in code_f90/les_QABS' & ii=ii+1 c(ii)='# C_TYPE.DAT in code_f90/les_CAPA' & ii=ii+1 c(ii)='# if option(MIX) MIX_TYPE.DAT in code_f90/les_DAT' & ii=ii+1 c(ii)='# if option(POL) POL_TYPE.DAT in code_f90/les_DAT' & ii=ii+1 c(ii)='# if option(DTLS) DTLS_TYPE.DAT in code_f90/les_DAT' & ii=ii+1 c(ii)='# if keyword(SIZE) SIZE_TYPE.DAT in code_f90/les_DAT' & ii=ii+1 c(ii)='# Written by the DUSTEM IDL Wrapper: dustem_write_grain_web3p8.pro' & ii=ii+1 c(ii)='#' & ii=ii+1 c(ii)='# run keywords' & ii=ii+1 c(ii)='# G0 scaling factor for radiation field' & ii=ii+1 c(ii)='# grain type, nsize, type keywords, Mdust/MH, rho, amin, amax, alpha/a0 [, at, ac, gamma (ED)] [, au, zeta, eta (CV)]' & ii=ii+1 c(ii)='# cgs units' & ii=ii+1 c(ii)='#' & ii=ii+1 Ncomments=ii c=c(0:Ncomments-1) openw,unit,file,/get_lun FOR i=0,Ncomments-1 DO BEGIN printf,unit,c(i) ENDFOR printf,unit,st.keywords printf,unit,st.G0,st.NH frmt='(A50,I4,A16,11E14.6)' ;frmt='(A10,5E12.2,I4,A10)' FOR i=0L,st.ngrains-1 DO BEGIN ;VG : multiply per NH (/1d20) printf,unit,st.grains(i).grain_type,st.grains(i).nsize,st.grains(i).type_keywords,st.grains(i).mdust_o_mh*st.NH,st.grains(i).rho,st.grains(i).amin,st.grains(i).amax, $ st.grains(i).alpha_o_a0, st.grains(i).at,st.grains(i).ac,st.grains(i).gamma,st.grains(i).au,st.grains(i).zeta,st.grains(i).eta,format=frmt IF !dustem_verbose EQ 1 THEN BEGIN ; stop print,st.grains(i).grain_type,st.grains(i).nsize,st.grains(i).type_keywords,st.grains(i).mdust_o_mh*st.NH,st.grains(i).rho,st.grains(i).amin,st.grains(i).amax, $ st.grains(i).alpha_o_a0, st.grains(i).at,st.grains(i).ac,st.grains(i).gamma,st.grains(i).au,st.grains(i).zeta,st.grains(i).eta,format=frmt ENDIF ENDFOR close,unit free_lun,unit END