Index: trunk/tools/create_stations-list_simulations.py
===================================================================
--- trunk/tools/create_stations-list_simulations.py	(revision 353)
+++ trunk/tools/create_stations-list_simulations.py	(revision 354)
@@ -4,4 +4,5 @@
 #  for LMDZ: pointlocations.txt
 ## e.g. # create_stations-list_simulations.py -a -2,1.3,37.5,40.0:3,6.7,41.7,45.4 -m WRF -n 0.30 -s AEMET_sfcst.dat,sfcstations.dat,MeteoFrance_sfcst.dat -z lidarstations.dat,dropsondes.dat,soundingsstations.dat
+## e.g. # create_stations-list_simulations.py -a -2,1.3,37.5,40.0:3,6.7,41.7,45.4 -m LMDZ -n 0.30 -s AEMET_sfcst.dat,sfcstations.dat,MeteoFrance_sfcst.dat -z lidarstations.dat,dropsondes.dat,soundingsstations.dat
 import numpy as np
 import os
@@ -93,4 +94,6 @@
     obsstn = []
     posst = []
+
+    print fname + 'model:',model
 
     for filen in fobs:
@@ -114,8 +117,8 @@
                                 str(iobs).zfill(4) + ' ' + '{0:7.5g}'.format(stlat) +\
                                 '  ' + '{0:6.4g}'.format(stlon) + '\n')
-                          else:
-                              oout.write('{0:24s}'.format(stname) + '  h' +          \
-                                str(iobs).zfill(3) + '   '+ '{0:6.4g}'.format(stlon) +  \
-                                '  ' + '{0:7.5g}'.format(stlat) + '\n')
+                          elif model == 'LMDZ':
+                              oout.write('{0:5g}, '.format(iobs) +                   \
+                                '{0:7.4g}, '.format(stlon) +                         \
+                                '{0:7.4g}, '.format(stlat) + "'" + stname + "'\n")
 
                           obsstn.append(vals[0])
@@ -195,4 +198,12 @@
             quit(-1)
 
+if opts.mindist is None:
+    print warnmsg
+    print '  ' + main + ': no minimal distance is provided!!'
+    print '    asuming mindist=0.'
+    mindist = 0.
+else:
+    mindist = np.float(opts.mindist)
+
 if opts.model is None:
     print errormsg
@@ -212,32 +223,33 @@
             oscff.close()
 
-    elif opts.model == 'LMDZ':
-        sfilename = 'pointlocations.txt'
-        hfilename = 'pointlocations.txt'
-
-if opts.mindist is None:
-    print warnmsg
-    print '  ' + main + ': no minimal distance is provided!!'
-    print '    asuming mindist=0.'
-    mindist = 0.
-else:
-    mindist = np.float(opts.mindist)
-
 # Height observations
 ##
-objout = open(hfilename, 'a')
-#print main + ": creation of height observational file '" + hfilename + "' ..."
-hstations = writting_stations(objout, hobs, areas, opts.model, mindist)
-print main + "' succesfull written of height location observations '" + hfilename +  \
-  "' !!"
-objout.close()
+        objout = open(hfilename, 'a')
+#        print main + ": creation of height observational file '" + hfilename + "' ..."
+        hstations = writting_stations(objout, hobs, areas, opts.model, mindist)
+        print main + "' succesfull written of height location observations '" +      \
+          hfilename + "' !!"
+        objout.close()
 
 # surface observations
 ##
-objout = open(sfilename, 'a')
-#print main + ": creation of surface observational file '" + sfilename + "' ..."
-sstations = writting_stations(objout, sobs, areas, opts.model, mindist)
-print main + "' succesfull written of height location observations '" + sfilename +  \
-  "' !!"
-objout.close()
-quit()
+        objout = open(sfilename, 'a')
+        sstations = writting_stations(objout, sobs, areas, opts.model, mindist)
+        print main + "' succesfull written of surface location observations '" +     \
+          sfilename + "' !!"
+        objout.close()
+
+    elif opts.model == 'LMDZ':
+# Only one file as output
+        shfilename = 'pointlocations.txt'
+        shobs = hobs + sobs
+
+        objout = open(shfilename, 'w')
+        sstations = writting_stations(objout, shobs, areas, opts.model, mindist)
+        print main + "' succesfull written of location observations '" +             \
+          shfilename + "' !!"
+        objout.close()
+    else:
+        print errormsg
+        print '  ' + main + ": model '" + opts.model + "' not ready !!"
+        quit(-1) 
