|
9 | 9 | },
|
10 | 10 | {
|
11 | 11 | "cell_type": "code",
|
12 |
| - "execution_count": 1, |
| 12 | + "execution_count": 3, |
13 | 13 | "metadata": {},
|
14 | 14 | "outputs": [
|
15 | 15 | {
|
|
1253 | 1253 | "text/html": [
|
1254 | 1254 | "\n",
|
1255 | 1255 | "<link rel=\"stylesheet\" href=\"https://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css\">\n",
|
1256 |
| - "<style>div.hololayout {\n", |
| 1256 | + "<style>div.bk-hbox {\n", |
| 1257 | + " display: flex;\n", |
| 1258 | + " justify-content: center;\n", |
| 1259 | + "}\n", |
| 1260 | + "\n", |
| 1261 | + "div.bk-hbox div.bk-plot {\n", |
| 1262 | + " padding: 8px;\n", |
| 1263 | + "}\n", |
| 1264 | + "\n", |
| 1265 | + "div.bk-hbox div.bk-data-table {\n", |
| 1266 | + " padding: 20px;\n", |
| 1267 | + "}\n", |
| 1268 | + "\n", |
| 1269 | + "div.hololayout {\n", |
1257 | 1270 | " display: flex;\n",
|
1258 | 1271 | " align-items: center;\n",
|
1259 | 1272 | " margin: 0;\n",
|
|
1346 | 1359 | " margin-left: 0.5em;\n",
|
1347 | 1360 | " margin-right: 0.5em;\n",
|
1348 | 1361 | "}\n",
|
1349 |
| - "\n", |
1350 |
| - "div.bk-hbox {\n", |
1351 |
| - " display: flex;\n", |
1352 |
| - " justify-content: center;\n", |
1353 |
| - "}\n", |
1354 |
| - "\n", |
1355 |
| - "div.bk-hbox div.bk-plot {\n", |
1356 |
| - " padding: 8px;\n", |
1357 |
| - "}\n", |
1358 |
| - "\n", |
1359 |
| - "div.bk-hbox div.bk-data-table {\n", |
1360 |
| - " padding: 20px;\n", |
1361 |
| - "}\n", |
1362 | 1362 | "</style>\n",
|
1363 | 1363 | "\n"
|
1364 | 1364 | ]
|
|
2234 | 2234 | },
|
2235 | 2235 | {
|
2236 | 2236 | "cell_type": "code",
|
2237 |
| - "execution_count": 3, |
| 2237 | + "execution_count": 4, |
2238 | 2238 | "metadata": {},
|
2239 | 2239 | "outputs": [
|
2240 | 2240 | {
|
|
2262 | 2262 | },
|
2263 | 2263 | {
|
2264 | 2264 | "cell_type": "code",
|
2265 |
| - "execution_count": 4, |
| 2265 | + "execution_count": 19, |
2266 | 2266 | "metadata": {},
|
2267 | 2267 | "outputs": [],
|
2268 | 2268 | "source": [
|
|
2762 | 2762 | "\n",
|
2763 | 2763 | "## `LYRFRAC`: Volume fraction of sediment in layer\n",
|
2764 | 2764 | "* Show stuff happening at first layer, opposite of DP_BEDLYR, not sure if it's supposed to be like that. Do thicknesses get pushed to bottom underlayers?\n",
|
2765 |
| - "* ALL next underlayers have **all zeroes** for all underlayers for all timesteps\n", |
| 2765 | + "* ALL next underlayers have **all zeros** for all underlayers for all timesteps\n", |
2766 | 2766 | "\n",
|
2767 | 2767 | "## `MSED`: Mass of sediment in layer\n",
|
2768 | 2768 | "* The mass depends on the **thickness** of the layer of course! So divide accordingly when moving transport layer into an underlayers\n",
|
|
3020 | 3020 | "# trim.LYRFRAC[last_timestep, silt, slice(-12,-2)].values = ten_stacked_underlayer_volcomp_silt"
|
3021 | 3021 | ]
|
3022 | 3022 | },
|
3023 |
| - { |
3024 |
| - "cell_type": "markdown", |
3025 |
| - "metadata": {}, |
3026 |
| - "source": [ |
3027 |
| - "# If i \"create\" underlayers, then I need to increase DP_bedlayer too!\n", |
3028 |
| - "# If i change DP_BEDLAYER i need to change DPS.isel(time=last_timestep) too\n", |
3029 |
| - "Add 5cm to all of DP_BEDLAYER, except 0th of course?\n" |
3030 |
| - ] |
3031 |
| - }, |
3032 | 3023 | {
|
3033 | 3024 | "cell_type": "code",
|
3034 | 3025 | "execution_count": 44,
|
3035 | 3026 | "metadata": {},
|
3036 | 3027 | "outputs": [],
|
3037 | 3028 | "source": [
|
3038 |
| - "# trim.DPS.isel(time=-1)\n", |
3039 |
| - "ten_by_M_by_N = trim.DP_BEDLYR.isel(time=-1, nlyrp1=slice(0,10)).shape\n", |
3040 |
| - "ten_by_M_by_N\n", |
3041 |
| - "addad_DP_BEDLYRS = np.ones(ten_by_M_by_N) * 0.05" |
| 3029 | + "# # trim.DPS.isel(time=-1)\n", |
| 3030 | + "# ten_by_M_by_N = trim.DP_BEDLYR.isel(time=-1, nlyrp1=slice(0,10)).shape\n", |
| 3031 | + "# ten_by_M_by_N\n", |
| 3032 | + "# added_DP_BEDLYRS = np.ones(ten_by_M_by_N) * 0.05" |
3042 | 3033 | ]
|
3043 | 3034 | },
|
3044 | 3035 | {
|
|
3079 | 3070 | }
|
3080 | 3071 | ],
|
3081 | 3072 | "source": [
|
3082 |
| - "(initial_silt_mass, initial_sand_mass)" |
| 3073 | + "# (initial_silt_mass, initial_sand_mass)" |
3083 | 3074 | ]
|
3084 | 3075 | },
|
3085 | 3076 | {
|
|
3203 | 3194 | }
|
3204 | 3195 | ],
|
3205 | 3196 | "source": [
|
3206 |
| - "# time=last_timestep\n", |
3207 |
| - "# 'datashade': True,\n", |
3208 |
| - "trim.MSED.isel(LSEDTOT=silt, time=-1).hvplot.quadmesh('XZ', 'YZ',\n", |
3209 |
| - " cmap='cividis',\n", |
3210 |
| - " clabel=trim.MSED.attrs['units'],\n", |
3211 |
| - "# clim=(initial_silt_mass, initial_sand_mass),\n", |
3212 |
| - " title=\"SILT\",\n", |
3213 |
| - " **plot_settings\n", |
3214 |
| - " ) + \\\n", |
3215 |
| - "trim.MSED.isel(LSEDTOT=sand, time=-1).hvplot.quadmesh('XZ', 'YZ',\n", |
3216 |
| - " cmap='cividis',\n", |
3217 |
| - " clabel=trim.MSED.attrs['units'],\n", |
3218 |
| - "# clim=(initial_silt_mass, initial_sand_mass),\n", |
3219 |
| - " title=\"SAND\",\n", |
3220 |
| - " **plot_settings\n", |
3221 |
| - " ) " |
| 3197 | + "# # time=last_timestep\n", |
| 3198 | + "# # 'datashade': True,\n", |
| 3199 | + "# trim.MSED.isel(LSEDTOT=silt, time=-1).hvplot.quadmesh('XZ', 'YZ',\n", |
| 3200 | + "# cmap='cividis',\n", |
| 3201 | + "# clabel=trim.MSED.attrs['units'],\n", |
| 3202 | + "# # clim=(initial_silt_mass, initial_sand_mass),\n", |
| 3203 | + "# title=\"SILT\",\n", |
| 3204 | + "# **plot_settings\n", |
| 3205 | + "# ) + \\\n", |
| 3206 | + "# trim.MSED.isel(LSEDTOT=sand, time=-1).hvplot.quadmesh('XZ', 'YZ',\n", |
| 3207 | + "# cmap='cividis',\n", |
| 3208 | + "# clabel=trim.MSED.attrs['units'],\n", |
| 3209 | + "# # clim=(initial_silt_mass, initial_sand_mass),\n", |
| 3210 | + "# title=\"SAND\",\n", |
| 3211 | + "# **plot_settings\n", |
| 3212 | + "# ) " |
3222 | 3213 | ]
|
3223 | 3214 | },
|
3224 | 3215 | {
|
|
3230 | 3221 | },
|
3231 | 3222 | {
|
3232 | 3223 | "cell_type": "code",
|
3233 |
| - "execution_count": 13, |
| 3224 | + "execution_count": 24, |
3234 | 3225 | "metadata": {},
|
3235 | 3226 | "outputs": [],
|
3236 | 3227 | "source": [
|
| 3228 | + "\n", |
3237 | 3229 | "zeros_interfaces_shape = trim.W.isel(time=last_timestep).shape\n",
|
3238 | 3230 | "zeros_centers_shape = trim.V1.isel(time=last_timestep).shape\n",
|
3239 | 3231 | "\n",
|
3240 |
| - "all_zeroes_centers = np.zeros(zeros_centers_shape)\n", |
3241 |
| - "all_zeroes_interfaces = np.zeros(zeros_interfaces_shape)\n", |
| 3232 | + "all_zeros_centers = np.zeros(zeros_centers_shape)\n", |
| 3233 | + "all_zeros_interfaces = np.zeros(zeros_interfaces_shape)\n", |
| 3234 | + "\n", |
| 3235 | + "trim['V1'][last_timestep] = all_zeros_centers \n", |
| 3236 | + "trim['U1'][last_timestep] = all_zeros_centers\n", |
| 3237 | + "trim['WPHY'][last_timestep] = all_zeros_centers\n", |
| 3238 | + "trim['W'][last_timestep] = all_zeros_interfaces\n", |
| 3239 | + "\n", |
| 3240 | + "trim['VICWW'][last_timestep] = all_zeros_interfaces # Vertical eddy viscosity-3D\n", |
| 3241 | + "trim['DICWW'][last_timestep] = all_zeros_interfaces # Vertical eddy diffusivity-3D\n", |
| 3242 | + "trim['VICUV'][last_timestep] = all_zeros_centers # Horizontal eddy viscosity\n", |
| 3243 | + "trim['VICWW'][last_timestep] = all_zeros_interfaces # Vertical eddy viscosity-3D " |
| 3244 | + ] |
| 3245 | + }, |
| 3246 | + { |
| 3247 | + "cell_type": "code", |
| 3248 | + "execution_count": 17, |
| 3249 | + "metadata": {}, |
| 3250 | + "outputs": [ |
| 3251 | + { |
| 3252 | + "data": { |
| 3253 | + "text/plain": [ |
| 3254 | + "(132, 182)" |
| 3255 | + ] |
| 3256 | + }, |
| 3257 | + "execution_count": 17, |
| 3258 | + "metadata": {}, |
| 3259 | + "output_type": "execute_result" |
| 3260 | + } |
| 3261 | + ], |
| 3262 | + "source": [ |
| 3263 | + "water_level_shape = trim.S1.isel(time=0).shape\n", |
| 3264 | + "reset_water_level = np.zeros(water_level_shape)\n", |
| 3265 | + "\n", |
| 3266 | + "trim['S1'][last_timestep] = reset_water_level" |
| 3267 | + ] |
| 3268 | + }, |
| 3269 | + { |
| 3270 | + "cell_type": "code", |
| 3271 | + "execution_count": 16, |
| 3272 | + "metadata": {}, |
| 3273 | + "outputs": [ |
| 3274 | + { |
| 3275 | + "data": { |
| 3276 | + "text/plain": [ |
| 3277 | + "(191, 2, 81, 132, 182)" |
| 3278 | + ] |
| 3279 | + }, |
| 3280 | + "execution_count": 16, |
| 3281 | + "metadata": {}, |
| 3282 | + "output_type": "execute_result" |
| 3283 | + } |
| 3284 | + ], |
| 3285 | + "source": [ |
| 3286 | + "turb_shape = trim.RTUR1.shape\n", |
| 3287 | + "reset_turb = np.zeros(turb_shape)\n", |
3242 | 3288 | "\n",
|
3243 |
| - "trim['V1'][last_timestep] = all_zeroes_centers\n", |
3244 |
| - "trim['U1'][last_timestep] = all_zeroes_centers\n", |
3245 |
| - "trim['WPHY'][last_timestep] = all_zeroes_centers\n", |
3246 |
| - "trim['W'][last_timestep] = all_zeroes_interfaces" |
| 3289 | + "trim['RTUR1'][last_timestep] = reset_turb" |
3247 | 3290 | ]
|
3248 | 3291 | },
|
3249 | 3292 | {
|
|
0 commit comments