Changeset 3458 for trunk/LMDZ.COMMON


Ignore:
Timestamp:
Oct 11, 2024, 11:32:49 AM (6 weeks ago)
Author:
jbclement
Message:

PCM:
Addition of a python script to visualize the layerings over time and on a reference grid for elevation which is specified by the user.
JBC

Location:
trunk/LMDZ.COMMON/libf/evolution
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/changelog.txt

    r3457 r3458  
    442442== 11/10/2024 == JBC
    443443Modification 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
     446Addition 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  
    1111##############################
    1212### Parameters to fill in
    13 filename = 'startpem9.nc' # File name
     13filename = 'startpem.nc' #'starts/restartpem226.nc' # File name
    1414igrid = 1  # Grid point
    1515islope = 1 # Slope number
     
    1717##############################
    1818
     19
     20####################################################################################
    1921### Open the NetCDF file
    2022if os.path.isfile(filename):
     
    8385plt.savefig('layering_simpleprofiles.png')
    8486
    85 # Stackplot for a layering
     87# Content profiles for a layering
     88plt.figure()
     89plt.step(contents[0,:],height,where = 'post',color = 'r',label = labels[0])
     90#plt.plot(contents[0,:],height,'o--',color = 'r',alpha = 0.3)
     91plt.step(contents[1,:],height,where = 'post',color = 'b',label = labels[1])
     92#plt.plot(contents[1,:],height,'o--',color = 'b',alpha = 0.3)
     93plt.step(contents[2,:],height,where = 'post',color = 'y',label = labels[2])
     94#plt.plot(contents[2,:],height,'o--',color = 'y',alpha = 0.3)
     95plt.step(contents[3,:],height,where = 'post',color = 'g',label = labels[3])
     96#plt.plot(contents[3,:],height,'o--',color = 'g',alpha = 0.3)
     97plt.grid(axis='x', color='0.95')
     98plt.grid(axis='y', color='0.95')
     99plt.xlim(0,1)
     100plt.xlabel('Volume fraction [m3/m3]')
     101plt.ylabel('Elevation [m]')
     102plt.title('Content profiles for the layering')
     103plt.savefig('layering_simpleprofiles.png')
     104
     105# Stack content profiles for a layering
    86106fig, ax = plt.subplots()
    87107ax.fill_betweenx(height,0,contents[0,:],label = labels[0],color = 'r',step = 'pre')
Note: See TracChangeset for help on using the changeset viewer.