Blame view

src/idl/dustem_run.pro 1.49 KB
5eebdedb   Jean-Philippe Bernard   changed plugin st...
1
FUNCTION dustem_run,params,help=help,use_previous_fortran=use_previous_fortran
427f1205   Jean-Michel Glorian   version 4.2 merged
2
3
4
5

;+
; NAME:
;    dustem_run
02ee63e9   Annie Hughes   doc help updated
6
;
427f1205   Jean-Michel Glorian   version 4.2 merged
7
8
; PURPOSE:
;    Runs the DUSTEM code and returns the results into a structure.
02ee63e9   Annie Hughes   doc help updated
9
;
427f1205   Jean-Michel Glorian   version 4.2 merged
10
; CATEGORY:
02ee63e9   Annie Hughes   doc help updated
11
12
;    DustEMWrap, Distributed, Mid-Level, Fortran
;
427f1205   Jean-Michel Glorian   version 4.2 merged
13
14
; CALLING SEQUENCE:
;    st=dustem_run(params[,/help])
02ee63e9   Annie Hughes   doc help updated
15
;
427f1205   Jean-Michel Glorian   version 4.2 merged
16
17
; INPUTS:
;    params = model parameter values
02ee63e9   Annie Hughes   doc help updated
18
;
427f1205   Jean-Michel Glorian   version 4.2 merged
19
20
; OPTIONAL INPUT PARAMETERS:
;    None
02ee63e9   Annie Hughes   doc help updated
21
;
427f1205   Jean-Michel Glorian   version 4.2 merged
22
23
; OUTPUTS:
;    st: output structure
02ee63e9   Annie Hughes   doc help updated
24
;
427f1205   Jean-Michel Glorian   version 4.2 merged
25
26
; OPTIONAL OUTPUT PARAMETERS:
;    None
02ee63e9   Annie Hughes   doc help updated
27
;
427f1205   Jean-Michel Glorian   version 4.2 merged
28
29
; ACCEPTED KEY-WORDS:
;    help      = If set, print this help
5eebdedb   Jean-Philippe Bernard   changed plugin st...
30
;    use_previous_fortran = if set, uses the output of the previous fortran run, and does not run the fortran.
427f1205   Jean-Michel Glorian   version 4.2 merged
31
32
; COMMON BLOCKS:
;    None
02ee63e9   Annie Hughes   doc help updated
33
;
427f1205   Jean-Michel Glorian   version 4.2 merged
34
35
; SIDE EFFECTS:
;    None
02ee63e9   Annie Hughes   doc help updated
36
;
427f1205   Jean-Michel Glorian   version 4.2 merged
37
; RESTRICTIONS:
02ee63e9   Annie Hughes   doc help updated
38
39
40
;    The DustEM fortran code must be installed
;    The DustEMWrap idl code must be installed
;
427f1205   Jean-Michel Glorian   version 4.2 merged
41
42
; PROCEDURE:
;    None
02ee63e9   Annie Hughes   doc help updated
43
;
427f1205   Jean-Michel Glorian   version 4.2 merged
44
45
; EXAMPLES
;    st=dustem_run(params)
02ee63e9   Annie Hughes   doc help updated
46
;
427f1205   Jean-Michel Glorian   version 4.2 merged
47
; MODIFICATION HISTORY:
02ee63e9   Annie Hughes   doc help updated
48
49
50
;    Written by JPB 2007
;    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
55
56
57
58
59
60
61
62
;-

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
427f1205   Jean-Michel Glorian   version 4.2 merged
63
64
65
66
67
68
69
70
       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
71

746b3ee2   Jean-Philippe Bernard   fixed for REPLACE...
72
73
74
;dustem_print_params
;stop

5eebdedb   Jean-Philippe Bernard   changed plugin st...
75
76
77
78
IF not keyword_set(use_previous_fortran) THEN BEGIN
  spawn,!dustem_f90_exec
  ;stop
ENDIF
427f1205   Jean-Michel Glorian   version 4.2 merged
79
st=dustem_read_all_res(!dustem_res,/silent)
8bab7d4b   Ilyes Choubani   small corrections...
80

5eebdedb   Jean-Philippe Bernard   changed plugin st...
81

427f1205   Jean-Michel Glorian   version 4.2 merged
82
83
84
85
86
the_end:

RETURN,st
  
END