-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathReadme_make_new_qtipsH20
347 lines (284 loc) · 14.7 KB
/
Readme_make_new_qtipsH20
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
THESE ARE THE FILES I HAD TO MODIFY (for mow) to get H2020 running
PLUS LOOK AT /home/sergio/SPECTRA/Global_Data_HITRAN2020/
/home/sergio/SPECTRA
-rw-r--r-- 1 sergio pi_strow 2381 Nov 16 11:19 hitread_simple.m
-rw-r--r-- 1 sergio pi_strow 10477 Nov 16 11:19 hitread.m
-rw-r--r-- 1 sergio pi_strow 36555 Nov 16 11:18 run8water.m
-rw-r--r-- 1 sergio pi_strow 39052 Nov 16 11:17 run8.m
-rw-rw-r-- 1 sergio pi_strow 5140 Nov 16 11:17 find_qnewABCD_H20.m
-rw-rw-r-- 1 sergio pi_strow 16339 Nov 16 11:15 qtips20.m
-rw-r--r-- 1 sergio pi_strow 1227 Nov 16 11:15 getq_oldVSnew.m
-rw-rw-r-- 1 sergio pi_strow 3138 Nov 16 11:13 find_qnew_isotopes_H20.m
-rw-r--r-- 1 sergio pi_strow 5826 Nov 16 11:12 findlines_plot_compareHITRAN.m
-rw-r--r-- 1 sergio pi_strow 44149 Nov 16 11:10 run8co2_weakbackgnd.m
-rw-r--r-- 1 sergio pi_strow 2240 Nov 16 06:22 waterlines_plot.m
-rw-r--r-- 1 sergio pi_strow 5169 Nov 16 06:22 show_vis_ir_lines_wavenumber_water.m
-rw-r--r-- 1 sergio pi_strow 4309 Nov 16 06:22 show_vis_ir_lines_wavenumber.m
-rw-rw-r-- 1 sergio pi_strow 1941 Nov 16 06:21 show_unc.m
-rw-r--r-- 1 sergio pi_strow 2300 Nov 16 06:19 findlines_plot.m
-rw-r--r-- 1 sergio pi_strow 5752 Nov 16 06:18 findlines_plot_compareHITRAN_HITEMP.m
-rw-rw-r-- 1 sergio pi_strow 6399 Nov 16 06:18 findlines_plot_compareGEISA_HITRAN.m
-rw-rw-r-- 1 sergio pi_strow 1325 Nov 16 06:17 driver_makeDAVEhitlin.m
and CO2 code
-rw-r--r-- 1 sergio pi_strow 25235 Nov 16 11:24 run8co2_voigt.m
-rw-rw-r-- 1 sergio pi_strow 55639 Nov 16 11:23 run8co2_FULLlinemixUMBC.m
-rw-r--r-- 1 sergio pi_strow 32883 Nov 16 11:22 run8co2_hartmann.m
-rw-r--r-- 1 sergio pi_strow 57138 Nov 16 11:22 run8co2_linemixUMBC.m
-rw-r--r-- 1 sergio pi_strow 30231 Nov 16 11:21 run8co2.m
%%%%%%%%%%%%%%%%%%%%%%%%%
Also need to do lots of things for NLTE
See /home/sergio/KCARTA/NONLTE/M_Files_for_kcarta_NLTE_LBL_runs/ReadmeBlog
%%%%%%%%%%%%%%%%%%%%%%%%%
ALSO have to
mkdir CO2_MATFILES/H20
which gets populated by hitread.m + alreadyexist.m + makeDAVEhitlin.m
very useful in making weakCO2 background for NLTE ....
edit/run driver_makeDAVEhitlin.m and then move the files to eg H20 then do the symbolic links
but be VERY CAREFUL about the subdirs ...
AND
edit run8co2.m and run8co2_linemixUMBC.m so that the default HIT file/dir to read is
/asl/data/hitran/h20.by.gas/g2.dat
%%%%%%%%%%%%%%%%%%%%%%%%%
ALSO HAVE TO DO XSEC
MAKE SURE YOU READ /asl/data/hitran/H2016/Readme_XSEC_H16_51_81
since most of this is irrelevant (the files are very similar to H2016, so no need to do all the below)
>>>>>
After tediously downloading xsec data filess from the HITRAN website, in that dir essentially run
-rwxrwxr-x 1 sergio pi_strow 1303 Mar 6 14:02 unzipper_xsec.sc
-rwxrwxr-x 1 sergio pi_strow 807 Mar 6 13:46 mkdir_xsec.sc
-rwxrwxr-x 1 sergio pi_strow 1951 Mar 6 13:42 scper_fromHITRAN.sc
plus
-rw-rw-r-- 1 sergio pi_strow 5607 Mar 6 14:57 convert_xsec_multiplefiles2onefile.m
>>>>>
/home/sergio/SPECTRA/READ_XSEC :
-rw-r--r-- 1 sergio pi_strow 4311 Mar 2 11:39 read_xsec.m has to know about eg
/asl/data/hitran/H2012/IR-XSect/Uncompressed-files/
/asl/data/hitran/H2016/IR-XSect/Uncompressed-files/
/asl/data/hitran/H2020/IR-XSect/Uncompressed-files/
while these two
-rw-r--r-- 1 sergio pi_strow 5104 Mar 2 09:44 gid2mol.m
-rw-r--r-- 1 sergio pi_strow 3227 Mar 2 10:22 findxsec_plot.m
have been modified so that they take into acount HITRAN YEAR
[sergio@maya-usr1 MAKEIR_ALL_H16]$ pwd
/home/sergio/HITRAN2UMBCLBL/MAKEIR/H2016/MAKEIR_ALL_H16
[sergio@maya-usr1 MAKEIR_ALL_H16]$ grep -in findxsec *.m
loop_filelist_xsecN.m:52: woo = findxsec_plot_fast(wn,wn+dv,bands);
clust_runXtopts_mkxsecNvfiles.m:46: woo = findxsec_plot_fast(wn,wn+dv,bands);
xsec_done_already.m:32: woo = findxsec_plot_fast(wn,wn+dv,bands);
clust_runXtopts_savexsecN_file.m:73: [iYes,gf] = findxsec_plot(fmin,fmax,gasid,2016);
filelist_xsecN.m:41: [iYes,line] = findxsec_plot(wn-dwn,wn+dwn,gid,2016);
loop_filelist_xsecN_slow.m:50: [iYes,line] = findxsec_plot(wn-dwn,wn+dwn,gid,2016);
runXtopts_savexsecX.m:47: [iYes,gf] = findxsec_plot(fmin,fmax,gasid,2016);
/home/sergio/HITRAN2UMBCLBL/MAKEIR/H2016/MAKEIR_ALL_H16/clust_runXtopts_savexsecN_file.m
calls [iYes,gf] = findxsec_plot(fmin,fmax,gasid,2016);
and [d,w] = calc_xsec(gasid,fmin,fmax-dvv,dvv,tp,pL,figno,2016);
/home/sergio/HITRAN2UMBCLBL/MAKEIR/H2016/MAKEIR_ALL_H16/clust_runXtopts_mkxsecNvfiles.m
Note : in /home/sergio/HITRAN2UMBCLBL/MAKEIR/H2016/MAKEIR_ALL_H16
have to be careful about iSwitchXsecDataBase
originally I used the H12 xsec database so did nothing
then I downloaded H2016 for gases 51-63, so had to switch to H2012 for gases 64-81
now I downloaded H2016 for gases 51-81, so no need to switch to H2012
now I downloaded H2020 for gases 51-81, so no need to switch to H2012
grep -in iSwitchXsecDataBase *.m
[sergio@maya-usr1 MAKEIR_ALL_H16]$ grep -in iSwitchXsecDataBase *.m
clust_runXtopts_mkxsecNvfiles.m:42:iSwitchXsecDataBase = 0063; %% originally we had H2016 for g51-63 and H2012 for g64-81
clust_runXtopts_mkxsecNvfiles.m:43:iSwitchXsecDataBase = 9999; %% now we have H2016 for g51-81
clust_runXtopts_mkxsecNvfiles.m:43:iSwitchXsecDataBase = 9999; %% now we have H2020 for g51-81
clust_runXtopts_mkxsecNvfiles.m:44:if gid <= iSwitchXsecDataBase
clust_runXtopts_savexsecN_file.m:83: iSwitchXsecDataBase = 0063; %% originally we had H2016 for g51-63 and H2012 for g64-81
clust_runXtopts_savexsecN_file.m:84: iSwitchXsecDataBase = 9999; %% now we have H2016 for g51-81
clust_runXtopts_savexsecN_file.m:84: iSwitchXsecDataBase = 9999; %% now we have H2020 for g51-81
clust_runXtopts_savexsecN_file.m:85: if gasid <= iSwitchXsecDataBase
clust_runXtopts_savexsecN_file.m:114: if gasid <= iSwitchXsecDataBase
loop_filelist_xsecN.m:45: iSwitchXsecDataBase = 0063; %% originally we had H2016 for g51-63 and H2012 for g64-81
loop_filelist_xsecN.m:46: iSwitchXsecDataBase = 9999; %% now we have H2016 for g51-81
loop_filelist_xsecN.m:46: iSwitchXsecDataBase = 9999; %% now we have H2020 for g51-81
loop_filelist_xsecN.m:50: if gg <= iSwitchXsecDataBase
xsec_done_already.m:54:iSwitchXsecDataBase = 0063; %% originally we had H2016 for g51-63 and H2012 for g64-81
xsec_done_already.m:55:iSwitchXsecDataBase = 9999; %% now we have H2016 for g51-81
xsec_done_already.m:55:iSwitchXsecDataBase = 9999; %% now we have H2020 for g51-81
xsec_done_already.m:56:if gasid <= iSwitchXsecDataBase
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ls -lt /asl/data/hitran/H2008/Global_Data/Fortran\ programs\ for\ Partition\ Sums/
ls -lt /asl/data/hitran/H2008/Global_Data/
cd /asl/data/hitran/H2020/QTIPS
unzip QTpy.zip
unzip TIPS_2021_v1p0.zip
unzip BD_TIPS_2021_v1p0.zip
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Idotope Masses
See /asl/data/hitran/H2020/ISOTOPES/Readme
get the masses from
http://hitran.org/media/molparam.txt
which has been saved in /asl/data/hitran/H2020/ISOTOPES
then copy this into mass20.dat and edit it so it looks like mass16.dat
first 47 lines will have the number of isotopes
(so basically copy the first 47 lines of mass12.dat)
(but check to make sure you get the right number of isotopes_
then put in the masses as per molparam.txt
but first need to get rid of ^M in molparams.txt so either do
dos2unix molparams.txt
or /asl/data/hitran/get_rid_of_silly_DOS.sc
#!/bin/sh
cat $1 | tr -d '\r' > ~/.tmp_file.txt
mv ~/.tmp_file.txt $1
so
cp molparams.txt molparams0.txt
../../get_rid_of_silly_DOS.sc molparam.txt
then edit molparam.txt and save it as mass20_0.dat so that eg
>>>>>>>>>
Molecule # Iso Abundance Q(296K) gj Molar Mass(g)
H2O (1)
161 9.97317E-01 1.7458E+02 1 18.010565
181 1.99983E-03 1.7605E+02 1 20.014811
171 3.71884E-04 1.0521E+03 6 19.014780
162 3.10693E-04 8.6474E+02 6 19.016740
182 6.23003E-07 8.7557E+02 6 21.020985
172 1.15853E-07 5.2268E+03 36 20.020956
262 2.41970E-08 1.0278E+03 1 20.022915
CO2 (2)
626 9.84204E-01 2.8609E+02 1 43.989830
636 1.10574E-02 5.7664E+02 2 44.993185
628 3.94707E-03 6.0781E+02 1 45.994076
627 7.33989E-04 3.5426E+03 6 44.994045
638 4.43446E-05 1.2255E+03 2 46.997431
637 8.24623E-06 7.1413E+03 12 45.997400
828 3.95734E-06 3.2342E+02 1 47.998322
827 1.47180E-06 3.7666E+03 6 46.998291
727 1.36847E-07 1.0972E+04 1 45.998262
838 4.44600E-08 6.5224E+02 2 49.001675
837 1.65354E-08 7.5950E+03 12 48.001646
O3 (3)
666 9.92901E-01 3.4837E+03 1 47.984745
668 3.98194E-03 7.4657E+03 1 49.988991
>>>>>
becomes
%Molecule # Iso Abundance Q(296K) gj Molar Mass(g)
% H2O (1)
1 7 0 0 0
161 9.97317E-01 1.7458E+02 1 18.010565
181 1.99983E-03 1.7605E+02 1 20.014811
171 3.71884E-04 1.0521E+03 6 19.014780
162 3.10693E-04 8.6474E+02 6 19.016740
182 6.23003E-07 8.7557E+02 6 21.020985
172 1.15853E-07 5.2268E+03 36 20.020956
262 2.41970E-08 1.0278E+03 1 20.022915
% CO2 (2)
2 11 0 0 0
626 9.84204E-01 2.8609E+02 1 43.989830
636 1.10574E-02 5.7664E+02 2 44.993185
628 3.94707E-03 6.0781E+02 1 45.994076
627 7.33989E-04 3.5426E+03 6 44.994045
638 4.43446E-05 1.2255E+03 2 46.997431
637 8.24623E-06 7.1413E+03 12 45.997400
828 3.95734E-06 3.2342E+02 1 47.998322
827 1.47180E-06 3.7666E+03 6 46.998291
727 1.36847E-07 1.0972E+04 1 45.998262
838 4.44600E-08 6.5224E+02 2 49.001675
837 1.65354E-08 7.5950E+03 12 48.001646
% O3 (3)
3 5 0 0 0
666 9.92901E-01 3.4837E+03 1 47.984745
668 3.98194E-03 7.4657E+03 1 49.988991
etc
then run convert2mass20.m
cp /asl/data/hitran/H2020/ISOTOPES/mass20.dat /home/sergio/SPECTRA/mass20.dat
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TIPS2021 : ifort -o TIPS_2021_allisotopes.x -names uppercase -extend-source 132 -O3 TIPS_2021_allisotopes.f
mkdir /home/sergio/SPECTRA/Global_Data_HITRAN2020/
look at the detailed Readme there -- reproduced below
cp -a /asl/data/hitran/H2020/QTIPS/*.[fF]* .
cp -a /asl/data/hitran/H2020/QTIPS/*.CMN .
mv BD_ISO_2020.for BD_ISO_2020.FOR
mv BD_ISO_82_to_85.for BD_ISO_82_TO_85.FOR
edit BD_ISO_82_TO_85.FOR (the "returns" and "continues" are wierd!!!!)
cp ../Global_Data_HITRAN2012/TIPS_2012_allisotopes.f TIPS_2021_allisotopes.f
wherever you see 2012, replace with 2021
CALL TIPS_2021(iMol,rTemp,iI,iG*1.d0,rQT)
include 'TIPS_2021_try_include1.f' >>>>>>>>>>> which is basically TIPS_2021.FOR but turned into a subroutine, and edited as below
>>>>>>><<<<<<<
cp ../Global_Data_HITRAN2012/TIPS_2012_try_include1.f TIPS_2021_try_include1.f
basically keep the first few lines, change 2012 to 2021
and then
delete everything, physically
include TIPS_2021.FOR
make the main program into subroutine, see below
>>>>>>>>>>>>>>>>>>>>>>>>>>
C***********************
cs Program TIPS_2021
C***********************
C Program TIPS_2021 written by R.R. Gamache
C***********************
Subroutine TIPS_2021(
I MOL, ! HITRAN molecule number
I Temp, ! temperature in K
I NSO82, ! isotopomer index should really be eg 161 or 181 0r 171 for Water
O gi, ! state independent degeneracy factor
O QT) ! total internal partition sum
C***********************
then include and edit TIPS_2021.FOR
(1) these are new variables
INTEGER NT,I,IT
INTEGER MOL,NS082
DOUBLE PRECISION Temp,QT,gi
character*30 stopNgo
(2) these are redefined variabes
c COMMON/TEMPERATURES/TDAT(NT)
DOUBLE PRECISION tdat(NT)
COMMON/Temperatures/tdat
DOUBLE PRECISION tmax(NMOL,Max_ISO)
c DIMENSION TMAX(NMOL,MAX_ISO)
(3) edit out their input prompts
I have comments "cs" in columns 1-2, have demarcated them using
cs >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
cs >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
and set the isotope
cs CALL ISO_82_TO_85 (MOL,NSO82,ISO)
ISO = NSO82 !!! YAY NEED THIS since we are not using eg 161 171 but using 1 2 ....
(4) molecule 34 is a mess, the max temp was set at 10.0 and the gi,Q were set as 0. So edited this to become
c data Tmax(34,1)/10./ ! HO2
data Tmax(34,1)/1000./ ! HO2 SERGIO
and
IF(MOL.EQ.34) THEN
c...not applicable to O
c gi=0
c QT = 0.
c sergio
gi=1
QT = 1.
go to 100
ENDIF
(5) modify the output lines so that nothing is printed from TIPS_2021_try_include1.f, and the loop does not keep executing
100 if(QT .gt. 0.) then
cxsergio WRITE(*,900) MOLID(MOL), NSO82, TEMP, QT, GI
cxsergio 900 FORMAT(//,5X,A6,' MOLECULE',3X,I5,' ISOTOPOLOGUE',/,
cxsergio + 5X,'Q(',F7.1,' K) = ',1PE12.4,5X,'STATE INDEPENDENT FACTOR=',
cxsergio + 0PF7.1,////)
ELSE
print *,NSO82, Temp, QT, gi
WRITE(*,'(A23,A6)') ' NO DATA AVAILABLEFOR ',MOLID(MOL)
ENDIF
c go to 10
c 99 STOP 'Computation finished'
>>>>>>><<<<<<<
in BD_ISO_82_TO_85.FOR and BD_MOL_2020.FOR and BD_ISO_2020.for change all
Species_2020.cmn to Species_2020.cmn
Isotops.cmn to Isotops.cmn
MOLEC.cmn to MOLEC.CMN
plus declare variables
INTEGER NMOL,Max_ISO into SPECIES_2016.CMN
>>>>>>><<<<<<<
hitread.m has to be updated (since it does the symbolic links for h08,h12,h16 etc)
run8*.m have to be updated to default to H16 (basically run8.m and run8water.m)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[sergio@maya-usr1 SPECTRA]$ ls -lt *20*.m
------> requires home/sergio/SPECTRA/Global_Data_HITRAN2020/TIPS_2021_allisotopes.x <------
<<<<<<<<< MAKE SURE ngas == 55 ie agrees with wgatever is in mass20.dat >>>>>>>>>>
<<<<<<<<< MAKE SURE ngas == 55 ie agrees with wgatever is in mass20.dat >>>>>>>>>>
<<<<<<<<< MAKE SURE ngas == 55 ie agrees with wgatever is in mass20.dat >>>>>>>>>>
-rw-r--r-- 1 sergio pi_strow 2546 Nov 11 08:11 find_qnew_isotopes_H20.m
-rw-r--r-- 1 sergio pi_strow 4633 Nov 11 08:11 find_qnewABCD_H20.m
------> requires home/sergio/SPECTRA/Global_Data_HITRAN2020/TIPS_2021_allisotopes.x <------
-rw-r--r-- 1 sergio pi_strow 15773 Nov 11 08:10 qtips20.m ------>>> made by find_qnewABCD_H20.m <<<--------
were made by copying *12*.m and adjusting as needed 12 --> 20 in all the files
-rw-r--r-- 1 sergio pi_strow 4633 Nov 11 08:11 getq_oldVSnew.m