|
19 | 19 | "\n", |
20 | 20 | "ECCOv4 uses the $z^*$ coordinate system in which the depth of the vertical coordinate, $z^*$ varies with time as:\n", |
21 | 21 | "\n", |
22 | | - "$$ z^* = \\frac{z - \\eta(x,y,t)}{H(x,y) + \\eta(x,y,t)} H(x,y)$$\n", |
| 22 | + "\\begin{equation}\n", |
| 23 | + "z^* = \\frac{z - \\eta(x,y,t)}{H(x,y) + \\eta(x,y,t)} H(x,y)\n", |
| 24 | + "\\end{equation}\n", |
23 | 25 | "\n", |
24 | 26 | "With $H$ being the model depth, $\\eta$ being the model sea level anomaly, and $z$ being depth.\n", |
25 | 27 | "\n", |
|
48 | 50 | "\n", |
49 | 51 | "To make budget calculations easier we provide the scaled velocities quantities ``UVELMASS`` and ``VVELMASS``,\n", |
50 | 52 | "\n", |
51 | | - "\\begin{equation}\n", |
| 53 | + "\\begin{align}\n", |
52 | 54 | "\\mathit{UVELMASS}(x,y,k) = \\mathit{UVEL}(x,y,k) \\times \\mathit{hFacW}(x,y,k) \\times s^{*}(x,y,k,t)\n", |
53 | | - "\\end{equation}\n", |
| 55 | + "\\end{align}\n", |
54 | 56 | "and \n", |
55 | | - "\\begin{equation}\n", |
| 57 | + "\\begin{align}\n", |
56 | 58 | "\\mathit{VVELMASS}(x,y,k) = \\mathit{VVEL}(x,y,k) \\times \\mathit{hFacS}(x,y,k) \\times s^{*}(x,y,k,t)\n", |
57 | | - "\\end{equation}\n", |
| 59 | + "\\end{align}\n", |
58 | 60 | "\n", |
59 | | - "> **Note:** The word **mass** in ``UVELMASS`` and ``VVELMASS`` is confusing since there is no mass involved here. Think of these terms as simply being ``UVEL`` and ``VVEL`` multiplied by the scaled grid cell area fraction.\n", |
| 61 | + "It is worth noting that the word **mass** in ``UVELMASS`` and ``VVELMASS`` is confusing since there is no mass involved here. Think of these terms as simply being ``UVEL`` and ``VVEL`` multiplied by the fraction of the grid cell height that is open grid cell face across which the volume transport occurs. Partial cell bathymetry can make this fraction (hFacW, hFacS) less than one, and the $s^*$ scaling factor further adjusts this fraction higher or lower through time.\n", |
60 | 62 | "\n", |
61 | 63 | "Fully closing the budget requires the vertical volume fluxes across the top and bottom 'w' faces of the grid cell and surface freshwater fluxes. Regarding vertical volume fluxes, there are no $s^*$ or ``hFac`` equivalent scaling factors that modify our top and bottom grid cell areas. Therefore, vertical volume fluxes through 'w' faces are simply:\n", |
62 | 64 | "\n", |
|
136 | 138 | }, |
137 | 139 | { |
138 | 140 | "cell_type": "code", |
139 | | - "execution_count": 2, |
| 141 | + "execution_count": 62, |
140 | 142 | "metadata": {}, |
141 | 143 | "outputs": [], |
142 | 144 | "source": [ |
|
145 | 147 | "\n", |
146 | 148 | "## needed to convert surface mass fluxes to volume fluxes\n", |
147 | 149 | "\n", |
148 | | - "# lat/lon resolution in degrees to interpolate the model fields for the purposes of plotting\n", |
| 150 | + "# lat/lon resolution in degrees to interpolate the model \n", |
| 151 | + "# fields for the purposes of plotting\n", |
149 | 152 | "map_dx = .2\n", |
150 | 153 | "map_dy = .2" |
151 | 154 | ] |
|
235 | 238 | "\n", |
236 | 239 | "# load one extra year worth of snapshots\n", |
237 | 240 | "ecco_monthly_snaps = ecco.recursive_load_ecco_var_from_years_nc(data_dir, \\\n", |
238 | | - " vars_to_load=['ETAN'],\\\n", |
239 | | - " years_to_load=range(year_start, year_end+1)).load()\n", |
| 241 | + " vars_to_load=['ETAN'],\\\n", |
| 242 | + " years_to_load=range(year_start, year_end+1)).load()\n", |
240 | 243 | "\n", |
241 | 244 | "num_months = len(ecco_monthly_snaps.time.values)\n", |
242 | 245 | "# drop the last 11 months so that we have one snapshot at the beginning and end of each month within the \n", |
|
278 | 281 | ], |
279 | 282 | "source": [ |
280 | 283 | "# find the record of the last ETAN snapshot\n", |
281 | | - "last_record_date = ecco.extract_yyyy_mm_dd_hh_mm_ss_from_datetime64(ecco_monthly_snaps.time[-1].values)\n", |
| 284 | + "last_record_date = \n", |
| 285 | + " ecco.extract_yyyy_mm_dd_hh_mm_ss_from_datetime64(ecco_monthly_snaps.time[-1].values)\n", |
282 | 286 | "print(last_record_date)\n", |
283 | 287 | "last_record_year = last_record_date[0]" |
284 | 288 | ] |
|
768 | 772 | " cmin=-1, cmax=1, \\\n", |
769 | 773 | " cmap=cmocean.cm.balance, user_lon_0=-67,\\\n", |
770 | 774 | " dx=map_dx,dy=map_dy);\n", |
| 775 | + "\n", |
771 | 776 | "plt.title('Actual $\\Delta \\eta$ [m]', fontsize=20);" |
772 | 777 | ] |
773 | 778 | }, |
|
857 | 862 | " cmin=-1e-7, cmax=1e-7,\\\n", |
858 | 863 | " cmap=cmocean.cm.balance, user_lon_0=-67,\\\n", |
859 | 864 | " dx=map_dx,dy=map_dy);\n", |
| 865 | + "\n", |
860 | 866 | "plt.title('$\\partial \\eta / \\partial t$ [m/s] during ' + \n", |
861 | 867 | " str(tmp[0]) +'/' + str(tmp[1]), fontsize=20);" |
862 | 868 | ] |
|
1729 | 1735 | "plt.grid()\n", |
1730 | 1736 | "\n", |
1731 | 1737 | "plt.subplots_adjust(hspace = .5, wspace=.2)\n", |
1732 | | - "plt.suptitle('Volume Budget for one Arctic Ocean point',fontsize=20);" |
| 1738 | + "plt.suptitle('Volume Budget for one Arctic Ocean point',\n", |
| 1739 | + " fontsize=20);" |
1733 | 1740 | ] |
1734 | 1741 | }, |
1735 | 1742 | { |
|
1803 | 1810 | "area_masked = ecco_grid.rA.where(ecco_grid.maskC.isel(k=0) == 1)\n", |
1804 | 1811 | "\n", |
1805 | 1812 | "dETA_per_month_predicted_from_surf_fluxes = \\\n", |
1806 | | - " ((G_surf_fluxes * area_masked).sum(dim=('i','j','tile'))/area_masked.sum())*secs_per_month\n", |
| 1813 | + " ((G_surf_fluxes * area_masked).sum(dim=('i','j','tile')) / \n", |
| 1814 | + " area_masked.sum())*secs_per_month\n", |
1807 | 1815 | "\n", |
1808 | 1816 | "ETA_predicted_by_surf_fluxes = \\\n", |
1809 | 1817 | " np.cumsum(dETA_per_month_predicted_from_surf_fluxes.values)\n", |
1810 | 1818 | "\n", |
1811 | | - "ETA_from_ETAN = (ecco_monthly_snaps.ETAN * area_masked).sum(dim=('i','j','tile'))/ area_masked.sum()\n", |
| 1819 | + "ETA_from_ETAN = \n", |
| 1820 | + " (ecco_monthly_snaps.ETAN * area_masked).sum(dim=('i','j','tile')) /\n", |
| 1821 | + " area_masked.sum()\n", |
1812 | 1822 | "\n", |
1813 | 1823 | "# plotting\n", |
1814 | 1824 | "plt.figure(figsize=(14,5));\n", |
|
1819 | 1829 | "plt.grid()\n", |
1820 | 1830 | "plt.ylabel('global mean $\\eta$');\n", |
1821 | 1831 | "plt.legend(('predicted', 'actual'));\n", |
1822 | | - "plt.title('$\\eta(t)$ as predicted from net surface fluxes and model ETAN [m]', fontsize=20);" |
| 1832 | + "plt.title('$\\eta(t)$ as predicted from net surface fluxes and model ETAN [m]', \n", |
| 1833 | + " fontsize=20);" |
1823 | 1834 | ] |
1824 | 1835 | }, |
1825 | 1836 | { |
1826 | 1837 | "cell_type": "markdown", |
1827 | 1838 | "metadata": {}, |
1828 | 1839 | "source": [ |
1829 | | - "> **Note:** the first predicted $\\eta$ occurs at the end of the first month (one month time integral of $\\partial \\eta / \\partial t$. The first *actual* $\\eta$ is set to be zero.\n", |
| 1840 | + "The first predicted $\\eta$ occurs at the end of the first month (one month time integral of $\\partial \\eta / \\partial t$. The first *actual* $\\eta$ is set to be zero.\n", |
1830 | 1841 | "\n", |
1831 | 1842 | "The above plot is another way of confirming that in our Boussinesq model the only term that can change global mean model sea level anomaly $\\eta$ is net surface freshwater flux. To account for changes in global mean density we must apply the Greatbatch correction, inverse-barometer correction, and a correction term to account for the fact that sea-ice does not 'float' on top of the ocean but in fact displaces seawater upwards. All of these corrections are made for the term ``SSH``, dynamic sea surface height anomaly (not shown here)." |
1832 | 1843 | ] |
|
1881 | 1892 | " 1000*(annual_mean_GMSL_due_to_mass_fluxes.values[12:num_years]-.017), \\\n", |
1882 | 1893 | " color='k')\n", |
1883 | 1894 | "plt.grid()\n", |
1884 | | - "plt.xticks(np.arange(2005, annual_mean_GMSL_due_to_mass_fluxes.year.values[-1]+1,step=1));\n", |
| 1895 | + "plt.xticks(np.arange(2005, \n", |
| 1896 | + " annual_mean_GMSL_due_to_mass_fluxes.year.values[-1]+1,step=1));\n", |
1885 | 1897 | "plt.title('Sea level (mm) caused by mass fluxes');" |
1886 | 1898 | ] |
1887 | 1899 | }, |
|
0 commit comments