Index: /trunk/tools/create_OBSnetcdf.py
===================================================================
--- /trunk/tools/create_OBSnetcdf.py	(revision 1949)
+++ /trunk/tools/create_OBSnetcdf.py	(revision 1950)
@@ -11,5 +11,5 @@
 
 # version
-version=1.1
+version=1.2
 
 # Filling values for floats, integer and string
@@ -1028,17 +1028,17 @@
     """ Function to add a variabe providing description of a units based on WMO code
       unitsn= name of the units (all WMO codes derived units must be labelled as
-        'codeWMO_[num]' associated to a file valled wmo_[num].code)
+        'wmo_code_[num]' associated to a file valled wmo_[num].code)
       onc= netCDF object file to add the description
       Lstrcode= length of description of codes
 
       wmo_[num].code must have the structure: ('#' for comments)
-        reference:web page, document reference with the code
-        short_description:main description of the code
-        long_description:long description of the code
-        codeTYPE:type of the code (andy of 'D', 'F', 'I', 'S')
-        @: Values line giving the start of the values
-        [val1]=[meaning of first value]
+        reference|web page, document reference with the code
+        short_description|main description of the code
+        long_description|long description of the code
+        codeTYPE|type of the code (andy of 'D', 'F', 'I', 'S')
+        @| Values line giving the start of the values
+        [val1]|[meaning of first value]
         (...)
-        [valN]=[meaning of last value]
+        [valN]|[meaning of last value]
     """
     fname = 'WMOcodevar'
@@ -1047,5 +1047,5 @@
     folder = os.path.dirname(os.path.realpath(__file__))
 
-    code = unitsn.split('_')[1]
+    code = unitsn.split('_')[2]
 
     infile = folder + '/wmo_' + code +'.code'
@@ -1056,6 +1056,6 @@
         return
     # main expected values
-    descvals = ['reference', 'short_description', 'long_description', 'codeTYPE',    \
-      '@']
+    descvals = ['wmo_code', 'reference', 'short_description', 'long_description',    \
+      'codeTYPE', '@']
 
     availcodetype = ['D', 'F', 'I', 'S']
@@ -1069,15 +1069,13 @@
         if len(line) > 1 and line[0:1] != '#':
             linev = line.replace('\n','').replace('\t','    ').replace('\r','')
-            print inivals, '<>', linev
             if not inivals:
-                Sv = linev.split(':')[0]
-                Vv = linev.split(':')[1]
+                Sv = linev.split('|')[0]
+                Vv = linev.split('|')[1]
                 if searchInlist(descvals, Sv): 
                     if Sv != '@': codevalues[Sv] = Vv
                     else: inivals = True
             else:
-                Svv = linev.split('=')[0]
-                Vvv = linev.split('=')[1]
-                print 'Lluis Sv:', Svv, 'Vv:', Vvv
+                Svv = linev.split('|')[0]
+                Vvv = linev.split('|')[1]
                 codvals.append(Svv)
                 codmeanings.append(Vvv)
@@ -1088,5 +1086,4 @@
           " code descriptions"
         newdim = onc.createDimension('Lstringcode', Lstrcode)
-    print 'Lluis Svv:', Svv
     Ncodes = len(codvals)
     codedimn = 'wmo_code_' + str(code)
@@ -1123,6 +1120,7 @@
     # Variable with the meaning of the code
     if not onc.variables.has_key(codedimn+'_meaning'):
+        print '  '+fname+": Adding '" + codedimn + "_meaning' variable for code " +  \
+          "description"
         newvar = onc.createVariable(codedimn+'_meaning','c',(codedimn,'Lstringcode'))
-        print 'Lluis len Vc:', len(Vvv), 'Ncodes:', Ncodes
         writing_str_nc(newvar, codmeanings, Lstrcode)
         newvar.setncattr('description', 'meaning of WMO code ' + str(code))
@@ -1339,5 +1337,5 @@
     # Getting new variables to describe certain units as codeWMO_[num] from an 
     #   external file
-    if description['varU'][ivar][0:7] == 'codeWMO':
+    if description['varU'][ivar][0:8] == 'wmo_code':
         WMOcodevar(description['varU'][ivar], objfile)
 
@@ -1417,11 +1415,11 @@
 
 set_attribute(objfile,'author_nc','Lluis Fita')
