Index: trunk/mesoscale/PLOT/SPEC/MAP/defs/map_uvt_inc.pro
===================================================================
--- trunk/mesoscale/PLOT/SPEC/MAP/defs/map_uvt_inc.pro	(revision 86)
+++ trunk/mesoscale/PLOT/SPEC/MAP/defs/map_uvt_inc.pro	(revision 91)
@@ -1,59 +1,44 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; FOLDER 
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; FOLDER
-	folder 	= '/d5/aslmd/LMD_MM_MARS_SIMUS/OM/' 
-        coord2d = 'false'	;; for non-regular projections  
-filename 	= folder + 'OM6_TI85/wrfout_d01_2024-06-43_06:00:00_zabg' 
-save_ps 	= 'OM6_TI85_tsurf'
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TIME
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TIME
-ini_utc		= 6	;; cf. name of file
-freq		= 1  	;; cf. 1 output per ... hour
-utc_to_lt       = -9    ;; cf. longitude -- LT = UTC + utc_to_lt 
-	use_lt	= 2	;; cf. what user wants
-	use_utc	= use_lt - utc_to_lt 
-        ntime	= (use_utc - ini_utc)/freq	;; TRUE IDL SUBSCRIPT ... ajouter un modulo... 
-        print, 'CHECK ... ', filename, ntime
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LVL & FLD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LVL & FLD
-nlevel          = 0
-field1   	= 'TSURF'  	;; comment to trace horizontal velocity
-no3d 		= 'true'
-overvector_x	= 0		;; comment out to get rid of vectors
-overvector_y	= 0		;; comment out to get rid of vectors
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TWEAK VAR
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TWEAK VAR
-	;a0 = 65.052165 & a1 = 3.1228993 & a2 = 0.0053787417 ;; Ls ~ 173
-	;;a0 = 64.039300 & a1 = 3.1378104 & a2 = 0.0055369148 ;; Ls ~ 120
-	;what_I_plot = - ( alog ( a1 - what_I_plot / a0 ) ) /  a2
-	;print, max(what_I_plot), min(what_I_plot)
-	;overvector_x=0
-	;overvector_y=0
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
+;;;;;*************************************** FOLDER
+        folder  = '/tmp7/aslmd/'
+        coord2d = 'false'       ;; for non-regular projections  ;;CHANGER windowx and windowy
+	coord2d = 'polar'       ;; for polar projection with map_set ;; utiliser use_lt=99
+        filename        = folder + 'wrfout_d01_2024-05-02_01:00:00'
+        ini_utc         = 1           ;; cf. name of file
+        freq            = 1           ;; cf. 1 output per ... hour
+        save_ps         = 'POLAR_newphys_RAC_TAUTES'
 
+;;;;;*************************************** LVL & FLD & TIME
+        nlevel          = 0
+        use_lt          = 99               ;; cf. what user wants (99 pour tous)
+        field1          = 'TAU_ICE'        ;; comment to trace horizontal velocity
+        ;field2         = 'XLAT'           ;; contour
+        no3d            = 'true'
+        ;overvector_x    = 0               ;; comment out to get rid of vectors
+        ;overvector_y    = 0               ;; comment out to get rid of vectors
+
+;;;;;*************************************** TWEAK VAR
+        ;what_I_plot = what_I_plot * 0.
+        ;print, max(what_I_plot), min(what_I_plot)
 
 ;;;;;*************************************** PLOT TITLES
-        ;title_user 	= 	'Surface temperature (K) and Winds 10m ABG (m s!U-1!N)' 
-	;title_user    	= 	'Wind-induced apparent thermal inertia (J m!U-2!N s!U-0.5!N K!U-1!N)'
-	;title_user 	= 	'Winds 10m ABG (m s!U-1!N)'
-        title_user      =       'Surface temperature (K)'
-        ;subtitle_user   =       'LT = 03:00am  /  Ls = 173!Uo!N  /  dx = 10km [single]  /  Uniform TI = 85 J m!U-2!N s!U-0.5!N K!U-1!N'
-        subtitle_user   =       'LT = 02:00am  /  Ls = 173!Uo!N  /  dx = 6km [single]  /  Uniform TI = 85 J m!U-2!N s!U-0.5!N K!U-1!N'
+        title_user 	= 	'Water ice cloud optical depth at 825 cm!U-1!N' 
         title_axis      =       ['East longitude','North latitude']
