; given molecule and isotope (HTRAN numbering), return the molecular weight ; For right now, specific to CO CSHELL project function molec_weight, mol, iso ;+ ; NAME: ; molec_weight ; PURPOSE: (one line) ; Return the molecular weight, given the molecule and isotope index used by HITRAN ; DESCRIPTION: ; ; CATEGORY: ; Spectra ; CALLING SEQUENCE: ; w = molec_weight(mol, iso) ; INPUTS: ; mol - molecule index (e.g., 1 for H2O) ; iso - isotope index (e.g., 1 for 1H 16O 1H) ; OPTIONAL INPUT PARAMETERS: ; none ; KEYWORD INPUT PARAMETERS: ; none ; KEYWORD OUTPUT PARAMETERS: ; none ; OUTPUTS: ; atomic weight (g/mole, e.g., 18. for molec_weight(1,1) ) ; COMMON BLOCKS: ; None ; SIDE EFFECTS: ; RESTRICTIONS: ; None ; PROCEDURE: ; MODIFICATION HISTORY: ; Written 2000 October, by Leslie Young, SwRI ;- H = 1 C = 6 N = 7 O = 8 F = 9 P = 15 S = 16 Cl = 17 Br = 35 I = 53 case mol of ; H2O 4 161 181 171 162 1: case iso of 1: return, atomic_weight(H,1) + atomic_weight(O,16) + atomic_weight(H,1) 2: return, atomic_weight(H,1) + atomic_weight(O,18) + atomic_weight(H,1) 3: return, atomic_weight(H,1) + atomic_weight(O,17) + atomic_weight(H,1) 4: return, atomic_weight(H,1) + atomic_weight(O,16) + atomic_weight(H,2) endcase ; CO2 8 626 636 628 627 638 637 828 728 2: case iso of 1: return, atomic_weight(O,16) + atomic_weight(C,12) + atomic_weight(O,16) 2: return, atomic_weight(O,16) + atomic_weight(C,13) + atomic_weight(O,16) 3: return, atomic_weight(O,16) + atomic_weight(C,12) + atomic_weight(O,18) 4: return, atomic_weight(O,16) + atomic_weight(C,12) + atomic_weight(O,17) 5: return, atomic_weight(O,16) + atomic_weight(C,13) + atomic_weight(O,18) 6: return, atomic_weight(O,16) + atomic_weight(C,14) + atomic_weight(O,17) 7: return, atomic_weight(O,18) + atomic_weight(C,12) + atomic_weight(O,18) 8: return, atomic_weight(O,17) + atomic_weight(C,12) + atomic_weight(O,18) endcase ; O3 5 666 668 686 667 676 3: case iso of 1: return, atomic_weight(O,16) + atomic_weight(O,16) + atomic_weight(O,16) 2: return, atomic_weight(O,16) + atomic_weight(O,16) + atomic_weight(O,18) 3: return, atomic_weight(O,16) + atomic_weight(O,18) + atomic_weight(O,16) 4: return, atomic_weight(O,16) + atomic_weight(O,16) + atomic_weight(O,17) 5: return, atomic_weight(O,16) + atomic_weight(O,17) + atomic_weight(O,16) endcase ; N2O 5 446 456 546 448 447 4: case iso of 1: return, atomic_weight(N,14) + atomic_weight(N,14) + atomic_weight(O,16) 2: return, atomic_weight(N,14) + atomic_weight(N,15) + atomic_weight(O,16) 3: return, atomic_weight(N,15) + atomic_weight(N,14) + atomic_weight(O,16) 4: return, atomic_weight(N,14) + atomic_weight(N,14) + atomic_weight(O,18) 5: return, atomic_weight(N,14) + atomic_weight(N,14) + atomic_weight(O,17) endcase ; CO 6 26 36 28 27 38 37 5: case iso of 1: return, atomic_weight(C,12) + atomic_weight(O,16) 2: return, atomic_weight(C,13) + atomic_weight(O,16) 3: return, atomic_weight(C,12) + atomic_weight(O,18) 4: return, atomic_weight(C,12) + atomic_weight(O,17) 5: return, atomic_weight(C,13) + atomic_weight(O,18) 6: return, atomic_weight(C,13) + atomic_weight(O,17) endcase ; CH4 3 211 311 212 6: case iso of 1: return, atomic_weight(C,12) + 4*atomic_weight(H,1) 2: return, atomic_weight(C,13) + 4*atomic_weight(H,1) 3: return, atomic_weight(C,12) + 3*atomic_weight(H,1) + atomic_weight(H,2) endcase ; O2 3 66 68 67 7: case iso of 1: return, atomic_weight(O,16) + atomic_weight(O,16) 2: return, atomic_weight(O,16) + atomic_weight(O,18) 3: return, atomic_weight(O,16) + atomic_weight(O,17) endcase ; NO 3 46 56 48 8: case iso of 1: return, atomic_weight(N,14) + atomic_weight(O,16) 2: return, atomic_weight(N,15) + atomic_weight(O,16) 3: return, atomic_weight(N,14) + atomic_weight(O,18) endcase ; SO2 2 626 646 9: case iso of 1: return, atomic_weight(O,16) + atomic_weight(S,32) + atomic_weight(O,16) 2: return, atomic_weight(O,16) + atomic_weight(S,34) + atomic_weight(O,16) endcase ; NO2 1 646 10: case iso of 1: return, atomic_weight(O,16) + atomic_weight(N,14) + atomic_weight(O,16) endcase ; NH3 2 4111 5111 11: case iso of 1: return, atomic_weight(N,14) + 3*atomic_weight(H,1) 2: return, atomic_weight(N,15) + 3*atomic_weight(H,1) endcase ; HNO3 1 146 12: case iso of 1: return, atomic_weight(H,1) + atomic_weight(N,14) + 3*atomic_weight(O,16) endcase ; OH 3 61 81 62 13: case iso of 1: return, atomic_weight(O,16) + atomic_weight(H,1) 2: return, atomic_weight(O,18) + atomic_weight(H,1) 3: return, atomic_weight(O,16) + atomic_weight(H,2) endcase ; HF 1 19 14: case iso of 1: return, atomic_weight(H,1) + atomic_weight(F,19) endcase ; HCl 2 15 17 15: case iso of 1: return, atomic_weight(H,1) + atomic_weight(Cl,35) 2: return, atomic_weight(H,1) + atomic_weight(Cl,37) endcase ; HBr 2 19 11 16: case iso of 1: return, atomic_weight(H,1) + atomic_weight(Br,79) 2: return, atomic_weight(H,1) + atomic_weight(Br,81) endcase ; HI 1 17 17: case iso of 1: return, atomic_weight(H,1) + atomic_weight(I, 127) endcase ; ClO 2 56 76 18: case iso of 1: return, atomic_weight(Cl,35) + atomic_weight(O,16) 2: return, atomic_weight(Cl,37) + atomic_weight(O,16) endcase ; OCS 4 622 624 632 822 19: case iso of 1: return, atomic_weight(O,16) + atomic_weight(C,12) + atomic_weight(S,32) 2: return, atomic_weight(O,16) + atomic_weight(C,12) + atomic_weight(S,34) 3: return, atomic_weight(O,16) + atomic_weight(C,13) + atomic_weight(S,32) 4: return, atomic_weight(O,18) + atomic_weight(C,12) + atomic_weight(S,32) endcase ; H2CO 3 126 136 128 20: case iso of 1: return, 2*atomic_weight(H,1) + atomic_weight(C,12) + atomic_weight(O,16) 2: return, 2*atomic_weight(H,1) + atomic_weight(C,13) + atomic_weight(O,16) 3: return, 2*atomic_weight(H,1) + atomic_weight(C,12) + atomic_weight(O,18) endcase ; HOCl 2 165 167 21: case iso of 1: return, atomic_weight(H,1) + atomic_weight(O,16) + atomic_weight(Cl,35) 2: return, atomic_weight(H,1) + atomic_weight(O,16) + atomic_weight(Cl,37) endcase ; N2 1 44 22: case iso of 1: return, 2*atomic_weight(N,14) endcase ; HCN 3 124 134 125 23: case iso of 1: return, atomic_weight(H,1) + atomic_weight(C,12) + atomic_weight(N,14) 2: return, atomic_weight(H,1) + atomic_weight(C,13) + atomic_weight(N,14) 3: return, atomic_weight(H,1) + atomic_weight(C,12) + atomic_weight(N,15) endcase ; CH3Cl 2 215 217 24: case iso of 1: return, atomic_weight(C,12) + 3*atomic_weight(H,1) + atomic_weight(Cl,35) 2: return, atomic_weight(C,12) + 3*atomic_weight(H,1) + atomic_weight(Cl,37) endcase ; H2O2 1 1661 25: case iso of 1: return, 2*(atomic_weight(H,1) + atomic_weight(O,16)) endcase ; C2H2 2 1221 1231 26: case iso of 1: return, 2*atomic_weight(H,1) + 2*atomic_weight(C,12) 2: return, 2*atomic_weight(H,1) + atomic_weight(C,12) + atomic_weight(C,13) endcase ; C2H6 1 1221 27: case iso of 1: return, 6*atomic_weight(H,1) + 2*atomic_weight(C,12) endcase ; PH3 1 1111 28: case iso of 1: return, 3*atomic_weight(H,1) + 2*atomic_weight(P,31) endcase ; COF2 1 269 29: case iso of 1: return, atomic_weight(C,12) + atomic_weight(O,6) + 2 * atomic_weight(F,19) endcase ; SF6 1 29 30: case iso of 1: return, atomic_weight(S,32) + 6 * atomic_weight(F,19) endcase ; H2S 3 121 141 131 31: case iso of 1: return, atomic_weight(S,32) + 2 * atomic_weight(H,1) 2: return, atomic_weight(S,34) + 2 * atomic_weight(H,1) 3: return, atomic_weight(S,33) + 2 * atomic_weight(H,1) endcase ; HCOOH 1 126 32: case iso of 1: return, 2 * atomic_weight(H,1) + atomic_weight(C,12) + 2 * atomic_weight(O,16) endcase ; HO2 1 166 33: case iso of 1: return, atomic_weight(H,1) + 2 * atomic_weight(O,16) endcase ; O 1 6 34: case iso of 1: return, atomic_weight(O,16) endcase ; ClONO2 2 5646 7646, 35: case iso of 1: return, atomic_weight(Cl,35) + 3*atomic_weight(O,16) + atomic_weight(N,14) 2: return, atomic_weight(Cl,37) + 3*atomic_weight(O,16) + atomic_weight(N,14) endcase ; NO+ 1 46 36: case iso of 1: return, atomic_weight(N,14) + atomic_weight(O,16) endcase endcase end