Ignore:
Timestamp:
Mar 7, 2025, 10:01:32 AM (4 months ago)
Author:
jbclement
Message:

PEM:

  • Correction for the update of average pressure at the end.
  • Addition of pore-filled ice information for 'stratum' in the layering algorithm.
  • Deactivating the soil temperature shifting because of bad values given by interpolation.

JBC

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

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/deftank/visu_evol_layering.py

    r3666 r3673  
    6767    stratif_h2oice = np.zeros((ngrid,nfile,nslope,max_nb_str))
    6868    stratif_dust = np.zeros((ngrid,nfile,nslope,max_nb_str))
    69     stratif_air = np.zeros((ngrid,nfile,nslope,max_nb_str))
     69    stratif_pore = np.zeros((ngrid,nfile,nslope,max_nb_str))
    7070    for var_name in datasets[0].variables:
    7171        if 'top_elevation' in var_name:
     
    9797                            stratif_dust[i,j,k,:datasets[j].variables[var_name].shape[1]] = datasets[j].variables[var_name][0,:,i]
    9898            print(f"Processed variable: {var_name}")
    99         elif 'air_volfrac' in var_name:
     99        elif 'pore_volfrac' in var_name:
    100100            for i in range(0,ngrid):
    101101                for j in range(0,nfile):
    102102                    for k in range(0,nslope):
    103103                        if f'slope{k + 1:02d}' in var_name:
    104                             stratif_air[i,j,k,:datasets[j].variables[var_name].shape[1]] = datasets[j].variables[var_name][0,:,i]
     104                            stratif_pore[i,j,k,:datasets[j].variables[var_name].shape[1]] = datasets[j].variables[var_name][0,:,i]
    105105            print(f"Processed variable: {var_name}")
    106106
     
    109109        ds.close()
    110110
    111     stratif_data = [stratif_heights,stratif_co2ice,stratif_h2oice,stratif_dust,stratif_air]
     111    stratif_data = [stratif_heights,stratif_co2ice,stratif_h2oice,stratif_dust,stratif_pore]
    112112    return stratif_data, max_top_elevation, longitude, latitude
    113113
     
    158158
    159159### Figures plotting
    160 subtitle = ['CO2 ice','H2O ice','Dust','Air']
     160subtitle = ['CO2 ice','H2O ice','Dust','Pore']
    161161cmap = plt.get_cmap('viridis').copy()
    162162cmap.set_under('white')
  • trunk/LMDZ.COMMON/libf/evolution/deftank/visu_layering.py

    r3458 r3673  
    4343stratif_h2oice_volfrac = []
    4444stratif_dust_volfrac = []
    45 stratif_air_volfrac = []
     45stratif_pore_volfrac = []
    4646for i in range(1,nslope + 1):
    4747    stratif_thickness.append(nc_file.variables['stratif_slope' + str(i).zfill(2) + '_thickness'][:])
     
    5050    stratif_h2oice_volfrac.append(nc_file.variables['stratif_slope' + str(i).zfill(2) + '_h2oice_volfrac'][:])
    5151    stratif_dust_volfrac.append(nc_file.variables['stratif_slope' + str(i).zfill(2) + '_dust_volfrac'][:])
    52     stratif_air_volfrac.append(nc_file.variables['stratif_slope' + str(i).zfill(2) + '_air_volfrac'][:])
     52    stratif_pore_volfrac.append(nc_file.variables['stratif_slope' + str(i).zfill(2) + '_pore_volfrac'][:])
    5353
    5454### Display the data
    5555igrid = igrid - 1
    5656islope = islope - 1
    57 labels = 'CO2 ice', 'H2O ice', 'Dust', 'Air'
     57labels = 'CO2 ice', 'H2O ice', 'Dust', 'Pore'
    5858contents = np.zeros([4,len(stratif_top_elevation[islope][0,:,igrid]) + 1])
    5959height = np.zeros(len(stratif_top_elevation[islope][0,:,igrid]) + 1)
     
    6464    contents[1,1 + i] = stratif_h2oice_volfrac[islope][0,i,igrid]
    6565    contents[2,1 + i] = stratif_dust_volfrac[islope][0,i,igrid]
    66     contents[3,1 + i] = stratif_air_volfrac[islope][0,i,igrid]
     66    contents[3,1 + i] = stratif_pore_volfrac[islope][0,i,igrid]
    6767contents[:,0] = contents[:,1]
    6868
Note: See TracChangeset for help on using the changeset viewer.