+        ;subtitle_user   = 'LMD_MM'
+        ;;subtitle_user   = subtitle_user + ' / LT = '+string(use_lt,'(I0)')+'h'
+        ;;subtitle_user   = subtitle_user + ' / UTC!D0!N = 06:00am' ;; pour les series
+        ;subtitle_user   = subtitle_user + ' / Ls = 120!Uo!N'
+        ;subtitle_user   = subtitle_user + ' / dx = 10km [S]'
 
 ;;;;;*************************************** COLOR TABLES
         flag_cb         =       'true'
-	poscb		=	0.80;0.96
-        format          =       '(I0)'
-        ;format          =       '(F4.1)' 
-        ;colors          =       128
+	poscb		=	0.85
+        format          =       '(F5.2)' 
         colors          =       32
         pal             =       22              ;; GOOD: 4, 18, 22, 16, 37, 33, 39, 6, 11
 
 ;;;;;*************************************** FILL LIMITS
-        minfield_init   =       150.
-        maxfield_init   =       180.
-	;minfield_init	= 	50.
-	;maxfield_init	= 	250.
+        minfield_init   =       0.
+        maxfield_init   =       0.55
+        ndiv            =       11
 
 	;;;;;*************************************** LIMIT TRICKS
@@ -65,32 +50,32 @@
 
 ;;;;;*************************************** WINDS
-        ;windex          =       10.		;; DEF: 20.
         windex          =       30.             ;; DEF: 20.
-        ;stride          =       1. 		;; DEF: 5.
-        ;stride          =       2.              ;; DEF: 5.
         stride          =       3.              ;; DEF: 5.
 
 ;;;;;*************************************** CONTOUR
 	overcontour	=	overcontour/1000.
-        ;lev             =       50. + 50.*findgen(20)
-        ;lev             =       -10. + 0.2*findgen(20)
-        lev             =       -10. + 2.*findgen(20)
-        ;lev             =       -10. + 1.*findgen(40)
+        lev             =       -10. + 0.5*findgen(80)
 
 ;;;;;*************************************** AXIS
         isotropic       =       'true'
-        ;intervalx       =       0.5
-        intervalx       =       2.0
-        ;intervaly       =	intervalx
-	intervaly	=	1.0
+        intervalx       =       30.0
+        intervaly       =	05.0
 
 ;;;;;*************************************** MAP LIMITS
-        ;windowx         =       [-144.,-126.] 
-        ;windowy         =       [10.,26.] 
-	windowx 	= 	[-146.,-126.]        
-	;windowy 	 =	[10.,28.]
-	;windowx 	 = 	[-146.,-128.]
-        ;windowy         =      [12.,26.]
-	windowy 	= 	[11.,27.]
+	windowx 	= 	[-180.,180.]        
+	windowy 	= 	[65.,90.]
+
+;;;;;***************************************;;;;;
+;;;;;***************************************;;;;;
+;;;;;***************************************;;;;;
+;;;;;***************************************;;;;;
+
+;;;;;*************************************** SETTING TIME (do not modify)
+        if (n_elements(windowx) eq 0) then windowx = 0 
+        utc_to_lt       = mean(windowx) / 15.    ;; cf. longitude -- LT = UTC + utc_to_lt
+        use_utc         = use_lt - utc_to_lt
+        zentime         = floor(((24 + use_utc - ini_utc) MOD 24)/freq)        ;; TRUE IDL SUBSCRIPT... 
+        if (use_lt ne 99) then ntime = zentime else ntime = 99    ;; ou commenter pour avoir tous les pas de temps
+        print, zentime, ntime
 
 ;;;;;***************************************
