-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathinit_molecule_data.c
More file actions
40 lines (33 loc) · 936 Bytes
/
init_molecule_data.c
File metadata and controls
40 lines (33 loc) · 936 Bytes
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
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <./include/struct.h>
#include <./include/subroutines.h>
#include <./include/hitran.h>
MOLECULE * init_molecule_data (
MOLECULE *mol,
PARAMETERINFO *pars )
{
int iMol, NMOL;
int Speci,i;
const int iso[]={626,636,628,627, 66, 44, 6};
NMOL=sizeof(iso)/sizeof(int);
pars->NMOL=NMOL;
mol= (MOLECULE *) realloc(mol,(NMOL+1)*sizeof(MOLECULE));
for(iMol=0;iMol<NMOL;iMol++)
{
for (i=0;i<sizeof(mol_param)/sizeof(MOLPARAM);i++)
if( mol_param[i].name == iso[iMol])
{
Speci=i;
break;
}
mol[iMol].iso=iso[iMol];
mol[iMol].sqamass=sqrt(mol_param[Speci].amass);
mol[iMol].abund=mol_param[Speci].abund;
mol[iMol].hitnumber=mol_param[Speci].hitnumber;
}
return mol;
/* KL_comments: searching for molecules is ineffective
In final version one has to replace this filling by setting of precomputed structure */
}