Skip to content

Commit edb50ed

Browse files
committed
Fix various small typpos
1 parent 52946b3 commit edb50ed

File tree

4 files changed

+78
-73
lines changed

4 files changed

+78
-73
lines changed

Chapter00_basic_python.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@
10721072
"ax.gridlines(draw_labels=True, linestyle='--')\n",
10731073
"\n",
10741074
"# == new code ==\n",
1075-
"im = ax.pcolormesh(lon_b, lat_b, A)"
1075+
"ax.pcolormesh(lon_b, lat_b, A)"
10761076
]
10771077
},
10781078
{
@@ -1082,7 +1082,7 @@
10821082
"Finally, we do some minor fixes:\n",
10831083
"- Show the entire world by `ax.set_global()`.\n",
10841084
"- Add colorbar\n",
1085-
"- Save the figure a PNG file"
1085+
"- Save the figure as a PNG file"
10861086
]
10871087
},
10881088
{
@@ -1133,7 +1133,7 @@
11331133
"name": "stdout",
11341134
"output_type": "stream",
11351135
"text": [
1136-
"my-first-cartopy-plot.png\r\n"
1136+
"my-first-cartopy-plot.png\n"
11371137
]
11381138
}
11391139
],

Chapter01_NetCDF_xarray.ipynb

Lines changed: 42 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -575,40 +575,40 @@
575575
"name": "stdout",
576576
"output_type": "stream",
577577
"text": [
578-
"netcdf O3_in_ppbv {\r\n",
579-
"dimensions:\r\n",
580-
"\ttime = 1 ;\r\n",
581-
"\tlev = 47 ;\r\n",
582-
"\tlat = 46 ;\r\n",
583-
"\tlon = 72 ;\r\n",
584-
"variables:\r\n",
585-
"\tfloat time(time) ;\r\n",
586-
"\t\ttime:_FillValue = NaNf ;\r\n",
587-
"\t\ttime:long_name = \"Time\" ;\r\n",
588-
"\t\ttime:axis = \"T\" ;\r\n",
589-
"\t\ttime:delta_t = \"0000-00-00 00:00:00\" ;\r\n",
590-
"\t\ttime:units = \"hours since 1985-01-01\" ;\r\n",
591-
"\t\ttime:calendar = \"gregorian\" ;\r\n",
592-
"\tfloat lev(lev) ;\r\n",
593-
"\t\tlev:_FillValue = NaNf ;\r\n",
594-
"\t\tlev:long_name = \"Eta Centers\" ;\r\n",
595-
"\t\tlev:units = \"sigma_level\" ;\r\n",
596-
"\t\tlev:positive = \"up\" ;\r\n",
597-
"\t\tlev:axis = \"Z\" ;\r\n",
598-
"\tfloat lat(lat) ;\r\n",
599-
"\t\tlat:_FillValue = NaNf ;\r\n",
600-
"\t\tlat:long_name = \"Latitude\" ;\r\n",
601-
"\t\tlat:units = \"degrees_north\" ;\r\n",
602-
"\t\tlat:axis = \"Y\" ;\r\n",
603-
"\tfloat lon(lon) ;\r\n",
604-
"\t\tlon:_FillValue = NaNf ;\r\n",
605-
"\t\tlon:long_name = \"Longitude\" ;\r\n",
606-
"\t\tlon:units = \"degrees_east\" ;\r\n",
607-
"\t\tlon:axis = \"X\" ;\r\n",
608-
"\tfloat TRC_O3(time, lev, lat, lon) ;\r\n",
609-
"\t\tTRC_O3:_FillValue = NaNf ;\r\n",
610-
"\t\tTRC_O3:units = \"ppbv\" ;\r\n",
611-
"}\r\n"
578+
"netcdf O3_in_ppbv {\n",
579+
"dimensions:\n",
580+
"\ttime = 1 ;\n",
581+
"\tlev = 47 ;\n",
582+
"\tlat = 46 ;\n",
583+
"\tlon = 72 ;\n",
584+
"variables:\n",
585+
"\tfloat time(time) ;\n",
586+
"\t\ttime:_FillValue = NaNf ;\n",
587+
"\t\ttime:long_name = \"Time\" ;\n",
588+
"\t\ttime:axis = \"T\" ;\n",
589+
"\t\ttime:delta_t = \"0000-00-00 00:00:00\" ;\n",
590+
"\t\ttime:units = \"hours since 1985-01-01\" ;\n",
591+
"\t\ttime:calendar = \"gregorian\" ;\n",
592+
"\tfloat lev(lev) ;\n",
593+
"\t\tlev:_FillValue = NaNf ;\n",
594+
"\t\tlev:long_name = \"Eta Centers\" ;\n",
595+
"\t\tlev:units = \"sigma_level\" ;\n",
596+
"\t\tlev:positive = \"up\" ;\n",
597+
"\t\tlev:axis = \"Z\" ;\n",
598+
"\tfloat lat(lat) ;\n",
599+
"\t\tlat:_FillValue = NaNf ;\n",
600+
"\t\tlat:long_name = \"Latitude\" ;\n",
601+
"\t\tlat:units = \"degrees_north\" ;\n",
602+
"\t\tlat:axis = \"Y\" ;\n",
603+
"\tfloat lon(lon) ;\n",
604+
"\t\tlon:_FillValue = NaNf ;\n",
605+
"\t\tlon:long_name = \"Longitude\" ;\n",
606+
"\t\tlon:units = \"degrees_east\" ;\n",
607+
"\t\tlon:axis = \"X\" ;\n",
608+
"\tfloat TRC_O3(time, lev, lat, lon) ;\n",
609+
"\t\tTRC_O3:_FillValue = NaNf ;\n",
610+
"\t\tTRC_O3:units = \"ppbv\" ;\n",
611+
"}\n"
612612
]
613613
}
614614
],
@@ -1045,7 +1045,7 @@
10451045
"name": "stdout",
10461046
"output_type": "stream",
10471047
"text": [
1048-
"Ozone.png\r\n"
1048+
"Ozone.png\n"
10491049
]
10501050
}
10511051
],
@@ -1243,7 +1243,9 @@
12431243
"interact(plot_layer, \n",
12441244
" var=SelectionSlider(options=varnames, continuous_update=False), \n",
12451245
" l=IntSlider(min=0, max=46, step=1, continuous_update=False),\n",
1246-
" );"
1246+
" );\n",
1247+
"\n",
1248+
"# Disable `continuous_update` so the figure is only updated after you release the mouse. This reduces computing burden."
12471249
]
12481250
},
12491251
{
@@ -1543,7 +1545,10 @@
15431545
"source": [
15441546
"Now you know how to use xarray to explore NetCDF data, in a really efficient way.\n",
15451547
"\n",
1546-
"This is the longest and the most important chapter. With the knowledge of xarray, the next chapter will be quite easy: [Chapter02_NC_and_bpch_diagnostics.ipynb](./Chapter02_NC_and_bpch_diagnostics.ipynb)"
1548+
"This is the longest and the most important chapter. With the knowledge of xarray, you can easily understand the next two chapters (they don't need to be read in order):\n",
1549+
"\n",
1550+
"- [Chapter02_NC_and_bpch_diagnostics.ipynb](./Chapter02_NC_and_bpch_diagnostics.ipynb).\n",
1551+
"- [Chapter03_regridding.ipynb](./Chapter03_regridding.ipynb)"
15471552
]
15481553
}
15491554
],