Index: trunk/mesoscale/PLOT/SPEC/MAP/defs/map_uvt_inc.pro.oldref
===================================================================
--- trunk/mesoscale/PLOT/SPEC/MAP/defs/map_uvt_inc.pro.oldref	(revision 91)
+++ trunk/mesoscale/PLOT/SPEC/MAP/defs/map_uvt_inc.pro.oldref	(revision 91)
@@ -0,0 +1,139 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; FOLDER 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; FOLDER
+	folder 	= '/d5/aslmd/LMD_MM_MARS_SIMUS/OM/' 
+        coord2d = 'false'	;; for non-regular projections  
+filename 	= folder + 'OM6_TI85/wrfout_d01_2024-06-43_06:00:00_zabg' 
+save_ps 	= 'OM6_TI85_tsurf'
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TIME
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TIME
+ini_utc		= 6	;; cf. name of file
+freq		= 1  	;; cf. 1 output per ... hour
+utc_to_lt       = -9    ;; cf. longitude -- LT = UTC + utc_to_lt 
+	use_lt	= 2	;; cf. what user wants
+	use_utc	= use_lt - utc_to_lt 
+        ntime	= (use_utc - ini_utc)/freq	;; TRUE IDL SUBSCRIPT ... ajouter un modulo... 
+        print, 'CHECK ... ', filename, ntime
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LVL & FLD
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LVL & FLD
+nlevel          = 0
+field1   	= 'TSURF'  	;; comment to trace horizontal velocity
+no3d 		= 'true'
+overvector_x	= 0		;; comment out to get rid of vectors
+overvector_y	= 0		;; comment out to get rid of vectors
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TWEAK VAR
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TWEAK VAR
+	;a0 = 65.052165 & a1 = 3.1228993 & a2 = 0.0053787417 ;; Ls ~ 173
+	;;a0 = 64.039300 & a1 = 3.1378104 & a2 = 0.0055369148 ;; Ls ~ 120
+	;what_I_plot = - ( alog ( a1 - what_I_plot / a0 ) ) /  a2
+	;print, max(what_I_plot), min(what_I_plot)
+	;overvector_x=0
+	;overvector_y=0
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
+
+
+;;;;;*************************************** PLOT TITLES
+        ;title_user 	= 	'Surface temperature (K) and Winds 10m ABG (m s!U-1!N)' 
+	;title_user    	= 	'Wind-induced apparent thermal inertia (J m!U-2!N s!U-0.5!N K!U-1!N)'
+	;title_user 	= 	'Winds 10m ABG (m s!U-1!N)'
+        title_user      =       'Surface temperature (K)'
+        ;subtitle_user   =       'LT = 03:00am  /  Ls = 173!Uo!N  /  dx = 10km [single]  /  Uniform TI = 85 J m!U-2!N s!U-0.5!N K!U-1!N'
+        subtitle_user   =       'LT = 02:00am  /  Ls = 173!Uo!N  /  dx = 6km [single]  /  Uniform TI = 85 J m!U-2!N s!U-0.5!N K!U-1!N'
+        title_axis      =       ['East longitude','North latitude']
+
+;;;;;*************************************** COLOR TABLES
+        flag_cb         =       'true'
+	poscb		=	0.80;0.96
+        format          =       '(I0)'
+        ;format          =       '(F4.1)' 
+        ;colors          =       128
+        colors          =       32
+        pal             =       22              ;; GOOD: 4, 18, 22, 16, 37, 33, 39, 6, 11
+
+;;;;;*************************************** FILL LIMITS
+        minfield_init   =       150.
+        maxfield_init   =       180.
+	;minfield_init	= 	50.
+	;maxfield_init	= 	250.
+
+	;;;;;*************************************** LIMIT TRICKS
+        ;;;;;********************* must always follow FILL LIMITS
+        	missing_value=1.e30
+        	lim_max = maxfield_init & w=where((what_I_plot ge lim_max) and (what_I_plot le 1e9)) & if (w[0] ne -1) then what_I_plot[w]=lim_max
+        	lim_min = minfield_init & w=where(what_I_plot le lim_min) & if (w[0] ne -1) then what_I_plot[w]=lim_min
+        	;lim_blank = 2. & w=where(abs(what_I_plot) le lim_blank) & if (w[0] ne -1) then what_I_plot[w]=missing_value
+
+;;;;;*************************************** WINDS
+        ;windex          =       10.		;; DEF: 20.
+        windex          =       30.             ;; DEF: 20.
+        ;stride          =       1. 		;; DEF: 5.
+        ;stride          =       2.              ;; DEF: 5.
+        stride          =       3.              ;; DEF: 5.
+
+;;;;;*************************************** CONTOUR
+	overcontour	=	overcontour/1000.
+        ;lev             =       50. + 50.*findgen(20)
+        ;lev             =       -10. + 0.2*findgen(20)
+        lev             =       -10. + 2.*findgen(20)
+        ;lev             =       -10. + 1.*findgen(40)
+
+;;;;;*************************************** AXIS
+        isotropic       =       'true'
+        ;intervalx       =       0.5
+        intervalx       =       2.0
+        ;intervaly       =	intervalx
+	intervaly	=	1.0
+
+;;;;;*************************************** MAP LIMITS
+        ;windowx         =       [-144.,-126.] 
+        ;windowy         =       [10.,26.] 
+	windowx 	= 	[-146.,-126.]        
+	;windowy 	 =	[10.,28.]
+	;windowx 	 = 	[-146.,-128.]
+        ;windowy         =      [12.,26.]
+	windowy 	= 	[11.,27.]
+
+;;;;;***************************************
+;;;;;***************************************
+;;;;;***************************************
+;;;;;***************************************
+
+;;;
+;;; VERTICAL SECTION LIMITS
+;;;
+;minalt=-5.             ;; grepSEC
+;maxalt=40.             ;; grepSEC
+;minspace=0.0           ;; grepSEC
+;maxspace=35.0          ;; grepSEC
+
+;;;
+;;; METRIC UNITS FOR VERTICAL SECTION
+;;;
+;factor=10.        ;; grepSEC
+;space=space*60. & spacekm='true'       ;; grepSEC
+;minspace=minspace*60./factor           ;; grepSEC
+;maxspace=maxspace*60./factor           ;; grepSEC
+;intervalx=round(intervalx*60./factor)   ;; grepSEC
+
+
+;;;
+;;; TRICKS
+;;;
+
+;; pour tracer juste les vecteurs sur un fond uni ou vide
+;pal=0                                          ;; 1/4 grepMAP
+;what_I_plot(*,*)=what_I_plot(*,*)*0.+0.2       ;; 2/4 grepMAP
+;what_I_plot(0,0)=0.                            ;; 3/4 grepMAP
+;flag_cb='false'                                        ;; 4/4 grepMAP
+
+;;; truc pour tracer juste les contours et une zone grisee de topo
+;pal=0                                           ;; 1/9 grepALL
+;w=where(abs(what_I_plot) lt missing_value)     ;; 2/9 grepALL
+;what_I_plot[w]=0.                              ;; 3/9 grepALL
+;w=where(abs(what_I_plot) gt missing_value)     ;; 4/9 grepALL
+;what_I_plot[w]=0.75                            ;; 5/9 grepALL
+;w=where(what_I_plot eq 0.)                     ;; 6/9 grepALL
+;what_I_plot[w]=missing_value                           ;; 7/9 grepALL
+;what_I_plot(0,0)=1. & what_I_plot(1,0)=0.      ;; 8/9 grepALL
+;flag_cb='false'                                ;; 9/9 grepALL
+
Index: trunk/mesoscale/PLOT/SPEC/MAP/map_uvt.pro
===================================================================
--- trunk/mesoscale/PLOT/SPEC/MAP/map_uvt.pro	(revision 86)
+++ trunk/mesoscale/PLOT/SPEC/MAP/map_uvt.pro	(revision 91)
@@ -12,5 +12,54 @@
 ;
 ;
