Changeset 3458 for trunk/LMDZ.COMMON
- Timestamp:
- Oct 11, 2024, 11:32:49 AM (6 weeks ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/changelog.txt
r3457 r3458 442 442 == 11/10/2024 == JBC 443 443 Modification of dimension detection for the variables written in "diagpem.nc": in particular for 'nb_str_max' which can evolve and match the value of other dimensions. 444 445 == 11/10/2024 == JBC 446 Addition of a python script to visualize the layerings over time and on a reference grid for elevation which is specified by the user. -
trunk/LMDZ.COMMON/libf/evolution/deftank/visu_layering.py
r3386 r3458 11 11 ############################## 12 12 ### Parameters to fill in 13 filename = 'startpem 9.nc' # File name13 filename = 'startpem.nc' #'starts/restartpem226.nc' # File name 14 14 igrid = 1 # Grid point 15 15 islope = 1 # Slope number … … 17 17 ############################## 18 18 19 20 #################################################################################### 19 21 ### Open the NetCDF file 20 22 if os.path.isfile(filename): … … 83 85 plt.savefig('layering_simpleprofiles.png') 84 86 85 # Stackplot for a layering 87 # Content profiles for a layering 88 plt.figure() 89 plt.step(contents[0,:],height,where = 'post',color = 'r',label = labels[0]) 90 #plt.plot(contents[0,:],height,'o--',color = 'r',alpha = 0.3) 91 plt.step(contents[1,:],height,where = 'post',color = 'b',label = labels[1]) 92 #plt.plot(contents[1,:],height,'o--',color = 'b',alpha = 0.3) 93 plt.step(contents[2,:],height,where = 'post',color = 'y',label = labels[2]) 94 #plt.plot(contents[2,:],height,'o--',color = 'y',alpha = 0.3) 95 plt.step(contents[3,:],height,where = 'post',color = 'g',label = labels[3]) 96 #plt.plot(contents[3,:],height,'o--',color = 'g',alpha = 0.3) 97 plt.grid(axis='x', color='0.95') 98 plt.grid(axis='y', color='0.95') 99 plt.xlim(0,1) 100 plt.xlabel('Volume fraction [m3/m3]') 101 plt.ylabel('Elevation [m]') 102 plt.title('Content profiles for the layering') 103 plt.savefig('layering_simpleprofiles.png') 104 105 # Stack content profiles for a layering 86 106 fig, ax = plt.subplots() 87 107 ax.fill_betweenx(height,0,contents[0,:],label = labels[0],color = 'r',step = 'pre')
Note: See TracChangeset
for help on using the changeset viewer.