Assigning value to logical variable.

From: gibies george <gibies_at_nyahnyahspammersnyahnyah>
Date: Sat Feb 26 2011 - 01:16:49 MST

Some part of my ncl script is as follows
***********************************************

print("Defineing full = new(1,logical)")
full = new(1,logical)
print(full)
if (norecs1yr .eq. 1)
  print("case 1 : full = True")
  full = True
print(""+full)
else
  if (dimsizes(season) .eq. 1)
   if (season(0) .eq. "all")
     print("case 2 : full = True")
     full = True
print(""+full)
   else
* ** print("case 3 : full = False")*
* ** full = False **;;; Here is the key
problem*
* **print(""+full)** *
   end if
  else
   print("case 4 : full = False ")
   full = False
print(""+full)
  end if
end if
print(""+full)
lat = data&lat
lon = data&lon
print(full)
print(.not.full)

********************************
And the output is
********************************

(0) Defineing full = new(1,logical)

Variable: full
Type: logical
Total Size: 4 bytes
            1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
Number Of Attributes: 1
  _FillValue : Missing
*(0)** **Missing*
*(0)** **case 3 : full = False*
*(0)** **True*
(0) True

Variable: full
Type: logical
Total Size: 4 bytes
            1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
Number Of Attributes: 1
  _FillValue : Missing
(0) True
(0) False

***********************************
Can anybody tell the reason ?

-- 
*Gibies George,   CSIR-RF,
Climate and Global Modelling Division,
Indian Institute of Tropical Meteorology,
Dr. Homi Bhabha Road,
NCL (P. O.), Pashan,
Pune 411008, India.*
*http://sites.google.com/site/gibiesge/*
Think about the environment. Save paper; Save Trees. Please don't print this
e-mail unless it is necessary.

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Feb 26 01:16:55 2011

This archive was generated by hypermail 2.1.8 : Wed Mar 02 2011 - 09:18:13 MST