Index: trunk/MESOSCALE/PLOT/PYTHON/mylib/api_g95.sh
===================================================================
--- trunk/MESOSCALE/PLOT/PYTHON/mylib/api_g95.sh	(revision 189)
+++ trunk/MESOSCALE/PLOT/PYTHON/mylib/api_g95.sh	(revision 191)
@@ -1,3 +1,10 @@
 #! /bin/bash
 
-f2py -c -m api ~/Science/MODELES/MESOSCALE/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
+#NETCDF=/distrib/local/netcdf-4.0.1/g95_4.0.3_64/
+#echo $NETCDF
+
+touch logc
+touch loge
+\rm logc
+\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
Index: trunk/MESOSCALE/PLOT/PYTHON/mylib/api_pgf90.sh
===================================================================
--- trunk/MESOSCALE/PLOT/PYTHON/mylib/api_pgf90.sh	(revision 191)
+++ trunk/MESOSCALE/PLOT/PYTHON/mylib/api_pgf90.sh	(revision 191)
@@ -0,0 +1,14 @@
+#! /bin/bash
+
+
+#NETCDF=/distrib/local/netcdf-4.0.1/pgi_7.1-6_32/
+#NETCDF=/distrib/local/netcdf-4.0.1/pgi_7.1-6_64/
+#NETCDF=/distrib/local/netcdf-3.6.0-p1/pgi_64bits/
+NETCDF=/donnees/aslmd/MODELES/MESOSCALE/NETCDF/pgf90_64_fpic/netcdf-3.6.1/
+echo $NETCDF
+
+touch logc
+touch loge
+\rm logc
+\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
Index: trunk/MESOSCALE/PLOT/PYTHON/mylib/myplot.py
===================================================================
--- trunk/MESOSCALE/PLOT/PYTHON/mylib/myplot.py	(revision 189)
+++ trunk/MESOSCALE/PLOT/PYTHON/mylib/myplot.py	(revision 191)
@@ -35,4 +35,8 @@
 	return wlon,wlat
 
+#def landers (map) 
+#    map.plot(blue_calf_lon,blue_calf_lat, 'gs')
+#    return
+
 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 189)
+++ trunk/MESOSCALE/PLOT/PYTHON/scripts/winds.py	(revision 191)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
 
-### A. Spiga -- LMD -- 30/05/2011
+### A. Spiga -- LMD -- 30/06/2011 to 04/07/2011
 ### Thanks to A. Colaitis for the parser trick
 
@@ -16,5 +16,6 @@
            numplot=4,\
            var=None,\
-           colorb=None):
+           colorb=None,\
+           winds=True):
 
     #################################
@@ -32,8 +33,9 @@
     ### Recognize predefined file types
     if 'controle' in nc.variables:   typefile = 'gcm'
-    elif 'Um' in nc.variables:       typefile = 'mesoapi'
+    elif 'vert' in nc.variables:     typefile = 'mesoapi'
     elif 'U' in nc.variables:        typefile = 'meso'
     else:                            
         print "typefile not supported."
+        print nc.variables
         exit()
 
@@ -74,16 +76,17 @@
     ##############################################################################
     ### Get winds and know if those are meteorological winds (ie. zon, mer) or not
-    if typefile is 'mesoapi': 
-        [u,v] = getwinds(nc)
-        metwind = True  ## meteorological (zon/mer)
-    elif typefile is 'gcm':
-        [u,v] = getwinds(nc,charu='u',charv='v')
-        metwind = True  ## meteorological (zon/mer)
-    elif typefile is 'meso':
-        [u,v] = getwinds(nc,charu='U',charv='V')
-        metwind = False ## geometrical (wrt grid)
-        print "Beware ! Not using meteorological winds. You trust numerical grid as being (x,y)."
-
-    ####################################################
+    if winds:
+        if typefile is 'mesoapi': 
+            [u,v] = getwinds(nc)
+            metwind = True  ## meteorological (zon/mer)
+        elif typefile is 'gcm':
+            [u,v] = getwinds(nc,charu='u',charv='v')
+            metwind = True  ## meteorological (zon/mer)
+        elif typefile is 'meso':
+            [u,v] = getwinds(nc,charu='U',charv='V')
+            metwind = False ## geometrical (wrt grid)
+            print "Beware ! Not using meteorological winds. You trust numerical grid as being (x,y)."
+
+    #####################################################
     ### Load the chosen variables, whether it is 2D or 3D
     if var:
@@ -96,11 +99,18 @@
             elif dimension == 3:   field = nc.variables[var][:,:,:]
             elif dimension == 4:   field = nc.variables[var][:,nvert,:,:]  
-    nt = len(u[:,0,0,0])
+
+    ###########################
+    ### Get length of time axis
+    if winds:               nt = len(u[:,0,0,0])
+    elif var:  
+        if dimension == 2:  nt = 1
+        else             :  nt = len(field[:,0,0])
 
     #########################################
     ### Name for title and graphics save file
-    basename = "WINDS"
+    if winds:   basename = "WINDS_"
+    else:       basename = ""
     if var:
-        basename = basename + "_" + var
+        basename = basename + var
     if   typefile is 'meso':                    stralt = "_lvl" + str(nvert)
     elif typefile is 'mesoapi':  
@@ -187,14 +197,15 @@
 
        ### Vector plot
-       if   typefile in ['mesoapi','meso']:    
-           [vecx,vecy] = [dumpbdy(u[i,nvert,:,:]), dumpbdy(v[i,nvert,:,:])]
-           key = True
-       elif typefile in ['gcm']:               
-           [vecx,vecy] = [        u[i,nvert,:,:] ,         v[i,nvert,:,:] ]
-           key = False
-       if metwind:  [vecx,vecy] = m.rotate_vector(vecx, vecy, lon2d, lat2d)
-       if var == None and back == "vishires":  colorvec = 'w'
-       else:                                   colorvec = 'k'
-       vectorfield(vecx, vecy,\
+       if winds:
+           if   typefile in ['mesoapi','meso']:    
+               [vecx,vecy] = [dumpbdy(u[i,nvert,:,:]), dumpbdy(v[i,nvert,:,:])]
+               key = True
+           elif typefile in ['gcm']:               
+               [vecx,vecy] = [        u[i,nvert,:,:] ,         v[i,nvert,:,:] ]
+               key = False
+           if metwind:  [vecx,vecy] = m.rotate_vector(vecx, vecy, lon2d, lat2d)
+           if var == None and back == "vishires":  colorvec = 'w'
+           else:                                   colorvec = 'k'
+           vectorfield(vecx, vecy,\
                       x, y, stride=stride, csmooth=stride,\
                       scale=15., factor=300., color=colorvec, key=key)
@@ -247,4 +258,5 @@
     parser.add_option('-i', action='store', dest='interp',      type="int",     default=None,  help='interpolation method (2: press, 3: z-amr, 4:z-als)')
     parser.add_option('-c', action='store', dest='colorb',      type="string",  default=None,  help='colorbar')
+    parser.add_option('-x', action='store_false', dest='winds',                 default=True,  help='flag: no wind vectors')
     (opt,args) = parser.parse_args()
     if opt.namefile is None: 
@@ -258,6 +270,12 @@
     if opt.interp is not None:
         if opt.nvert is 0 and opt.interp is 4:  zelevel = 0.010
-        if   opt.var is None    :  zefields = 'uvmet'
-        else                    :  zefields = 'uvmet,'+opt.var
+        ### winds or no winds
+        if opt.winds            :  zefields = 'uvmet'
+        else                    :  zefields = ''
+        ### var or no var
+        if opt.var is None      :  pass
+        elif zefields == ''     :  zefields = opt.var
+        else                    :  zefields = zefields + "," + opt.var
+        print zefields
         zefile = api_onelevel (  path_to_input   = '', \
                                  input_name      = zefile, \
@@ -269,3 +287,3 @@
 
     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)
+           proj=opt.proj,back=opt.back,target=opt.target,stride=opt.stride,var=opt.var,numplot=opt.numplot,colorb=opt.colorb,winds=opt.winds)
