Index: /trunk/MESOSCALE/PLOT/PYTHON/mylib/api_g95.sh
===================================================================
--- /trunk/MESOSCALE/PLOT/PYTHON/mylib/api_g95.sh	(revision 194)
+++ /trunk/MESOSCALE/PLOT/PYTHON/mylib/api_g95.sh	(revision 195)
@@ -9,3 +9,3 @@
 \rm loge
 f2py -c -m api ../../../LMD_MM_MARS/SRC/POSTPROC/api.F90 --fcompiler=g95 -L$NETCDF/lib -lnetcdf -lm -I$NETCDF/include --f90flags="-Wall -Wno=112,141,137,155 -fno-second-underscore -ffree-form" > logc 2> loge
-f2py -c -m timestuff time.F --fcompiler=g95
+f2py -c -m timestuff time.F --fcompiler=g95 >> logc 2>> loge
Index: /trunk/MESOSCALE/PLOT/PYTHON/mylib/api_pgf90.sh
===================================================================
--- /trunk/MESOSCALE/PLOT/PYTHON/mylib/api_pgf90.sh	(revision 194)
+++ /trunk/MESOSCALE/PLOT/PYTHON/mylib/api_pgf90.sh	(revision 195)
@@ -13,3 +13,3 @@
 \rm loge
 f2py -c -m api ../../../LMD_MM_MARS/SRC/POSTPROC/api.F90 --fcompiler=pg -L$NETCDF/lib -lnetcdf -lm -I$NETCDF/include --f90flags="-Mfree" > logc 2> loge
-f2py -c -m timestuff time.F --fcompiler=pg
+f2py -c -m timestuff time.F --fcompiler=pg >> logc 2>> loge
Index: /trunk/MESOSCALE/PLOT/PYTHON/mylib/myplot.py
===================================================================
--- /trunk/MESOSCALE/PLOT/PYTHON/mylib/myplot.py	(revision 194)
+++ /trunk/MESOSCALE/PLOT/PYTHON/mylib/myplot.py	(revision 195)
@@ -39,4 +39,19 @@
 #    return
 
+def getlschar ( namefile ):
+    #### strangely enough this does not work for api or ncrcat results!
+    from netCDF4 import Dataset
+    from timestuff import sol2ls
+    nc  = Dataset(namefile)
+    if 'Times' in nc.variables:
+        zetime = nc.variables['Times'][0]
+        zetimestart = getattr(nc, 'START_DATE')
+        zeday = int(zetime[8]+zetime[9]) - int(zetimestart[8]+zetimestart[9])
+        if zeday < 0:    lschar=""  ## might have crossed a month... fix soon
+        else:            lschar="_Ls"+str( int( sol2ls ( getattr( nc, 'JULDAY' ) + zeday ) ) )
+    else:
+        lschar=""
+    return lschar
+
 def api_onelevel (  path_to_input   = None, \
                     input_name      = 'wrfout_d0?_????-??-??_??:00:00', \
Index: /trunk/MESOSCALE/PLOT/PYTHON/scripts/winds.py
===================================================================
--- /trunk/MESOSCALE/PLOT/PYTHON/scripts/winds.py	(revision 194)
+++ /trunk/MESOSCALE/PLOT/PYTHON/scripts/winds.py	(revision 195)
@@ -17,5 +17,6 @@
            var=None,\
            colorb=None,\
-           winds=True):
+           winds=True,\
+           addchar=None):
 
     ####################################################################################################################
@@ -29,5 +30,4 @@
     from matplotlib.pyplot import contourf, subplot, figure, rcParams, savefig, colorbar
     from matplotlib.cm import get_cmap
-    from timestuff import sol2ls
     import numpy as np
 
@@ -75,16 +75,15 @@
     else:                    [wlon,wlat] = simplinterv(lon2d,lat2d)
 
-    #########################
-    ### Get local time and Ls
+    ##################
+    ### Get local time
     if typefile in ['mesoapi','meso']:  
         ltst = int(getattr(nc, 'GMT') + 0.5*(wlon[0]+wlon[1])/15.)
-        zetime = nc.variables['Times'][0]
-        zetimestart = getattr(nc, 'START_DATE')
-        zeday = int(zetime[8]+zetime[9]) - int(zetimestart[8]+zetimestart[9])
-        if zeday < 0:    lschar=""  ## might have crossed a month... fix soon
-        else:            lschar="_Ls"+str( int( sol2ls ( getattr( nc, 'JULDAY' ) + zeday ) ) )
+        #zetime = nc.variables['Times'][0]
+        #zetimestart = getattr(nc, 'START_DATE')
+        #zeday = int(zetime[8]+zetime[9]) - int(zetimestart[8]+zetimestart[9])
+        #if zeday < 0:    lschar=""  ## might have crossed a month... fix soon
+        #else:            lschar="_Ls"+str( int( sol2ls ( getattr( nc, 'JULDAY' ) + zeday ) ) )
     elif typefile in ['gcm']:           
         ltst = 0
-        lschar = ""
 
     ##############################################################################
@@ -227,5 +226,7 @@
        
        ### Next subplot
-       ptitle( basename + "_LT"+str((ltst+i)%24) + lschar )
+       plottitle = basename + "_LT"+str((ltst+i)%24)
+       if addchar:  plottitle = plottitle + addchar
+       ptitle( plottitle )
        sub += 1
 
@@ -261,4 +262,6 @@
     from optparse import OptionParser    ### to be replaced by argparse
     from api_wrapper import api_onelevel
+    from netCDF4 import Dataset
+    from myplot import getlschar
 
     #############################
@@ -284,4 +287,5 @@
     zelevel = opt.nvert   
     stralt = None
+    lschar = getlschar ( zefile )  ## getlschar from wrfout (or simply return "" if another file)
 
     #####################################################
@@ -308,5 +312,6 @@
     ### Main call
     name = winds (zefile,int(zelevel),\
-           proj=opt.proj,back=opt.back,target=opt.target,stride=opt.stride,var=opt.var,numplot=opt.numplot,colorb=opt.colorb,winds=opt.winds)
+           proj=opt.proj,back=opt.back,target=opt.target,stride=opt.stride,var=opt.var,numplot=opt.numplot,colorb=opt.colorb,winds=opt.winds,\
+           addchar=lschar)
 
     #########################################################
