equal
deleted
inserted
replaced
|
1 #====================================================================== |
|
2 # . I S O P Y C N A L _ T S . G A M M A _ N |
|
3 # doc: Tue Dec 13 21:50:18 2005 |
|
4 # dlm: Mon Dec 19 13:04:15 2005 |
|
5 # (c) 2005 A.M. Thurnherr |
|
6 # uE-Info: 27 30 NIL 0 0 72 0 2 4 NIL ofnI |
|
7 #====================================================================== |
|
8 |
|
9 # HISTORY: |
|
10 # Dec 14, 2005: - created |
|
11 # Dec 19, 2005: - finalized |
|
12 |
|
13 # NOTES: |
|
14 # - requires %lat/%lon PARAMs |
|
15 |
|
16 require "$ANTS/libgamma.pl"; # load equation of state |
|
17 |
|
18 unless (defined($P{ITS})) { |
|
19 &antsInfo("using default %ITS=90"); |
|
20 &antsAddParams(ITS,90); |
|
21 } |
|
22 $gamma::temp_scale = $P{ITS}; |
|
23 |
|
24 croak("$0: need %lat/%lon\n") |
|
25 unless defined($P{lat}) && defined($P{lon}); |
|
26 croak("$0: need %press\n") |
|
27 unless defined($P{press}); |
|
28 |
|
29 sub density($$) |
|
30 { |
|
31 my($S,$T) = @_; |
|
32 my($gamma) = gamma::gamma_n($S,$T,$P{press},$P{lat},$P{lon}); |
|
33 return $gamma > 0 ? $gamma : undef; |
|
34 } |
|
35 |
|
36 1; |