-  zefile=save_ps
+if (n_elements(field1) ne 0) then getcdf, file=filename, charvar=field1, invar=cfield1
+if (n_elements(field2) ne 0) then getcdf, file=filename, charvar=field2, invar=cfield2
+if ( (n_elements(overvector_x) ne 0) or (n_elements(field1) eq 0) ) then begin
+   u = getget(filename, 'Um', count=[0,0,1,1], offset=[0,0,nlevel,0])
+   v = getget(filename, 'Vm', count=[0,0,1,1], offset=[0,0,nlevel,0])
+endif
+getcdf, file=filename, charvar='XLONG', invar=longi
+getcdf, file=filename, charvar='XLAT', invar=lati
+getcdf, file=filename, charvar='HGT', invar=hgt
+;
+;
+;
+sp = 5 ;; relaxation width
+nx = n_elements(longi(0,*))
+ny = n_elements(longi(*,0))
+if (n_elements(field1) ne 0) then begin
+	if (no3d ne 'true') then cfield1 = cfield1 (sp:nx-sp-1,sp:ny-sp-1,*,*) else cfield1 = cfield1 (sp:nx-sp-1,sp:ny-sp-1,*)
+endif
+if (n_elements(field2) ne 0) then begin
+        if (no3d ne 'true') then cfield2 = cfield2 (sp:nx-sp-1,sp:ny-sp-1,*,*) else cfield2 = cfield2 (sp:nx-sp-1,sp:ny-sp-1,*)
+endif
+if ( (n_elements(overvector_x) ne 0) or (n_elements(field1) eq 0) ) then begin
+  u 		= u		(sp:nx-sp-1,sp:ny-sp-1,*) 
+  v       	= v       	(sp:nx-sp-1,sp:ny-sp-1,*)
+endif
+longi		= longi		(sp:nx-sp-1,sp:ny-sp-1,*)
+lati          	= lati 	        (sp:nx-sp-1,sp:ny-sp-1,*)
+hgt		= hgt		(sp:nx-sp-1,sp:ny-sp-1,*)
+nx = n_elements(longi(*,0,0))
+ny = n_elements(longi(0,*,0))
+nt = n_elements(longi(0,0,*))
+if ( n_elements( overvector_x ) ne 0 ) then begin  
+  overvector_x = u
+  overvector_y = v
+endif
+;
+;
+;
+                if (ntime eq 99) then begin
+                        PRINT, '-- ALL TIME STEPS', nt-1 
+                        ntstart = 0  & ntend = nt-1 
+                endif else begin
+                        PRINT, '-- ONLY TIME STEP ', string(ntime,'(I0)')
+                        ntstart = ntime & ntend = ntime
+                endelse
+                for ntime = ntstart,ntend do begin
+;
+;
+;
+  zefile=save_ps+string(100+ntime,'(I0)')
   PS_Start, filename=zefile+'.ps'
   print, zefile+'.ps'
