Index: trunk/LMDZ.MARS/changelog.txt
===================================================================
--- trunk/LMDZ.MARS/changelog.txt	(revision 3680)
+++ trunk/LMDZ.MARS/changelog.txt	(revision 3681)
@@ -4776,2 +4776,5 @@
 == 26/02/2025 == JBC
 Skipping non-numeric variables in the analysis of NetCDF files.
+
+== 12/03/2025 == JBC
+Small improvements for the python script to display variables in a NetCDF file.
Index: trunk/LMDZ.MARS/util/display_netcdf.py
===================================================================
--- trunk/LMDZ.MARS/util/display_netcdf.py	(revision 3680)
+++ trunk/LMDZ.MARS/util/display_netcdf.py	(revision 3681)
@@ -24,5 +24,4 @@
     # Add '/' if the match is a directory
     matches = [match + '/' if os.path.isdir(match) else match for match in matches]
-    
     try:
         return matches[state]
@@ -81,5 +80,8 @@
     # If the variable has a time dimension, ask for the time index
     if 'Time' in dimensions:
-        time_index = int(input(f"Enter the time index (0 to {variable.shape[0] - 1}): "))
+        if variable.shape[0] == 1:
+            time_index = 0
+        else:
+            time_index = int(input(f"Enter the time index (0 to {variable.shape[0] - 1}): "))
     else:
         time_index = None
@@ -103,6 +105,6 @@
     
     # Plot the selected variable
-    plt.figure(figsize=(10,6))
-    plt.contourf(longitude,latitude,data_slice,cmap='viridis')
+    plt.figure(figsize = (10,6))
+    plt.contourf(longitude,latitude,data_slice,cmap = 'jet')
     plt.colorbar(label=f"{variable_name.capitalize()} (units)") # Adjust units based on your data
     plt.xlabel('Longitude (degrees)')