Chapter03_regridding.ipynb

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"One of the most difficult thing in Earth science data processing is regridding. But it is no longer difficult with the [xESMF](http://xesmf.readthedocs.io) package I wrote.\n",
1717
"\n",
1818
"\n",
19-
"**Windows users** [need some additional tricks](http://xesmf.readthedocs.io/en/latest/installation.html#notes-for-windows-users) in order to use xESMF on your local machine. Besides the Binder cloud, using a Linux server might be the easiest way. If you don't have a Linux server at all, try my [GEOS-Chem on cloud project](http://cloud-gc.readthedocs.io/) "
19+
"**Windows users** [need some additional tricks](http://xesmf.readthedocs.io/en/latest/installation.html#notes-for-windows-users) in order to use xESMF on your local computer. Besides the Binder cloud, using a Linux server might be the easiest way. If you don't have a Linux server at all, try my [GEOS-Chem on cloud project](http://cloud-gc.readthedocs.io/) "
2020
]
2121
},
2222
{
@@ -326,7 +326,7 @@
326326
"source": [
327327
"`bilinear` is not the best algorithm for regridding tracer field since it does not conserve total mass. A better algorithm is `conservative`.\n",
328328
"\n",
329-
"To use `conservative` regridding, you need to specify the cell boundaries, since the boundary information is needed for calculating overlapping areas (thus ensures total mass conservation). Boundary positions cannot be automatically computed from cell center positions, due to many edges cases (e.g. GEOS-Chem's half-polar cells, GCHP's cubed-sphere grids), so it is safer to re-calculate it manually! "
329+
"To use `conservative` regridding, you need to specify the cell boundaries, since the boundary information is needed for calculating overlapping areas (thus ensures total mass conservation). Boundary positions cannot be automatically computed from cell center positions, due to many special cases (e.g. GEOS-Chem's half-polar cells, GCHP's cubed-sphere grids), so it is safer to re-calculate it manually! "
330330
]
331331
},
332332
{
@@ -688,36 +688,36 @@
688688
"name": "stdout",
689689
"output_type": "stream",
690690
"text": [
691-
"netcdf regridded_nested_NA {\r\n",
692-
"dimensions:\r\n",
693-
"\tlon = 161 ;\r\n",
694-
"\tlat = 121 ;\r\n",
695-
"\ttime = 1 ;\r\n",
696-
"\tlev = 47 ;\r\n",
697-
"variables:\r\n",
698-
"\tdouble lon(lon) ;\r\n",
699-
"\t\tlon:_FillValue = NaN ;\r\n",
700-
"\tdouble lat(lat) ;\r\n",
701-
"\t\tlat:_FillValue = NaN ;\r\n",
702-
"\tfloat time(time) ;\r\n",
703-
"\t\ttime:_FillValue = NaNf ;\r\n",
704-
"\t\ttime:long_name = \"Time\" ;\r\n",
705-
"\t\ttime:axis = \"T\" ;\r\n",
706-
"\t\ttime:delta_t = \"0000-00-00 00:00:00\" ;\r\n",
707-
"\t\ttime:units = \"hours since 1985-01-01\" ;\r\n",
708-
"\t\ttime:calendar = \"gregorian\" ;\r\n",
709-
"\tfloat lev(lev) ;\r\n",
710-
"\t\tlev:_FillValue = NaNf ;\r\n",
711-
"\t\tlev:long_name = \"Eta Centers\" ;\r\n",
712-
"\t\tlev:units = \"sigma_level\" ;\r\n",
713-
"\t\tlev:positive = \"up\" ;\r\n",
714-
"\t\tlev:axis = \"Z\" ;\r\n",
715-
"\tdouble TRC_NO(time, lev, lat, lon) ;\r\n",
716-
"\t\tTRC_NO:_FillValue = NaN ;\r\n",
717-
"\t\tTRC_NO:regrid_method = \"conservative\" ;\r\n",
718-
"\tdouble TRC_O3(time, lev, lat, lon) ;\r\n",
719-
"\t\tTRC_O3:_FillValue = NaN ;\r\n",
720-
"\t\tTRC_O3:regrid_method = \"conservative\" ;\r\n"
691+
"netcdf regridded_nested_NA {\n",
692+
"dimensions:\n",
693+
"\tlon = 161 ;\n",
694+
"\tlat = 121 ;\n",
695+
"\ttime = 1 ;\n",
696+
"\tlev = 47 ;\n",
697+
"variables:\n",
698+
"\tdouble lon(lon) ;\n",
699+
"\t\tlon:_FillValue = NaN ;\n",
700+
"\tdouble lat(lat) ;\n",
701+
"\t\tlat:_FillValue = NaN ;\n",
702+
"\tfloat time(time) ;\n",
703+
"\t\ttime:_FillValue = NaNf ;\n",
704+
"\t\ttime:long_name = \"Time\" ;\n",
705+
"\t\ttime:axis = \"T\" ;\n",
706+
"\t\ttime:delta_t = \"0000-00-00 00:00:00\" ;\n",
707+
"\t\ttime:units = \"hours since 1985-01-01\" ;\n",
708+
"\t\ttime:calendar = \"gregorian\" ;\n",
709+
"\tfloat lev(lev) ;\n",
710+
"\t\tlev:_FillValue = NaNf ;\n",
711+
"\t\tlev:long_name = \"Eta Centers\" ;\n",
712+
"\t\tlev:units = \"sigma_level\" ;\n",
713+
"\t\tlev:positive = \"up\" ;\n",
714+
"\t\tlev:axis = \"Z\" ;\n",
715+
"\tdouble TRC_NO(time, lev, lat, lon) ;\n",
716+
"\t\tTRC_NO:_FillValue = NaN ;\n",
717+
"\t\tTRC_NO:regrid_method = \"conservative\" ;\n",
718+
"\tdouble TRC_O3(time, lev, lat, lon) ;\n",
719+
"\t\tTRC_O3:_FillValue = NaN ;\n",
720+
"\t\tTRC_O3:regrid_method = \"conservative\" ;\n"
721721
]
722722
}
723723
],

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ To be used for the workshop at the [GEOS-Chem Asia Meeting](http://acmg.seas.har
2525

2626
If the page is loaded successfully, you should see a [Jupyter notebook](https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/What%20is%20the%20Jupyter%20Notebook.html) interface. Then, click on the first notebook to get started. Jupyter combines Python code, execution results, plots, custom texts, and even Latex formulas in a single page. Besides using the Jupyter program, you can also view the static notebook on GitHub (e.g [the first notebook](./Chapter00_basic_python.ipynb)).
2727

28-
The [official doc](https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Notebook%20Basics.html) contains very clear instructions on using Jupyter for interactive computing. The most important command is `Shift+Enter` to execute the current code block.
28+
Please follow [Jupyter official doc](https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Notebook%20Basics.html) to learn basic operations. The most important command is `Shift+Enter` to execute the current code block.
2929

3030
## Install on your own computer
3131

0 commit comments

Comments
 (0)