-set_attribute(objfile,'institution_nc','Laboratoire de Meteorology Dynamique, ' +    \
-  'LMD-Jussieu, UPMC, Paris')
-set_attribute(objfile,'country_nc','France')
+set_attribute(objfile,'institution_nc','Centro de Investigaciones del Mar y la ' +   \
+  'Atmosfera (CIMA), CONICET-UBA, CNRS UMI-IFAECI, C.A. Buenos Aires')
+set_attribute(objfile,'country_nc','Argentina')
 set_attribute(objfile,'script_nc','create_OBSnetcdf.py')
 set_attribute(objfile,'version_script',version)
 set_attribute(objfile,'information',                                                 \
-  'http://www.lmd.jussieu.fr/~lflmd/ASCIIobs_nc/index.html')
+  'http://www.lluÃ­sfb.cat/python/PyNCplot/')
 
 objfile.sync()
Index: /trunk/tools/wmo_0509.code
===================================================================
--- /trunk/tools/wmo_0509.code	(revision 1949)
+++ /trunk/tools/wmo_0509.code	(revision 1950)
@@ -1,17 +1,17 @@
-reference:http://artefacts.ceda.ac.uk/badc_datadocs/surface/code.html
-short_description:High cloud type
-WMOcode:0509
-long_description:Clouds of genera Cirrus, Cirrocumulus and Cirrostratus.           
-codeTYPE:S
-@: Values
-/=cirrus, cirrocumulus & cirrostratus invisible owing to darkness, fog, blowing dust or sand, or other phenomena, or more often because of the presence of a continuous layer of lower clouds
-0=no cirrus, cirrocumulus or cirrostratus clouds
-1=cirrus in the form of filaments, strands or hooks, not progressively invading the sky.
-2=dense cirrus, in patches or entangled sheaves, which usually do not increase & sometimes seem to be the remains of the upper part of a cumulonimbus; or cirrus with sproutings in the form of small turrets; or cirrus having the appearance of cumuliform tufts
-3=dense cirrus, often in the form of an anvil, being the remains of the upper part of cumulonimbus
-4=cirrus in the form of hooks, filaments, or both, progressively invading the sky; they generally become denser as a whole.
-5=cirrus (often in bands converging towards 1 point or 2 opposite points of the horizon) and cirrostratus, or cirrostratus alone;in either case, they are progressively invading the sky, and generally growing denser as a whole, but the continuous veil does not reach 45 degrees above the horizon.
-6=cirrus (often in bands converging towards 1 point or 2 opposite points of the horizon) and cirrostratus, or cirrostratus alone;in either case, they are progressively invading the sky, and generally growing denser as a whole; the continuous veil extends more than 45 degrees above the horizon, without the sky being totally covered.
-7=veil of cirrostratus covering the celestial dome
-8=cirrostratus not progressively invading the sky and not completely covering the celestial dome.
-9=cirrocumulus alone, or cirrocumulus accompanied by cirrus or cirrostratus, or both, but cirrocumulus is predominant
+reference|http://artefacts.ceda.ac.uk/badc_datadocs/surface/code.html
+short_description|High cloud type
+wmo_code|0509
+long_description|Clouds of genera Cirrus, Cirrocumulus and Cirrostratus.           
+codeTYPE|S
+@| Values
+/|cirrus, cirrocumulus & cirrostratus invisible owing to darkness, fog, blowing dust or sand, or other phenomena, or more often because of the presence of a continuous layer of lower clouds
+0|no cirrus, cirrocumulus or cirrostratus clouds
+1|cirrus in the form of filaments, strands or hooks, not progressively invading the sky.
+2|dense cirrus, in patches or entangled sheaves, which usually do not increase & sometimes seem to be the remains of the upper part of a cumulonimbus; or cirrus with sproutings in the form of small turrets; or cirrus having the appearance of cumuliform tufts
+3|dense cirrus, often in the form of an anvil, being the remains of the upper part of cumulonimbus
+4|cirrus in the form of hooks, filaments, or both, progressively invading the sky; they generally become denser as a whole.
+5|cirrus (often in bands converging towards 1 point or 2 opposite points of the horizon) and cirrostratus, or cirrostratus alone;in either case, they are progressively invading the sky, and generally growing denser as a whole, but the continuous veil does not reach 45 degrees above the horizon.
+6|cirrus (often in bands converging towards 1 point or 2 opposite points of the horizon) and cirrostratus, or cirrostratus alone;in either case, they are progressively invading the sky, and generally growing denser as a whole; the continuous veil extends more than 45 degrees above the horizon, without the sky being totally covered.
+7|veil of cirrostratus covering the celestial dome
+8|cirrostratus not progressively invading the sky and not completely covering the celestial dome.
+9|cirrocumulus alone, or cirrocumulus accompanied by cirrus or cirrostratus, or both, but cirrocumulus is predominant
