Blame view

src/idl/dustem_write_align.pro 1.46 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
PRO dustem_write_align,file,st_align

Ncomments=12
c=strarr(Ncomments)

c(0)='# DUSTEM: definition of grain alignment'
c(1)='# for each grain TYPE make sure you have the following files'
c(2)='# Q1_TYPE.DAT and Q2_TYPE in /oprop'
c(3)='# Qc_TYPE.DAT for circular polarization'
c(4)='# QH1_TYPE.DAT QH2_TYPE.DAT for an anistropic radiation field'
c(5)='# Q1_TYPE_RRFxxx.DAT and Q2_TYPE_RRFxxx.DAT when running with RRF option'
c(6)='#'
c(7)='# run keywords'
c(8)='# lin for linear, circ for circular, anis for anistropic extinction and emission, univ for universal alignment law, RRF'
c(9)='# degree of anisotropy of the radiation : if > 0, read QH1 and QH2 files'
c(10)='# alignmentlaw (idg, rat, par), parameters (par1 par2 par3)'
c(11)='#'

openw,unit,file,/get_lun
427f1205   Jean-Michel Glorian   version 4.2 merged
20
FOR ii=0,Ncomments-1 DO printf,unit,c(ii)
427f1205   Jean-Michel Glorian   version 4.2 merged
21
22
23
24
printf,unit,st_align.keywords,format='(A-40)'
printf,unit,st_align.anisG0,format='(E10.2)'

if !run_univ eq 1 then begin
d012e324   Ilyes Choubani   FIX to the use of...
25
26
27
28
    iii=where(st_align.grains.aligned eq 1)
    iii=iii(0)
	printf,unit,st_align.grains(iii).law,st_align.grains(iii).athresh,st_align.grains(iii).pstiff,st_align.grains(iii).plev,format='(A-10,2X,10(E18.10,2X))'
	;stop 
427f1205   Jean-Michel Glorian   version 4.2 merged
29
30
endif else begin
	for i=0,n_elements(st_align.grains)-1 do begin
b5ccb706   Jean-Philippe Bernard   improved to fit p...
31
        if st_align.grains(i).aligned then if st_align.grains(i).law ne '' then printf,unit,st_align.grains(i).law,st_align.grains(i).athresh,st_align.grains(i).pstiff,st_align.grains(i).plev,format='(A-10,2X,10(E18.10,2X))'
427f1205   Jean-Michel Glorian   version 4.2 merged
32
33
34
35
36
37
	endfor
endelse

close,unit
free_lun,unit

427f1205   Jean-Michel Glorian   version 4.2 merged
38
END