PRO dustem_write_grain_lv,file,st,help=help ;+ ; NAME: ; dustem_write_grain_lv ; ; PURPOSE: ; Old method for writing information relating to grain properties in the ; corresponding GRAIN.DAT file. DEPRECATED. ; ; CATEGORY: ; DustEMWrap, Distributed, LowLevel, Initialization, Deprecated ; ; CALLING SEQUENCE: ; dustem_write_grain_lv,file,st ; ; INPUTS: ; st : dustem data structure ; file : output file to be written ; ; OPTIONAL INPUT PARAMETERS: ; None ; ; OUTPUTS: ; None ; ; OPTIONAL OUTPUT PARAMETERS: ; None ; ; ACCEPTED KEY-WORDS: ; help : writes this help ; ; COMMON BLOCKS: ; None ; ; SIDE EFFECTS: ; Files are written ; ; RESTRICTIONS: ; The DustEM fortran code must be installed ; The DustEMWrap IDL code must be installed ; ; PROCEDURES AND SUBROUTINES USED: ; ; EXAMPLES: ; ; MODIFICATION HISTORY: ; Evolution details on the DustEMWrap gitlab. ; See http://dustemwrap.irap.omp.eu/ for FAQ and help. ;- IF keyword_set(help) THEN BEGIN doc_library,'dustem_write_grain_lv' goto,the_end ENDIF message,'This is not used by dustemwrap' Ncomments=13 c=strarr(Ncomments) c(0)='# DUSTEM: definition of grain populations' c(1)='# for each grain TYPE make sure you have the following files' c(2)='# Q_TYPE.DAT in code_f90/les_QABS' c(3)='# C_TYPE.DAT in code_f90/les_CAPA' c(4)='# if option(MIX) MIX_TYPE.DAT in code_f90/les_DAT' c(5)='# if option(POL) POL_TYPE.DAT in code_f90/les_DAT' c(6)='# if keyword(SIZE) SIZE_TYPE.DAT in code_f90/les_DAT' c(7)='#' c(8)='# run keywords' c(9)='# G0 scaling factor for radiation field' c(10)='# nr of grain types' c(11)='# grain type - Mdust/MH - rho(g/cm3) - amin(cm) - amax(cm) - alpha - nsize' c(12)='#' OPENW,unit,file,/get_lun FOR i=0,Ncomments-1 DO BEGIN printf,unit,c[i] ENDFOR stop printf,unit,st.keywords printf,unit,st.G0 printf,unit,st.ngrains frmt='(A10,5E14.6,I4,A10)' ;frmt='(A10,5E12.2,I4,A10)' FOR i=0,st.ngrains-1 DO BEGIN printf,unit,st.grains(i).type,st.grains(i).propmass,st.grains(i).densgr,st.grains(i).tmin,st.grains(i).tmax, $ st.grains(i).alpha, st.grains(i).ndiscr,st.grains(i).flag,format=frmt IF !dust.grains EQ 1 THEN BEGIN print,st.grains(i).type,st.grains(i).propmass,st.grains(i).densgr,st.grains(i).tmin,st.grains(i).tmax, $ st.grains(i).alpha, st.grains(i).ndiscr,st.grains(i).flag,format=frmt ENDIF ENDFOR CLOSE,unit free_lun,unit the_end: END