-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: remove legacy template file #604
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -290,22 +290,26 @@ def dist_approx(lat1, lon1, lat2, lon2, log=False, normalize=True, | |
If False, assume that all longitudinal values lie within a single interval of size 360 | ||
(e.g., between -180 and 180, or between 0 and 360) and such that the shortest path between | ||
any two points does not cross the antimeridian according to that parametrization. If True, | ||
a suitable interval is determined using `lon_bounds` and the longitudinal values are | ||
reparametrized accordingly using `lon_normalize`. Note that this option has no effect when | ||
using the "geosphere" method because it is independent from the parametrization. | ||
Default: True | ||
a suitable interval is determined using :py:func:`lon_bounds` and the longitudinal values | ||
are reparametrized accordingly using :py:func:`lon_normalize`. Note that this option has | ||
no effect when using the "geosphere" method because it is independent from the | ||
parametrization. Default: True | ||
method : str, optional | ||
Specify an approximation method to use: | ||
* "equirect": Distance according to sinusoidal projection. Fast, but inaccurate for | ||
large distances and high latitudes. | ||
* "geosphere": Exact spherical distance. Much more accurate at all distances, but slow. | ||
|
||
* "equirect": Distance according to sinusoidal projection. Fast, but inaccurate for | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is unrelated to the main issue in this PR. Correcting indentation and adding empty lines before and after bullet lists fixes a few sphinx warnings. |
||
large distances and high latitudes. | ||
* "geosphere": Exact spherical distance. Much more accurate at all distances, but slow. | ||
|
||
Note that ellipsoidal distances would be even more accurate, but are currently not | ||
implemented. Default: "equirect". | ||
units : str, optional | ||
Specify a unit for the distance. One of: | ||
* "km": distance in km. | ||
* "degree": angular distance in decimal degrees. | ||
* "radian": angular distance in radians. | ||
|
||
* "km": distance in km. | ||
* "degree": angular distance in decimal degrees. | ||
* "radian": angular distance in radians. | ||
|
||
Default: "km". | ||
|
||
Returns | ||
|
@@ -373,14 +377,12 @@ def compute_geodesic_lengths(gdf): | |
|
||
See also | ||
-------- | ||
* dist_approx() which also offers haversine distance calculation options | ||
between specific points (not along any geometries however). | ||
* interpolation.interpolate_lines() | ||
:py:func:`dist_approx` : distance between individual lat/lon-points | ||
|
||
Note | ||
---- | ||
This implementation relies on non-projected (i.e. geographic coordinate | ||
systems that span the entire globe) crs only, which results in | ||
systems that span the entire globe) CRS only, which results in | ||
sea-level distances and hence a certain (minor) level of distortion; cf. | ||
https://gis.stackexchange.com/questions/176442/what-is-the-real-distance-between-positions | ||
""" | ||
|
@@ -393,10 +395,11 @@ def compute_geodesic_lengths(gdf): | |
|
||
def get_gridcellarea(lat, resolution=0.5, unit='ha'): | ||
"""The area covered by a grid cell is calculated depending on the latitude | ||
1 degree = ONE_LAT_KM (111.12km at the equator) | ||
longitudal distance in km = ONE_LAT_KM*resolution*cos(lat) | ||
latitudal distance in km = ONE_LAT_KM*resolution | ||
area = longitudal distance * latitudal distance | ||
|
||
* 1 degree = ONE_LAT_KM (111.12km at the equator) | ||
* longitudal distance in km = ONE_LAT_KM*resolution*cos(lat) | ||
* latitudal distance in km = ONE_LAT_KM*resolution | ||
* area = longitudal distance * latitudal distance | ||
|
||
Parameters | ||
---------- | ||
|
@@ -406,7 +409,6 @@ def get_gridcellarea(lat, resolution=0.5, unit='ha'): | |
raster resolution in degree (default: 0.5 degree) | ||
unit: string, optional | ||
unit of the output area (default: ha, alternatives: m2, km2) | ||
|
||
""" | ||
|
||
if unit == 'm2': | ||
|
@@ -1490,9 +1492,8 @@ def get_admin1_info(country_names): | |
---------- | ||
country_names : list or str | ||
string or list with strings, either ISO code or names of countries, e.g.: | ||
['ZWE', 'GBR', 'VNM', 'UZB', 'Kenya', '051'] | ||
For example, for Armenia, the following inputs work: | ||
'Armenia', 'ARM', 'AM', '051', 51 | ||
``['ZWE', 'GBR', 'VNM', 'UZB', 'Kenya', '051']`` For example, for Armenia, all of the | ||
following inputs work: ``'Armenia', 'ARM', 'AM', '051', 51`` | ||
|
||
Returns | ||
------- | ||
|
@@ -1549,11 +1550,9 @@ def get_admin1_geometries(countries): | |
Parameters | ||
---------- | ||
countries : list or str or int | ||
string or list containing strings, either ISO3 code or ISO2 code or names | ||
names of countries, e.g.: | ||
['ZWE', 'GBR', 'VNM', 'UZB', 'Kenya', '051'] | ||
For example, for Armenia, the following inputs work: | ||
'Armenia', 'ARM', 'AM', '051', 51 | ||
string or list with strings, either ISO code or names of countries, e.g.: | ||
``['ZWE', 'GBR', 'VNM', 'UZB', 'Kenya', '051']`` For example, for Armenia, all of the | ||
following inputs work: ``'Armenia', 'ARM', 'AM', '051', 51`` | ||
|
||
Returns | ||
------- | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,14 +9,6 @@ climada\.util\.api\_client module | |
:undoc-members: | ||
:show-inheritance: | ||
|
||
climada\.util\.cached module | ||
---------------------------- | ||
|
||
.. automodule:: climada.util.cached | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Comment on lines
-12
to
-19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This submodule doesn't exist, hence we can remove the reference from the docs. |
||
climada\.util\.checker module | ||
----------------------------- | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,7 +179,7 @@ | |
"source": [ | ||
"### Gitflow works on the `develop` branch instead of `main`\n", | ||
"\n", | ||
"\n", | ||
"\n", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fixes an error/warning output of sphinx. |
||
"\n", | ||
"- The critical difference between Gitflow and 'standard' git is that almost all of your work takes place on the `develop` branch, instead of the `main` (formerly `master`) branch.\n", | ||
"- The `main` branch is reserved for planned, stable product releases, and it's what the general public download when they install CLIMADA. The developers almost never interact with it." | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unrelated to the main issue in this PR. I was curious to test cross-references in docstrings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... which doesn't make anything, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before:


After:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course it does! Sorry. (I looked at the wrong tab 🙄)