@@ -23,44 +72,6 @@
 ;
 ;
-if (n_elements(field1) ne 0) then getcdf, file=filename, charvar=field1, invar=cfield1
-if ( (n_elements(overvector_x) ne 0) or (n_elements(field1) eq 0) ) then begin
-   u = getget(filename, 'Um', count=[0,0,1,1], offset=[0,0,nlevel,ntime])
-   v = getget(filename, 'Vm', count=[0,0,1,1], offset=[0,0,nlevel,ntime])
-endif
-getcdf, file=filename, charvar='XLONG', invar=longi
-getcdf, file=filename, charvar='XLAT', invar=lati
-getcdf, file=filename, charvar='HGT', invar=hgt
-;;
-;;
-;;
-;	hgt = smooth(hgt, [2,2,0], /EDGE_TRUNCATE) ;;; truc
-;;
-;;
-;;
-sp = 5 ;; relaxation width
-nx = n_elements(longi(0,*))
-ny = n_elements(longi(*,0))
-if (n_elements(field1) ne 0) then begin
-	if (no3d ne 'true') then cfield1 = cfield1 (sp:nx-sp-1,sp:ny-sp-1,*,*) else cfield1 = cfield1 (sp:nx-sp-1,sp:ny-sp-1,*)
-endif
-if ( (n_elements(overvector_x) ne 0) or (n_elements(field1) eq 0) ) then begin
-  u 		= u		(sp:nx-sp-1,sp:ny-sp-1);,*,*) 
-  v       	= v       	(sp:nx-sp-1,sp:ny-sp-1);,*,*)
-endif
-longi		= longi		(sp:nx-sp-1,sp:ny-sp-1,*)
-lati          	= lati 	        (sp:nx-sp-1,sp:ny-sp-1,*)
-hgt		= hgt		(sp:nx-sp-1,sp:ny-sp-1,*)
-nx = n_elements(longi(*,0))
-ny = n_elements(longi(0,*))
-;
-;
-;
-overcontour = reform(hgt(*,*,ntime))
 lon = reform(longi(*,*,ntime))
 lat = reform(lati(*,*,ntime))
-if (n_elements(overvector_x) ne 0) then begin
-  overvector_x = u;reform(u(*,*,nlevel,ntime))
-  overvector_y = v;reform(v(*,*,nlevel,ntime))
-endif
 if (n_elements(field1) eq 0) then begin
         print, 'field1: horizontal velocity'
@@ -69,22 +80,46 @@
 endif else begin
 	if (no3d ne 'true') then what_I_plot = reform(cfield1(*,*,nlevel,ntime)) else what_I_plot = reform(cfield1(*,*,ntime))
+        if (n_elements(u) ne 0) then overvector_x = reform(overvector_x(*,*,ntime))   ;; ne pas utiliser test overvector_x a cause de la boucle temps
+        if (n_elements(v) ne 0) then overvector_y = reform(overvector_y(*,*,ntime))   ;; ne pas utiliser test overvector_y a cause de la boucle temps
+endelse
+if (n_elements(field2) eq 0) then begin
+        print, 'field2: topography'
+        overcontour = reform(hgt(*,*,ntime))
+endif else begin
+        if (no3d ne 'true') then overcontour = reform(cfield2(*,*,nlevel,ntime)) else overcontour = reform(cfield2(*,*,ntime))
 endelse
 ;
 ;
 ;
