Blame view

src/idl/dustem_write_grain_lv.pro 2.39 KB
eafc1f8f   Annie Hughes   updated help info
1
PRO dustem_write_grain_lv,file,st,help=help
427f1205   Jean-Michel Glorian   version 4.2 merged
2

eafc1f8f   Annie Hughes   updated help info
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
;+
; 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

  
52a3c8dc   Jean-Philippe Bernard   mise a jour
58
59
message,'This is not used by dustemwrap'

427f1205   Jean-Michel Glorian   version 4.2 merged
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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
52a3c8dc   Jean-Philippe Bernard   mise a jour
80
  printf,unit,c[i]
427f1205   Jean-Michel Glorian   version 4.2 merged
81
82
ENDFOR

52a3c8dc   Jean-Philippe Bernard   mise a jour
83
84
stop

427f1205   Jean-Michel Glorian   version 4.2 merged
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
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

eafc1f8f   Annie Hughes   updated help info
102
the_end:
427f1205   Jean-Michel Glorian   version 4.2 merged
103
END