Changeset 3851 for trunk/LMDZ.COMMON/libf/evolution/deftank
- Timestamp:
- Jul 16, 2025, 3:25:48 PM (10 days ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution/deftank
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/deftank/PCMrun.job
r3667 r3851 4 4 ### GENOA nodes accommodate 96 cores 5 5 #SBATCH --constraint=GENOA 6 ### Number of Nodes to use6 ### Number of nodes/cores to use 7 7 #SBATCH --nodes=1 8 8 #SBATCH --ntasks-per-node=24 -
trunk/LMDZ.COMMON/libf/evolution/deftank/PEMrun.job
r3850 r3851 4 4 ### GENOA nodes accommodate 96 cores 5 5 #SBATCH --constraint=GENOA 6 ### Number of Nodes to use6 ### Number of nodes/cores to use 7 7 #SBATCH --nodes=1 8 8 #SBATCH --ntasks=1 -
trunk/LMDZ.COMMON/libf/evolution/deftank/clean.sh
r3579 r3851 17 17 rm -f *.out 18 18 rm -f kill_launchPEM.sh 19 rm -f l og_launchPEM.txt19 rm -f launchPEM.log 20 20 rm -f out_run* 21 21 rm -f run.def -
trunk/LMDZ.COMMON/libf/evolution/deftank/launchPEM.sh
r3639 r3851 48 48 # Starting from scratch 49 49 echo "The launching script is starting!" 50 echo "The output file is \"l og_launchPEM.txt\"."51 exec > l og_launchPEM.txt2>&150 echo "The output file is \"launchPEM.log\"." 51 exec > launchPEM.log 2>&1 52 52 echo "Beginning of the launching script for the PEM simulation." 53 53 date … … 59 59 # Starting a new cycle 60 60 if [ $1 = "new" ]; then 61 exec >> l og_launchPEM.txt2>&161 exec >> launchPEM.log 2>&1 62 62 echo 63 63 echo "This is a new cycle for the PEM simulation." … … 111 111 fi 112 112 done 113 exec >> l og_launchPEM.txt2>&1113 exec >> launchPEM.log 2>&1 114 114 echo 115 115 echo "This is a relaunch for the PEM simulation from the run \"$relaunch $irelaunch\"." … … 138 138 # Continuing the PEM run 139 139 elif [ $1 = "cont" ]; then 140 exec >> l og_launchPEM.txt2>&1140 exec >> launchPEM.log 2>&1 141 141 echo 142 142 echo "This is a continuation of the previous PEM run." -
trunk/LMDZ.COMMON/libf/evolution/deftank/visu_evol_layering.py
r3850 r3851 1030 1030 """ 1031 1031 h2o = gridded_data['h2o_ice'] 1032 co2 = gridded_data['co2_ice'] 1032 1033 dust = gridded_data['dust'] 1033 1034 ngrid, ntime, nslope, nz = h2o.shape … … 1077 1078 for isl in range(nslope): 1078 1079 ti = top_index[ig, :, isl].copy().astype(int) 1080 frac_all = np.zeros((nz, ntime, 3), dtype=float) # store fH2O, fCO2, fDust 1079 1081 for t in range(1, ntime): 1080 1082 if ti[t] <= 0: … … 1087 1089 if zmax <= 0: 1088 1090 continue 1091 cH2O = np.clip(h2o[ig, t, isl, :zmax], 0, None) 1092 cCO2 = np.clip(co2[ig, t, isl, :zmax], 0, None) 1093 cDust = np.clip(dust[ig, t, isl, :zmax], 0, None) 1094 total = cH2O + cCO2 + cDust 1095 total[total == 0] = 1.0 1096 fH2O = cH2O / total 1097 fCO2 = cCO2 / total 1098 fDust = cDust / total 1099 frac_all[:zmax, t, :] = np.stack([fH2O, fCO2, fDust], axis=1) 1089 1100 1090 1101 h2o_profile = np.clip(h2o[ig, t, isl, :zmax], 0, None) … … 1105 1116 ratio_array = 10**log_ratio_array 1106 1117 ratio_display = ratio_array[elevation_mask, :] 1118 display_frac = frac_all[elevation_mask, :, :] 1107 1119 1108 1120 # Plot … … 1117 1129 ) 1118 1130 x_edges = np.concatenate([date_time, [date_time[-1] + (date_time[-1]-date_time[-2])]]) 1119 attach_format_coord(ax, ratio_display, x_edges, np.concatenate([elev, [elev[-1] + (elev[-1]-elev[-2])]]), is_pcolormesh=True) 1131 y_edges = np.concatenate([elev, [elev[-1] + (elev[-1]-elev[-2])]]) 1132 def format_coord_all(x, y): 1133 # check bounds 1134 if x < x_edges[0] or x > x_edges[-1] or y < y_edges[0] or y > y_edges[-1]: 1135 return '' 1136 # locate cell 1137 i = np.searchsorted(x_edges, x) - 1 1138 j = np.searchsorted(y_edges, y) - 1 1139 i = np.clip(i, 0, display_frac.shape[1]-1) 1140 j = np.clip(j, 0, display_frac.shape[0]-1) 1141 # get fractions 1142 fH2O = display_frac[j, i, 0] 1143 fDust = display_frac[j, i, 2] 1144 obl = np.interp(x, date_time, obliquity) 1145 return f"Time={x:.2f}, Elev={y:.2f}, H2O={fH2O:.2f}, Dust={fDust:.2f}, Obl={obl:.2f}°" 1146 1147 ax.format_coord = format_coord_all 1120 1148 ax.set_title(f"Dust-to-Ice ratio over time (Grid point {ig+1}, Slope {isl+1})", fontweight='bold') 1121 1149 ax.set_xlabel('Time (Mars years)') … … 1138 1166 linewidth=1.5 1139 1167 ) 1168 ax2.format_coord = format_coord_all 1140 1169 ax2.set_ylabel('Obliquity (°)') 1141 1170 ax2.tick_params(axis='y')
Note: See TracChangeset
for help on using the changeset viewer.