Blame view

src/idl/dustem_write_all_release.pro 2.61 KB
52a3c8dc   Jean-Philippe Bernard   mise a jour
1
2
3
4
5
PRO dustem_write_all_release,st,dir_out,help=help

;+
; NAME:
;   dustem_write_all_release
a78ee4de   Annie Hughes   unknown
6
;
52a3c8dc   Jean-Philippe Bernard   mise a jour
7
; PURPOSE:
a78ee4de   Annie Hughes   unknown
8
9
;   writes .DAT files necessary to run dustem within dustemwrap
;
52a3c8dc   Jean-Philippe Bernard   mise a jour
10
11
; CATEGORY:
;    DustEMWrap, Distributed, HighLevel, Initialization
a78ee4de   Annie Hughes   unknown
12
;
52a3c8dc   Jean-Philippe Bernard   mise a jour
13
14
; CALLING SEQUENCE:
;   dustem_write_all_release,st,dir_out
a78ee4de   Annie Hughes   unknown
15
;
52a3c8dc   Jean-Philippe Bernard   mise a jour
16
17
18
; INPUTS:
;    st       : dustem structure
;    dir_out  : output directory where files will be written
a78ee4de   Annie Hughes   unknown
19
;
52a3c8dc   Jean-Philippe Bernard   mise a jour
20
21
; OPTIONAL INPUT PARAMETERS:
;    None
a78ee4de   Annie Hughes   unknown
22
;
52a3c8dc   Jean-Philippe Bernard   mise a jour
23
24
; OUTPUTS:
;    None
a78ee4de   Annie Hughes   unknown
25
;
52a3c8dc   Jean-Philippe Bernard   mise a jour
26
27
; OPTIONAL OUTPUT PARAMETERS:
;    None
a78ee4de   Annie Hughes   unknown
28
;
52a3c8dc   Jean-Philippe Bernard   mise a jour
29
30
; ACCEPTED KEY-WORDS:
;    help     : whrites this help
a78ee4de   Annie Hughes   unknown
31
;
52a3c8dc   Jean-Philippe Bernard   mise a jour
32
33
; COMMON BLOCKS:
;    None
a78ee4de   Annie Hughes   unknown
34
;
52a3c8dc   Jean-Philippe Bernard   mise a jour
35
36
; SIDE EFFECTS:
;    Files are written
a78ee4de   Annie Hughes   unknown
37
;
52a3c8dc   Jean-Philippe Bernard   mise a jour
38
39
40
; RESTRICTIONS:
;    The DustEM fortran code must be installed
;    The DustEMWrap idl code must be installed
a78ee4de   Annie Hughes   unknown
41
;
52a3c8dc   Jean-Philippe Bernard   mise a jour
42
; PROCEDURES AND SUBROUTINES USED  
a78ee4de   Annie Hughes   unknown
43
;
52a3c8dc   Jean-Philippe Bernard   mise a jour
44
; EXAMPLES
a78ee4de   Annie Hughes   unknown
45
;
52a3c8dc   Jean-Philippe Bernard   mise a jour
46
47
48
49
50
51
52
53
54
; 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_all_release'
  goto,the_end
ENDIF
662437c0   Annie Hughes   Added
55

b05b5475   Ilyes Choubani   adding test so th...
56
57
58
59
60
if strmid(!dustem_dat,0,/reverse) ne '/' then !dustem_dat=!dustem_dat+'/' 

dir_out_dat=dir_out+'data/'
dir_out_qabs=dir_out+'oprop/'
dir_out_capa=dir_out+'hcap/'
662437c0   Annie Hughes   Added
61
62
63

;== ISRF
file_out=dir_out_dat+'ISRF.DAT'
29421054   Ilyes Choubani   write_isrf_lv is ...
64
dustem_write_isrf_release,file_out,st.isrf
662437c0   Annie Hughes   Added
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79

;== LAMBDA
file_out=dir_out_qabs+'LAMBDA.DAT'
dustem_write_lambda,file_out,st.lambda

;== GRAIN
file_out=dir_out_dat+'GRAIN.DAT'

dustem_write_grain_release,file_out,st.grains

;== GAS
file_out=dir_out_dat+'GAS.DAT'

dustem_write_gas,file_out,st.GAS

29421054   Ilyes Choubani   write_isrf_lv is ...
80
81
82



662437c0   Annie Hughes   Added
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

;== SPIN
dustem_write_spin,dir_out_dat,st.spin

;stop
;== CHRG
dustem_write_chrg,dir_out_dat,st.chrg

;== MIX
dustem_write_mix,dir_out_dat,st.mix

;== SIZE
dustem_write_size_lv,dir_out_dat,st.size

;== QABS
dustem_write_qabs_lv,dir_out_qabs,st.qabs

;== CALOR
dustem_write_calor_lv,dir_out_capa,st.calor

;== POL
;dustem_write_pol,dir_out_dat,st.pol
;FOR i_axis = 1, 3 DO dustem_write_qabspol,dir_out_qabs,st,i_axis

;== POL
52a3c8dc   Jean-Philippe Bernard   mise a jour
108
IF !run_pol THEN BEGIN
662437c0   Annie Hughes   Added
109
110
111
    ;stop
	file_out=dir_out_dat+'ALIGN.DAT'
    ;stop
52a3c8dc   Jean-Philippe Bernard   mise a jour
112
	;Write the grain alignment file
662437c0   Annie Hughes   Added
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
	dustem_write_align,file_out,st.align

	; Linear polarization
	file_out=dir_out_qabs
	IF not stregex(st.align.keywords, 'rrf', /bool) THEN for i_axis = 1, 2 do dustem_write_qpol,file_out,st,i_axis
	
	; Circular polarization
	if !run_circ then dustem_write_qcirc,file_out,st

	; Anisotropic heating
	IF (st.align.anisG0 > 0) THEN for i_axis = 1, 2 do dustem_write_qh,file_out,st,i_axis

	; RRF Files
	IF stregex(st.align.keywords, 'rrf', /bool) THEN for i_axis = 1, 2 do dustem_write_qpol_rrf,file_out,st,i_axis

52a3c8dc   Jean-Philippe Bernard   mise a jour
128
ENDIF
662437c0   Annie Hughes   Added
129
130
131
132
133

;== TLS
file_out=dir_out_dat
dustem_write_tls,dir_out_dat,st.tls

52a3c8dc   Jean-Philippe Bernard   mise a jour
134
the_end:
662437c0   Annie Hughes   Added
135
136

END