Blame view

src/idl/dustem_write_all.pro 2.62 KB
427f1205   Jean-Michel Glorian   version 4.2 merged
1
2
3
4
5
PRO dustem_write_all,st,dir_out,help=help

;+
; NAME:
;    dustem_write_all
191894cc   Annie Hughes   updated doc help ...
6
;
427f1205   Jean-Michel Glorian   version 4.2 merged
7
; PURPOSE:
a78ee4de   Annie Hughes   unknown
8
;    Manages writing of DustEM input data files
191894cc   Annie Hughes   updated doc help ...
9
;
427f1205   Jean-Michel Glorian   version 4.2 merged
10
; CATEGORY:
191894cc   Annie Hughes   updated doc help ...
11
12
;    DustEM, Distributed, Low-level, Fortran
;
427f1205   Jean-Michel Glorian   version 4.2 merged
13
14
; CALLING SEQUENCE:
;    dustem_write_all,st,dir_out[,/help]
191894cc   Annie Hughes   updated doc help ...
15
;
427f1205   Jean-Michel Glorian   version 4.2 merged
16
; INPUTS:
191894cc   Annie Hughes   updated doc help ...
17
;    st: DustEM input structure
427f1205   Jean-Michel Glorian   version 4.2 merged
18
;    dir_out: output directory
191894cc   Annie Hughes   updated doc help ...
19
;
427f1205   Jean-Michel Glorian   version 4.2 merged
20
21
; OPTIONAL INPUT PARAMETERS:
;    None
191894cc   Annie Hughes   updated doc help ...
22
;
427f1205   Jean-Michel Glorian   version 4.2 merged
23
24
; OUTPUTS:
;    None
191894cc   Annie Hughes   updated doc help ...
25
;
427f1205   Jean-Michel Glorian   version 4.2 merged
26
27
; OPTIONAL OUTPUT PARAMETERS:
;    None
191894cc   Annie Hughes   updated doc help ...
28
;
427f1205   Jean-Michel Glorian   version 4.2 merged
29
30
; ACCEPTED KEY-WORDS:
;    help      = If set, print this help
191894cc   Annie Hughes   updated doc help ...
31
;
427f1205   Jean-Michel Glorian   version 4.2 merged
32
33
; COMMON BLOCKS:
;    None
191894cc   Annie Hughes   updated doc help ...
34
;
427f1205   Jean-Michel Glorian   version 4.2 merged
35
; SIDE EFFECTS:
746b3ee2   Jean-Philippe Bernard   fixed for REPLACE...
36
;    JPB: In fact, this routine could probably use st=*!dustem_params and dir_out=!dustem_dat and would need no arguments ...
191894cc   Annie Hughes   updated doc help ...
37
;
427f1205   Jean-Michel Glorian   version 4.2 merged
38
; RESTRICTIONS:
191894cc   Annie Hughes   updated doc help ...
39
40
41
;    The DustEMWrap IDL code must be installed
;    The DustEM fortran code must be installed
;
427f1205   Jean-Michel Glorian   version 4.2 merged
42
43
; PROCEDURE:
;    None
191894cc   Annie Hughes   updated doc help ...
44
;
427f1205   Jean-Michel Glorian   version 4.2 merged
45
; EXAMPLES
191894cc   Annie Hughes   updated doc help ...
46
;
427f1205   Jean-Michel Glorian   version 4.2 merged
47
48
; MODIFICATION HISTORY:
;    Written by J.-Ph. Bernard
191894cc   Annie Hughes   updated doc help ...
49
50
;    Evolution details on the DustEMWrap gitlab.
;    See http://dustemwrap.irap.omp.eu/ for FAQ and help.  
427f1205   Jean-Michel Glorian   version 4.2 merged
51
52
53
54
;-

IF keyword_set(help) THEN BEGIN
  doc_library,'dustem_write_all'
191894cc   Annie Hughes   updated doc help ...
55
  goto,the_end
427f1205   Jean-Michel Glorian   version 4.2 merged
56
57
58
59
60
ENDIF

;IF getenv('DUSTEM_WHICH') EQ 'VERSTRAETE' THEN BEGIN
IF !dustem_which EQ 'VERSTRAETE' THEN BEGIN
  dustem_write_all_lv,st,dir_out
191894cc   Annie Hughes   updated doc help ...
61
  goto,the_end
427f1205   Jean-Michel Glorian   version 4.2 merged
62
63
64
ENDIF

;IF getenv('DUSTEM_WHICH') EQ 'WEB3p8' THEN BEGIN
3c479f24   Ilyes Choubani   Allowing to fix p...
65
66
IF !dustem_which EQ 'RELEASE' THEN BEGIN    
  dustem_write_all_release,st,dir_out
191894cc   Annie Hughes   updated doc help ...
67
  goto,the_end
427f1205   Jean-Michel Glorian   version 4.2 merged
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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
108
109
110
111
112
113
114
115
116
117
ENDIF

file_out=dir_out+'GRAIN.DAT'
dustem_write_grain,file_out,st.grains

file_out=dir_out+'TAILLE.DAT'
dustem_write_taille,file_out,st.grains

file_out=dir_out+'PROPMASS.DAT'
dustem_write_propmass,file_out,st.grains

;IF getenv('DUSTEM_WHICH') EQ 'DESERT' THEN BEGIN
IF !dustem_which EQ 'DESERT' THEN BEGIN
  file_out=dir_out+'GEMISSIV.DAT'
  dustem_write_gemissiv,file_out,st.gemissiv
ENDIF

file_out=dir_out+'ISRF.DAT'
dustem_write_isrf,file_out,st.isrf

;stop
;IF getenv('DUSTEM_WHICH') EQ 'COMPIEGNE' THEN BEGIN
IF !dustem_which EQ 'COMPIEGNE' THEN BEGIN
  file_out=dir_out
  dustem_write_qabs,file_out,st.qabs
ENDIF
;IF getenv('DUSTEM_WHICH') EQ 'DESERT' THEN BEGIN
IF !dustem_which EQ 'DESERT' THEN BEGIN
  file_out=dir_out+'QABS.DAT'
  dustem_write_qabs_desert,file_out,st.qabs
ENDIF

file_out=dir_out+'SPECEM.DAT'
dustem_write_specem,file_out,st.specem

file_out=dir_out+'CALOR.DAT'
dustem_write_calor,file_out,st.calor

;IF getenv('DUSTEM_WHICH') EQ 'COMPIEGNE' THEN BEGIN
IF !dustem_which EQ 'COMPIEGNE' THEN BEGIN
  file_out=dir_out+'LAMBDA.DAT'
  dustem_write_lambda,file_out,st.lambda
ENDIF

;IF getenv('DUSTEM_WHICH') EQ 'DESERT' THEN BEGIN
IF !dustem_which EQ 'DESERT' THEN BEGIN
  file_out=dir_out+'IONFRAC.DAT'
  dustem_write_ionfrac,file_out,st.ionfrac
ENDIF

191894cc   Annie Hughes   updated doc help ...
118
the_end:
427f1205   Jean-Michel Glorian   version 4.2 merged
119
120

END