Blame view

src/idl/dustem_run.pro 1.25 KB
427f1205   Jean-Michel Glorian   version 4.2 merged
1
2
3
4
5
FUNCTION dustem_run,params,help=help

;+
; 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
02ee63e9   Annie Hughes   doc help updated
30
;
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

427f1205   Jean-Michel Glorian   version 4.2 merged
72
spawn,!dustem_f90_exec
427f1205   Jean-Michel Glorian   version 4.2 merged
73
st=dustem_read_all_res(!dustem_res,/silent)
8bab7d4b   Ilyes Choubani   small corrections...
74

427f1205   Jean-Michel Glorian   version 4.2 merged
75
76
77
78
79
the_end:

RETURN,st
  
END