.xycontour.sigma0
changeset 39 56bdfe65a697
equal deleted inserted replaced
38:15c603bc4f70 39:56bdfe65a697
       
     1 #======================================================================
       
     2 #                    . I S O P L E T H . S I G M A 0 
       
     3 #                    doc: Tue Dec 13 21:50:18 2005
       
     4 #                    dlm: Wed Dec 14 09:40:50 2005
       
     5 #                    (c) 2005 A.M. Thurnherr
       
     6 #                    uE-Info: 44 43 NIL 0 0 72 2 2 4 NIL ofnI
       
     7 #======================================================================
       
     8 
       
     9 # HISTORY:
       
    10 #	Dec 14, 2005: - created
       
    11 
       
    12 # NOTES:
       
    13 #	- assumes T/S fields to be called 'temp' and 'salin'
       
    14 
       
    15 require "$ANTS/libEOS83.pl";				# load equation of state
       
    16 
       
    17 unless (defined($P{ITS})) {
       
    18 	&antsInfo("using default %ITS=90");
       
    19 	&antsAddParams(ITS,90);
       
    20 }
       
    21 
       
    22 sub yfield_isopleth($)						# return y-field based on x-field
       
    23 {
       
    24 	my($xf) = @_;
       
    25 	return $xf eq 'salin' ? 'temp' : 'salin';
       
    26 }
       
    27 
       
    28 sub bracket_isopleth($$$$)					# heuristically bracket y field
       
    29 {
       
    30 	my($xf,$xv,$iv,$prev_y) = @_;
       
    31 
       
    32 	if ($xf eq 'salin') {
       
    33 		return (-10,30);
       
    34 	} else {
       
    35 		return (34,37);
       
    36 	}
       
    37 }
       
    38 
       
    39 sub eval_isopleth($$$)						# evaluate function for isopleth
       
    40 {
       
    41 	my($xf,$x,$y) = @_;
       
    42 
       
    43 	return $xf eq 'salin' ? sigma($x,$y,0,0)
       
    44 						  : sigma($y,$x,0,0)
       
    45 }
       
    46 
       
    47 1;