Re: Trouble with -inf to +inf value of baroclinicity

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Nov 18 2010 - 21:36:28 MST

You have some information(eg, max an min values) .... use it.

Substitute the min and max values into your equation ...
One of these is bad!!!!

ncl 0> q = (0.31*10^(-4)*(-0.129377))
ncl 1> print(q)
ncl 2> q = (0.31*10^(-4)*(0.142818))
ncl 3> print(q)
ncl 4> r =(((9.81/225.71)*(-0.00607291))^0.5)^(-1)
ncl 5> print(r)
ncl 6> R = (((9.81/225.71)*(1335.75))^0.5)^(-1)
ncl 7> print(R)

This is what you need to do to debug code.

On 11/18/10 6:42 PM, sbasu@iarc.uaf.edu wrote:
> Hello,
>
> Can anybody please help me to solve why I am getting -inf to +inf value of
> sigma. where,
> sigma = (0.31*10^(-4)*dudz)*(((9.81/pt)*dtdz)^0.5)^(-1)
> printVarSummary of each of the factors used in the formula are as follows:
>
>
> Variable: pt
> Type: float
> Total Size: 422576128 bytes
> 105644032 values
> Number of Dimensions: 4
> Dimensions and sizes: [time | 124] x [lev | 26] x [lat | 128] x [lon | 256]
> Coordinates:
> time: [30.25.. 61]
> lev: [3.54463800000001..992.5560999999998]
> lat: [-88.92773535229591..88.92773535229591]
> lon: [ 0..358.59375]
> Number Of Attributes: 2
> units : K
> long_name : Potential Temperature
> (0)
> (0) Potential Temperature: min=225.71 max=1335.75
>
>
> Variable: dtdz
> Type: float
> Total Size: 422576128 bytes
> 105644032 values
> Number of Dimensions: 4
> Dimensions and sizes: [time | 124] x [lev | 26] x [lat | 128] x [lon | 256]
> Coordinates:
> time: [30.25.. 61]
> lev: [3.54463800000001..992.5560999999998]
> lat: [-88.92773535229591..88.92773535229591]
> lon: [ 0..358.59375]
> Number Of Attributes: 2
> units : K/m
> long_name : Vertical Gradient Temperature with height
> (0)
> (0) Vertical Gradient Temperature with height: min=-0.00607291 max=0.126276
> (0)
> (0) Vertical Gradient U: min=-0.129377 max=0.142818
>
>
> Variable: dudz
> Type: float
> Total Size: 422576128 bytes
> 105644032 values
> Number of Dimensions: 4
> Dimensions and sizes: [time | 124] x [lev | 26] x [lat | 128] x [lon | 256]
> Coordinates:
> time: [30.25.. 61]
> lev: [3.54463800000001..992.5560999999998]
> lat: [-88.92773535229591..88.92773535229591]
> lon: [ 0..358.59375]
> Number Of Attributes: 2
> units : m/s/m
> long_name : Vertical Gradient U with height
> (0) Vertical Gradient U with height: min=-0.0589294 max=0.0540201
>
> Variable: sigma
> Type: float
> Total Size: 422576128 bytes
> 105644032 values
> Number of Dimensions: 4
> Dimensions and sizes: [time | 124] x [lev | 26] x [lat | 128] x [lon | 256]
> Coordinates:
> time: [30.25.. 61]
> lev: [3.54463800000001..992.5560999999998]
> lat: [-88.92773535229591..88.92773535229591]
> lon: [ 0..358.59375]
> (0)
> (0) min=-inf max=inf
>
>
> Thanks,
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Nov 18 21:36:32 2010

This archive was generated by hypermail 2.1.8 : Fri Nov 19 2010 - 11:51:06 MST