-minlat=min(lat) & maxlat=max(lat) & minlon=min(lon) & maxlon=max(lon)
-if (coord2d eq 'true') then begin
+if ( coord2d eq 'polar' ) then begin
+   print, 'OK YOU USE MAP_SET with POLAR PROJECTION. VECTORS ARE NOT SUPPORTED. USE polar_uv OR ADAPT THIS SCRIPT.'
+   overvector_x = 0 
+   overvector_y = 0
+   if (n_elements(windowx) ne 0) then begin
+       latmin = windowy(0) & latmax = windowy(1) & lonmin = windowx(0) & lonmax = windowx(1)
+   endif else begin
+       latmin = 65. & latmax = 90. & lonmin = -180. & lonmax = 180.
+   endelse
+   print, 'latmin,lonmin,latmax,lonmax', latmin,lonmin,latmax,lonmax
+   map_set, latmax, 0., /isotropic, /azimuthal, /noborder, limit=[latmin,lonmin,latmax,lonmax], title=title_user, /advance
+endif else begin
+  minlat=min(lat) & maxlat=max(lat) & minlon=min(lon) & maxlon=max(lon)
+  if (coord2d eq 'true') then begin
 	npoints=n_elements(lon(*,0)) + n_elements(lon(0,*))  ;; trop de points, mais au moins on ne perd rien 
 	TRIANGULATE, lon, lat, tr 
 	what_I_plot  = GRIDDATA( lon, lat, what_I_plot,  /LINEAR, triangles=tr, dimension=npoints, MISSING=!VALUES.F_NAN )
-	overvector_x = GRIDDATA( lon, lat, overvector_x, /LINEAR, triangles=tr, dimension=npoints, MISSING=!VALUES.F_NAN )
-	overvector_y = GRIDDATA( lon, lat, overvector_y, /LINEAR, triangles=tr, dimension=npoints, MISSING=!VALUES.F_NAN )
+        if (n_elements(overvector_x) ne 0) then begin
+	  overvector_x = GRIDDATA( lon, lat, overvector_x, /LINEAR, triangles=tr, dimension=npoints, MISSING=!VALUES.F_NAN )
+	  overvector_y = GRIDDATA( lon, lat, overvector_y, /LINEAR, triangles=tr, dimension=npoints, MISSING=!VALUES.F_NAN )
+        endif
         overcontour  = GRIDDATA( lon, lat, overcontour,  /LINEAR, triangles=tr, dimension=npoints, MISSING=!VALUES.F_NAN )
-			; sale sale sale
-			if (minlat lt min(lat(*,0))) then overvector_y=-overvector_y
-			if (minlon lt min(lon(0,*))) then overvector_x=-overvector_x
+                        if (n_elements(overvector_x) ne 0) then begin
+			  ; sale sale sale
+			  if (minlat lt min(lat(*,0))) then overvector_y=-overvector_y
+			  if (minlon lt min(lon(0,*))) then overvector_x=-overvector_x
+                        endif
         lon =  minlon + (maxlon - minlon)*findgen(npoints)/float(npoints-1)
         lat =  minlat + (maxlat - minlat)*findgen(npoints)/float(npoints-1)
-endif else begin
+  endif else begin
 	lon = reform(lon(*,0))
 	lat = reform(lat(0,*))
@@ -96,8 +131,11 @@
         ;lon =  minlon + (maxlon - minlon)*findgen(npoints)/float(npoints-1)
         ;lat =  minlat + (maxlat - minlat)*findgen(npoints)/float(npoints-1)
+  endelse
 endelse
 help, what_I_plot, lon, lat
 print, min(what_I_plot)
 print, max(what_I_plot)
+print, min(overcontour)
+print, max(overcontour)
 ;
 ;
@@ -119,4 +157,24 @@
 ;
 ;
+if ( coord2d eq 'polar' ) then begin    ;;; pourrait aller dans map_latlon
+  loadct, 0
+  MAP_GRID, $
+          CHARSIZE = 1., $
+          COLOR    = 0,   $
+          ;lats=-60, $
+          LABEL    = 1,   $   ;; /LABEL or LABEL=2 (one label any 2 grid lines)
+          LATDEL   = intervaly, $   ;;5 10
+          LONDEL   = intervalx, $   ;;15
+          LONLAB   = latmin + intervaly/2., $ ;5. + (latmin+latmax)/2., $ ;0.
+          LATLAB   = -0.001, $
+          GLINESTYLE = 2, $
+          GLINETHICK = 0.3
+          ;LONALIGN = 0., $
+          ;LATALIGN = 1.
+endif
+;
+;
+;
 PS_End, /PNG
+		endfor
 end
