Commit 15d9386916d82d46488c48caeffe1a8646d6a65c
1 parent
52f17b34
Exists in
master
workaround now that fortran uses negative numbers for gas G0
Showing
1 changed file
with
9 additions
and
6 deletions
Show diff stats
src/idl/dustem_write_isrf_release.pro
... | ... | @@ -78,8 +78,11 @@ IF ctpop NE 0 or ctusrisrf NE 0 THEN BEGIN |
78 | 78 | |
79 | 79 | G0_mathis = 1. ;Default value |
80 | 80 | |
81 | - IF ((*!dustem_params).g0) NE 1. then G0_mathis = ((*!dustem_params).g0) | |
82 | - IF ((*!dustem_params).gas.g0) NE 1. then G0_mathis = float((*!dustem_params).gas.g0) | |
81 | + IF ((*!dustem_params).g0) NE 1. then G0_mathis = ((*!dustem_params).g0) | |
82 | +; Fortran now uses negative numbers to specify Gas.dat G0 | |
83 | +; If positive G0 present in Gas.dat, it takes precedence over grain.dat G0 | |
84 | +; IF ((*!dustem_params).gas.g0) NE 1. then G0_mathis = float((*!dustem_params).gas.g0) | |
85 | + IF ((*!dustem_params).gas.g0) gt 0. then G0_mathis = float((*!dustem_params).gas.g0) | |
83 | 86 | |
84 | 87 | ;Getting the ISRF default wavelengths |
85 | 88 | ;using this structure |
... | ... | @@ -107,9 +110,9 @@ IF ctpop NE 0 or ctusrisrf NE 0 THEN BEGIN |
107 | 110 | IF G0_mathis GT 1E-10 THEN BEGIN ;discussed with JP |
108 | 111 | ;This is reading the mathis isrf from the fortran release |
109 | 112 | ;Let's hope they keep releasing it otherwise we'll have to include it ourselves |
110 | - ma_isrf_dir=!dustem_soft_dir+'data/ISRF_MATHIS.DAT' | |
111 | - ma_isrf=dustem_read_isrf(ma_isrf_dir) | |
112 | - final_isrf=final_isrf/G0_mathis+ma_isrf.isrf ;[0] | |
113 | + mathis_isrf_datfile=!dustem_soft_dir+'data/ISRF_MATHIS.DAT' | |
114 | + mathis_isrf=dustem_read_isrf(mathis_isrf_datfile) | |
115 | + final_isrf=final_isrf/G0_mathis+mathis_isrf.isrf ;[0] | |
113 | 116 | Ncomments=4 |
114 | 117 | c=strarr(Ncomments) |
115 | 118 | c(0)='# DUSTEM_WRAP: exciting radiation field featuring' |
... | ... | @@ -147,7 +150,7 @@ IF ctpop NE 0 or ctusrisrf NE 0 THEN BEGIN |
147 | 150 | |
148 | 151 | |
149 | 152 | ;WRITING THE NEW ISRF |
150 | - | |
153 | + | |
151 | 154 | file=!dustem_dat+'data/ISRF.DAT' |
152 | 155 | openw,unit,file,/get_lun |
153 | 156 | ... | ... |