dustem_write_all.pro 2.58 KB
PRO dustem_write_all,st,dir_out,help=help

;+
; NAME:
;    dustem_write_all
; PURPOSE:
;    Write all Dustem input data
; CATEGORY:
;    Dustem
; CALLING SEQUENCE:
;    dustem_write_all,st,dir_out[,/help]
; INPUTS:
;    st: Dustem input structure
;    dir_out: output directory
; OPTIONAL INPUT PARAMETERS:
;    None
; OUTPUTS:
;    None
; 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
;    dustem_init
;    dir=getenv('DUSTEM_SOFT_DIR')+'/src/dustem3.8_web/'
;    st=dustem_read_all(dir)
;    dirout=getenv('DUSTEM_DAT')
;    dustem_write_all,st,dirout
; MODIFICATION HISTORY:
;    Written by J.-Ph. Bernard
;    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_write_all'
  goto,sortie
ENDIF

;IF getenv('DUSTEM_WHICH') EQ 'VERSTRAETE' THEN BEGIN
IF !dustem_which EQ 'VERSTRAETE' THEN BEGIN
  dustem_write_all_lv,st,dir_out
  goto,sortie
ENDIF

;IF getenv('DUSTEM_WHICH') EQ 'WEB3p8' THEN BEGIN
IF !dustem_which EQ 'WEB3p8' THEN BEGIN    
  dustem_write_all_web3p8,st,dir_out
  goto,sortie
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

sortie:

END