Blame view

src/idl/dustem_write_grain_web3p8.pro 1.84 KB
427f1205   Jean-Michel Glorian   version 4.2 merged
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
6730c3f8   Jean-Philippe Bernard   modified to be co...
30
31
32
33
34
35
36
37
38
39
40
41
;stop

printf,unit,(*!dustem_params).keywords
printf,unit,(*!dustem_params).G0
;printf,unit,(*!dustem_params).ngrains
;===== JPB: updating for longer keywords
;frmt='(A12,I4,A12,11E14.6)'
frmt='(A12,I4,A20,11E14.6)'

FOR i=0L,(*!dustem_params).ngrains-1 DO BEGIN
  printf,unit,st(i).grain_type,st(i).nsize,st(i).type_keywords,st(i).mdust_o_mh,st(i).rho,st(i).amin,st(i).amax, $
              st(i).alpha_o_a0, st(i).at,st(i).ac,st(i).gamma,st(i).au,st(i).zeta,st(i).eta,format=frmt
427f1205   Jean-Michel Glorian   version 4.2 merged
42
43
  IF !dustem_verbose EQ 1 THEN BEGIN
;    stop
6730c3f8   Jean-Philippe Bernard   modified to be co...
44
45
    print,st(i).grain_type,st(i).nsize,st(i).type_keywords,st(i).mdust_o_mh,st(i).rho,st(i).amin,st(i).amax, $
              st(i).alpha_o_a0, st(i).at,st(i).ac,st(i).gamma,st(i).au,st(i).zeta,st(i).eta,format=frmt
427f1205   Jean-Michel Glorian   version 4.2 merged
46
47
48
49
50
51
52
  ENDIF
ENDFOR

close,unit
free_lun,unit

END