Blame view

src/idl/dustem_run.pro 1.33 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FUNCTION dustem_run,params,help=help

;+
; NAME:
;    dustem_run
; PURPOSE:
;    Runs the DUSTEM code and returns the results into a structure.
; CATEGORY:
;    Dustem
; CALLING SEQUENCE:
;    st=dustem_run(params[,/help])
; INPUTS:
;    params = model parameter values
; OPTIONAL INPUT PARAMETERS:
;    None
; OUTPUTS:
;    st: output structure
; OPTIONAL OUTPUT PARAMETERS:
;    None
; ACCEPTED KEY-WORDS:
;    help      = If set, print this help
; COMMON BLOCKS:
;    None
; SIDE EFFECTS:
;    None
; RESTRICTIONS:
;    The dustem idl wrapper must be installed
; PROCEDURE:
;    None
; EXAMPLES
;    st=dustem_run(params)
; MODIFICATION HISTORY:
;    Written by J.-Ph. Bernard, N. Flagey, D. Paradis Jan 2007
;    see evolution details on the dustem cvs maintained at CESR
;    Contact J.-Ph. Bernard (Jean-Philippe.Bernard@cesr.fr) in case of problems.
;-

IF keyword_set(help) THEN BEGIN
  doc_library,'dustem_run'
  st=0.
  goto,the_end
ENDIF

CASE n_params() OF
  0: BEGIN
     END
  1: BEGIN
a2e70a54   Jean-Philippe Bernard   improved
48
       ;stop
427f1205   Jean-Michel Glorian   version 4.2 merged
49
50
51
52
53
54
55
56
       dustem_set_params,params
     END
  ELSE: BEGIN
    message,'usage: st=dustem_run([params])',/info
    st=0
    GOTO,the_end
  END
ENDCASE
759a527d   Ilyes Choubani   general update
57

427f1205   Jean-Michel Glorian   version 4.2 merged
58
59
60
;spawn,'dustem'
;st=dustem_read_all_res(getenv('DUSTEM_RES'),/silent)
;print,'params',params
68d2f391   Jean-Philippe Bernard   modified to cope ...
61
62
;stop

427f1205   Jean-Michel Glorian   version 4.2 merged
63
64
65
66
67
68
69
70
71
spawn,!dustem_f90_exec

st=dustem_read_all_res(!dustem_res,/silent)
  
the_end:

RETURN,st
  
END