From b766cd3d0dfef85ed012d51fe0d48e260338d9eb Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 13:42:07 -0800 Subject: [PATCH 01/23] test $ for latex --- docs/source/user_guide.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index fa9966e321..3ee95ecd50 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -2,6 +2,9 @@ User guide =============== +When $a \ne 0$, there are two solutions to $(ax^2 + bx + c = 0)$ and they are +$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$ + Generalization -------------- From 10c6f94d66eebf0e1a95d78c8f98642d0a571471 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 13:44:06 -0800 Subject: [PATCH 02/23] test \ for latex --- docs/source/user_guide.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index 3ee95ecd50..0025af1833 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -2,7 +2,7 @@ User guide =============== -When $a \ne 0$, there are two solutions to $(ax^2 + bx + c = 0)$ and they are +When $a \\ne 0$, there are two solutions to $(ax^2 + bx + c = 0)$ and they are $$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$ Generalization From 16aa54f5fd42a453b7ef48be20a8085beaad7dce Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 14:53:12 -0800 Subject: [PATCH 03/23] fix code block --- docs/source/user_guide.rst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index 0025af1833..e159f51e56 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -2,9 +2,6 @@ User guide =============== -When $a \\ne 0$, there are two solutions to $(ax^2 + bx + c = 0)$ and they are -$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$ - Generalization -------------- @@ -54,7 +51,7 @@ The x-indices require an additional step. First, calculate the Let_To_Num field Expression: LetToNum(!Columns!) -Code Block:: +.. Code Block:: python def LetToNum(feat): letters = list(feat) From 039e14b9d389e440145cb55e9b2a884d55c3d131 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 14:55:32 -0800 Subject: [PATCH 04/23] fix code block --- docs/source/user_guide.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index e159f51e56..c2f655e013 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -52,7 +52,6 @@ Expression: LetToNum(!Columns!) .. Code Block:: python - def LetToNum(feat): letters = list(feat) if len(letters) == 1: @@ -65,8 +64,9 @@ LetToNum(!Columns!) Then, calculate the X indices much the same as the Y indices. -Second_Index_X = 32 * !Let_To_Num! -First_Index_X = !Second_Index_X! - 31 +.. Code Block:: python + Second_Index_X = 32 * !Let_To_Num! + First_Index_X = !Second_Index_X! - 31 The attribute table should then be exported to an Excel file using the "Table to Table" tool, and the rest of the indexing will be done in Excel. From 5acbe51da55745469ef236f7c63b31606e26665a Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 14:56:48 -0800 Subject: [PATCH 05/23] fix code block --- docs/source/user_guide.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index c2f655e013..4f14644968 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -51,7 +51,12 @@ The x-indices require an additional step. First, calculate the Let_To_Num field Expression: LetToNum(!Columns!) -.. Code Block:: python +.. code-block:: python + import cerf + sample_config = cerf.load_sample_config(yr=2010) + + +.. code-block:: python def LetToNum(feat): letters = list(feat) if len(letters) == 1: From 2438a1df3bb54385923989af26feeb7fad2032b4 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 14:59:35 -0800 Subject: [PATCH 06/23] fix code block --- docs/source/user_guide.rst | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index 4f14644968..5e186f93f3 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -52,20 +52,21 @@ Expression: LetToNum(!Columns!) .. code-block:: python + import cerf - sample_config = cerf.load_sample_config(yr=2010) + sample_config = cerf.load_sample_config(yr=2010) .. code-block:: python - def LetToNum(feat): - letters = list(feat) - if len(letters) == 1: - number = ord(letters[0]) - 64 - elif letters[0] == 'A': - number = 26 + ord(letters[1]) - 64 - else: - number = 52 + ord(letters[1]) - 64 - return number + def LetToNum(feat): + letters = list(feat) + if len(letters) == 1: + number = ord(letters[0]) - 64 + elif letters[0] == 'A': + number = 26 + ord(letters[1]) - 64 + else: + number = 52 + ord(letters[1]) - 64 + return number Then, calculate the X indices much the same as the Y indices. From b75a7bba3a440c2762ca5220f0e1a43194212d2e Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:00:24 -0800 Subject: [PATCH 07/23] fix code block --- docs/source/user_guide.rst | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index 5e186f93f3..6615df75b5 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -58,15 +58,24 @@ LetToNum(!Columns!) sample_config = cerf.load_sample_config(yr=2010) .. code-block:: python - def LetToNum(feat): - letters = list(feat) - if len(letters) == 1: - number = ord(letters[0]) - 64 - elif letters[0] == 'A': - number = 26 + ord(letters[1]) - 64 - else: - number = 52 + ord(letters[1]) - 64 - return number + + def LetToNum(feat): + + letters = list(feat) + + if len(letters) == 1: + + number = ord(letters[0]) - 64 + + elif letters[0] == 'A': + + number = 26 + ord(letters[1]) - 64 + + else: + + number = 52 + ord(letters[1]) - 64 + + return number Then, calculate the X indices much the same as the Y indices. From 33e29519a93cccf725c1a0b26204438f5198d0d8 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:01:10 -0800 Subject: [PATCH 08/23] fix code block --- docs/source/user_guide.rst | 8 -------- 1 file changed, 8 deletions(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index 6615df75b5..62fce977bb 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -60,21 +60,13 @@ LetToNum(!Columns!) .. code-block:: python def LetToNum(feat): - letters = list(feat) - if len(letters) == 1: - number = ord(letters[0]) - 64 - elif letters[0] == 'A': - number = 26 + ord(letters[1]) - 64 - else: - number = 52 + ord(letters[1]) - 64 - return number Then, calculate the X indices much the same as the Y indices. From a2721b96cbb537272de70cd0e82e2df1a6d57073 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:03:08 -0800 Subject: [PATCH 09/23] render equations --- docs/source/user_guide.rst | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index 62fce977bb..89361b15c4 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -51,12 +51,6 @@ The x-indices require an additional step. First, calculate the Let_To_Num field Expression: LetToNum(!Columns!) -.. code-block:: python - - import cerf - - sample_config = cerf.load_sample_config(yr=2010) - .. code-block:: python def LetToNum(feat): @@ -71,7 +65,8 @@ LetToNum(!Columns!) Then, calculate the X indices much the same as the Y indices. -.. Code Block:: python +.. code-block:: python + Second_Index_X = 32 * !Let_To_Num! First_Index_X = !Second_Index_X! - 31 @@ -101,7 +96,7 @@ Frontal area density is the frontal area of a building at a certain height incre .. math:: - FAD = \frac{FA}{PA} + $FAD = \frac{FA}{PA}$ where, *FAD* is Frontal area density; *FA* is the frontal area of the wall from the current direction and height level in m\ :superscript:'2' \ ; *PA* is the building plan area in m\ :superscript:'2' \ . From f9385b84bd00f1f820cdf3fa4fac69cae30a8403 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:03:53 -0800 Subject: [PATCH 10/23] render equations --- docs/source/user_guide.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index 89361b15c4..145db2e8a7 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -96,7 +96,7 @@ Frontal area density is the frontal area of a building at a certain height incre .. math:: - $FAD = \frac{FA}{PA}$ + $FAD = \\frac{FA}{PA}$ where, *FAD* is Frontal area density; *FA* is the frontal area of the wall from the current direction and height level in m\ :superscript:'2' \ ; *PA* is the building plan area in m\ :superscript:'2' \ . From 5697f96acb2b4d9cac62024d5f2e569e8553b0e3 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:04:38 -0800 Subject: [PATCH 11/23] render equations --- docs/source/user_guide.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index 145db2e8a7..e6eb149a49 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -98,6 +98,8 @@ Frontal area density is the frontal area of a building at a certain height incre $FAD = \\frac{FA}{PA}$ +$ FAD = \\frac{FA}{PA} $ + where, *FAD* is Frontal area density; *FA* is the frontal area of the wall from the current direction and height level in m\ :superscript:'2' \ ; *PA* is the building plan area in m\ :superscript:'2' \ . Plan Area Density (61-75) From e684d9e0e4e84c645bb587eb38bb2b20a7a96332 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:05:49 -0800 Subject: [PATCH 12/23] render equations --- docs/source/user_guide.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index e6eb149a49..59c0ccdb7e 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -100,6 +100,9 @@ Frontal area density is the frontal area of a building at a certain height incre $ FAD = \\frac{FA}{PA} $ +When $a \\ne 0$, there are two solutions to $(ax^2 + bx + c = 0)$ and they are +$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$ + where, *FAD* is Frontal area density; *FA* is the frontal area of the wall from the current direction and height level in m\ :superscript:'2' \ ; *PA* is the building plan area in m\ :superscript:'2' \ . Plan Area Density (61-75) From 8970ee4755085f293379ec78da115f43031b8c54 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:06:53 -0800 Subject: [PATCH 13/23] render equations --- docs/source/user_guide.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index 59c0ccdb7e..05a5e52c75 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -98,6 +98,7 @@ Frontal area density is the frontal area of a building at a certain height incre $FAD = \\frac{FA}{PA}$ +what $ FAD = \\frac{FA}{PA} $ When $a \\ne 0$, there are two solutions to $(ax^2 + bx + c = 0)$ and they are From be22f2deb551b51a4a1ffcfc5a8742d2d29daec6 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:07:46 -0800 Subject: [PATCH 14/23] render equations --- docs/source/user_guide.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index 05a5e52c75..b96127e018 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -99,7 +99,7 @@ Frontal area density is the frontal area of a building at a certain height incre $FAD = \\frac{FA}{PA}$ what -$ FAD = \\frac{FA}{PA} $ +when $FAD = \\frac{FA}{PA}$ When $a \\ne 0$, there are two solutions to $(ax^2 + bx + c = 0)$ and they are $$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$ From ce23e3df661c6380629a466bb93a1dba6f7ee7aa Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:10:46 -0800 Subject: [PATCH 15/23] render equations --- docs/source/user_guide.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index b96127e018..8159a935b3 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -101,6 +101,15 @@ Frontal area density is the frontal area of a building at a certain height incre what when $FAD = \\frac{FA}{PA}$ +$FAD = \\frac{FA}{PA}$ + +`$FAD = \\frac{FA}{PA}$` + + +.. code-block:: + + $FAD = \\frac{FA}{PA}$ + When $a \\ne 0$, there are two solutions to $(ax^2 + bx + c = 0)$ and they are $$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$ From c9466866aa511ef15310348f25454c354ee9caa2 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:11:34 -0800 Subject: [PATCH 16/23] render equations --- docs/source/user_guide.rst | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index 8159a935b3..78227d43f9 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -94,25 +94,8 @@ Frontal Area Density (1-60) Frontal area density is the frontal area of a building at a certain height increment divided by the building plan area. **naturf** calculates frontal area density from the four cardinal directions (east, north, west, south) and at 5 meter increments from ground level to 75 meters. Parameters 1-15 represent the north, paramters 16-30 represent the west, parameters 31-45 represent the south, and parameters 46-60 represent the east. [Burian2003]_ Eq. 14 -.. math:: - - $FAD = \\frac{FA}{PA}$ - -what -when $FAD = \\frac{FA}{PA}$ - $FAD = \\frac{FA}{PA}$ -`$FAD = \\frac{FA}{PA}$` - - -.. code-block:: - - $FAD = \\frac{FA}{PA}$ - -When $a \\ne 0$, there are two solutions to $(ax^2 + bx + c = 0)$ and they are -$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$ - where, *FAD* is Frontal area density; *FA* is the frontal area of the wall from the current direction and height level in m\ :superscript:'2' \ ; *PA* is the building plan area in m\ :superscript:'2' \ . Plan Area Density (61-75) From b893b0f06cf316ad15ad8f3bb03438ea3051929b Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:12:39 -0800 Subject: [PATCH 17/23] render equations --- docs/source/user_guide.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index 78227d43f9..b47500e9e4 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -96,7 +96,7 @@ Frontal area density is the frontal area of a building at a certain height incre $FAD = \\frac{FA}{PA}$ -where, *FAD* is Frontal area density; *FA* is the frontal area of the wall from the current direction and height level in m\ :superscript:'2' \ ; *PA* is the building plan area in m\ :superscript:'2' \ . +where, *FAD* is Frontal area density; *FA* is the frontal area of the wall from the current direction and height level in $m^2$; *PA* is the building plan area in $m^2$. Plan Area Density (61-75) ~~~~~~~~~~~~~~~~~~~~~~~~~ From d5b706fabd25fbdbc0822353f8927afb55fd2e1d Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:16:29 -0800 Subject: [PATCH 18/23] render equations --- docs/source/user_guide.rst | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index b47500e9e4..31c0dc9423 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -38,20 +38,26 @@ After the tessellation is created, the next step is to use the "Calculate Field" First, split the IDs into fields representing their columns and rows: -Columns = !GRID_ID!.split("-")[0] -Rows = !GRID_ID!.split("-")[1] +.. code-block:: + + Columns = !GRID_ID!.split("-")[0] + Rows = !GRID_ID!.split("-")[1] Next, assign the y-indices (Note: WRF requires the indexing to begin from the bottom left corner of the dataset): -Second_Index_Y = 32 * ((Number of rows) - !Rows! + 1) -First_Index_Y = !Second_Index_Y! - 31 +.. code-block:: + + Second_Index_Y = 32 * ((Number of rows) - !Rows! + 1) + First_Index_Y = !Second_Index_Y! - 31 The x-indices require an additional step. First, calculate the Let_To_Num field by turning the letters in the Columns field into numbers using the code below, which can be adjusted to accomodated as many columns as needed: -Expression: -LetToNum(!Columns!) +.. code-block:: + + Expression: + LetToNum(!Columns!) -.. code-block:: python +.. code-block:: def LetToNum(feat): letters = list(feat) @@ -65,7 +71,7 @@ LetToNum(!Columns!) Then, calculate the X indices much the same as the Y indices. -.. code-block:: python +.. code-block:: Second_Index_X = 32 * !Let_To_Num! First_Index_X = !Second_Index_X! - 31 @@ -75,7 +81,7 @@ The attribute table should then be exported to an Excel file using the "Table to Create CSV file ^^^^^^^^^^^^^^^ -Now that the tessellation attribute table is an Excel file, all columns can be deleted except for the grid ID column and the indices columns. In new columns, use =TEXT(cell, "00000") to add leading zeroes to the indices (at least 5 digits are required, more can be added if necessary). In another column, concatenate the indices using =CONCAT(cell1,"-",cell2,".",cell3,"-",cell4). Copy the GRID_ID and concatenated index numbers(important: with headers) into a separate spreadsheet and save as a CSV. This CSV will allow **naturf** to assign the correct index name to the corresponsing binary file. +Now that the tessellation attribute table is an Excel file, all columns can be deleted except for the grid ID column and the indices columns. In new columns, use `=TEXT(cell, "00000")` to add leading zeroes to the indices (at least 5 digits are required, more can be added if necessary). In another column, concatenate the indices using `=CONCAT(cell1,"-",cell2,".",cell3,"-",cell4)`. Copy the `GRID_ID` and concatenated index numbers(important: with headers) into a separate spreadsheet and save as a CSV. This CSV will allow **naturf** to assign the correct index name to the corresponsing binary file. Spatial join and split by attribute ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From 9b3056264fe8fc360b9ec0c18ae4b48c1b1d4d99 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:19:28 -0800 Subject: [PATCH 19/23] render equations --- docs/source/user_guide.rst | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index 31c0dc9423..6624634aad 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -81,7 +81,7 @@ The attribute table should then be exported to an Excel file using the "Table to Create CSV file ^^^^^^^^^^^^^^^ -Now that the tessellation attribute table is an Excel file, all columns can be deleted except for the grid ID column and the indices columns. In new columns, use `=TEXT(cell, "00000")` to add leading zeroes to the indices (at least 5 digits are required, more can be added if necessary). In another column, concatenate the indices using `=CONCAT(cell1,"-",cell2,".",cell3,"-",cell4)`. Copy the `GRID_ID` and concatenated index numbers(important: with headers) into a separate spreadsheet and save as a CSV. This CSV will allow **naturf** to assign the correct index name to the corresponsing binary file. +Now that the tessellation attribute table is an Excel file, all columns can be deleted except for the grid ID column and the indices columns. In new columns, use ``=TEXT(cell, "00000")`` to add leading zeroes to the indices (at least 5 digits are required, more can be added if necessary). In another column, concatenate the indices using ``=CONCAT(cell1,"-",cell2,".",cell3,"-",cell4)``. Copy the ``GRID_ID`` and concatenated index numbers(important: with headers) into a separate spreadsheet and save as a CSV. This CSV will allow **naturf** to assign the correct index name to the corresponsing binary file. Spatial join and split by attribute ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -109,9 +109,7 @@ Plan Area Density (61-75) Plan area density is the ratio of building footprint areas within the building plan area to the entire building plan area, calculated in 5 meter increments from ground level to 75 meters. **naturf** projects the building footprint vertically to the building height, meaning plan area density is the same at every vertical level. [Burian2003]_ Eq. 7 -.. math:: - - PAD = \frac{TBA}{PA} +$PAD = \\frac{TBA}{PA}$ where, *PAD* is the plan area density; *TBA* is the total area of the buildings within the current building plan area in m\ :superscript:'2' \ ; *PA* is the building plan area in m\ :superscript:'2' \ . @@ -140,9 +138,7 @@ Area Weighted Mean of Building Heights (94) The average height of all buildings within the plan area weighted by the plan area. [Burian2003]_ Eq. 3 -.. math:: - - AWMH = \frac{\Sigma{A_i zh_i}}{\Sigma{A_i}} +$AWMH = \\frac{\\Sigma{A_i zh_i}}{\\Sigma{A_i}}$ where, *AWMH* is the area weighted mean height in m; *A*\ :subscript:'i' \ is the current building plan area in m\ :superscript:'2' \ ; *zh*\ :subscript:'i' \ is the current building height in m\ :superscript:'2' \ . From 8230db802fa92e84be67db89481ae078b5903b73 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:29:36 -0800 Subject: [PATCH 20/23] render equations --- docs/source/user_guide.rst | 50 ++++++++++++-------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index 6624634aad..c7ade183c4 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -111,7 +111,7 @@ Plan area density is the ratio of building footprint areas within the building p $PAD = \\frac{TBA}{PA}$ -where, *PAD* is the plan area density; *TBA* is the total area of the buildings within the current building plan area in m\ :superscript:'2' \ ; *PA* is the building plan area in m\ :superscript:'2' \ . +where, *PAD* is the plan area density; *TBA* is the total area of the buildings within the current building plan area in $m^2$; *PA* is the building plan area in $m^2$. Rooftop Area Density (76-90) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -140,7 +140,7 @@ The average height of all buildings within the plan area weighted by the plan ar $AWMH = \\frac{\\Sigma{A_i zh_i}}{\\Sigma{A_i}}$ -where, *AWMH* is the area weighted mean height in m; *A*\ :subscript:'i' \ is the current building plan area in m\ :superscript:'2' \ ; *zh*\ :subscript:'i' \ is the current building height in m\ :superscript:'2' \ . +where, *AWMH* is the area weighted mean height in m; $A_i$ is the current building plan area in $m^2$; $zh_i$ is the current building height in m. Building Surface Area to Plan Area Ratio (95) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -152,9 +152,7 @@ Frontal Area Index (96-99) Frontal area index is the ratio of the entire frontal area of a building to the building plan area. **naturf** calculates the frontal area index from the four cardinal directions. Because buildings often do not face a cardinal direction head on, **naturf** uses the average alongwind and crosswind distance from the current building centroid to all other building centroids for the building plan area. [Burian2003]_ Eq. 12 -.. math:: - - FAI = \frac{l * zh}{AW * CW} +$FAI = \\frac{l * zh}{AW * CW}$ where, *FAI* is frontal area index; *l* is the building wall length in m; *zh* is the building height in m; *AW* the average alongwind distance to other buildings in m; *CW* is the average crosswind distance to other buildings in m. @@ -163,11 +161,9 @@ Complete Aspect Ratio (100) The ratio of building surface area and exposed ground area to the total building plan area. [Burian2003]_ Eq. 15 -.. math:: - - CAR = \frac{BSA + (PA - TBA)}{PA} +$CAR = \\frac{BSA + (PA - TBA)}{PA}$ -where, *BSA* is the building surface area in m\ :superscript:'2' \; *TBA* is the total area of the buildings within the current building plan area in m\ :superscript:'2' \ ; *PA* is the building plan area in m\ :superscript:'2' \ . +where, *BSA* is the building surface area in $m^2$; *TBA* is the total area of the buildings within the current building plan area in $m^2$; *PA* is the building plan area in $m^2$. Height-to-Width Ratio (101) ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -179,9 +175,7 @@ Sky-View Factor (102) The fraction of visible sky in a given area. [Dirksen2019]_ Eq. 1 -.. math:: - - SVF = cos(arctan(\frac{H}{0.5W})) +$SVF = cos(arctan(\\frac{H}{0.5W}))$ where, *SVF* is the sky-view factor; *H* is the building height in m; *W* is the distance between buildings in m. @@ -190,9 +184,7 @@ Grimmond & Oke Roughness Length (103) [GrimmondOke1999]_ Eq. 2 -.. math:: - - GORL = 0.1 * zh +$GORL = 0.1 \\cdot zh$ where, *GORL* is Grimmond & Oke rougness length in m; *zh* is the building height in m. @@ -201,9 +193,7 @@ Grimmond & Oke Displacement Height (104) [GrimmondOke1999]_ Eq. 1 -.. math:: - - GODH = 0.67 * zh +$GODH = 0.67 \\cdot zh$ where, *GODH* is Grimmond & Oke displacement height in m; *zh* is building height in m. @@ -213,11 +203,9 @@ Raupach Roughness Length (105, 107, 109, 111) [Raupach1994]_ Eq. 4 -.. math:: +$RRL = zh \\cdot (1 - RDH) \\cdot exp(-\\kappa \\cdot (C_{S} + C_{R} \\cdot \\lambda)^{-0.5} - \\Psi_{h}))$ - RRL = zh * (1 - RDH) * exp(-\kappa * (C_{S} + C_{R} * \lamba)^-0.5 - \Psi_{h})) - -where, *RRL* is the Raupach roughness length in m; *RDH* is the Raupach displacement height in m; *\kappa* is von Kármán's constant = 0.4; *C*\ :subscript:'S' \ is the substrate-surface drag coefficient = 0.003; *C*\ :subscript:'R' \ is the roughness-element drag coefficient = 0.3; *\Psi*\ :subscript:'h' \ is the roughness-sublayer influence function = 0.193. +where, *RRL* is the Raupach roughness length in m; *RDH* is the Raupach displacement height in m; $\\kappa$ is von Kármán's constant = 0.4; $C_S$ is the substrate-surface drag coefficient = 0.003; $C_R$ is the roughness-element drag coefficient = 0.3; $\\Psi_h$ is the roughness-sublayer influence function = 0.193. Raupach Displacment Height (106, 108, 110, 112) @@ -225,33 +213,27 @@ Raupach Displacment Height (106, 108, 110, 112) [Raupach1994]_ Eq. 8 -.. math:: - - RDH = zh * (1 - (\frac{1 - \exp(-\sqrt(c_{d1} * \Lambda))}{\sqrt(c_{d1} * \Lambda)})) +$RDH = zh \\cdot (1 - (\\frac{1 - \\exp(-\\sqrt(c_{d1} \\cdot \\Lambda))}{\\sqrt(c_{d1} \\cdot \\Lambda)})) -where, *RDH* is the Raupach displacement height in m; *c*\ :subscript:'d1' \ is a constant = 7.5; *\Lambda* is frontal area index times 2. +where, *RDH* is the Raupach displacement height in m; $c_{d1}$ is a constant = 7.5; $\\Lambda$ is frontal area index times 2. Macdonald et al. Roughness Length (113-116) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [Macdonald1998]_ Eq. 22 -.. math:: +$MRL = zh \\cdot (1 - RDH)\\exp(-(0.5\\frac{C_{D}}{\\kappa^2}(1 - RDH)\\frac{A_{f}}{A_{d}})^{-0.5})$ - MRL = zh * (1 - RDH)\exp(-(0.5\frac{C_{D}}{\kappa^2}(1 - RDH)\frac{A_{f}}{A_{d}})^-0.5) - -where, *MRL* is the Macdonald roughness length in m; *zh* is the building height in m; *RDH* is the Raupach displacement height in m; *C*\ :subscript:'D' \ is the obstacle drag coefficient = 1.12; *\kappa* is von Kármán's constant = 0.4; *A*\ :subscript:'f' \ is the frontal area of the building in m^2; *A*\ :subscript:'d' \ is the total surface area of the buildings in the plan area divided by the number of buildings in m\ :superscript:'2' \ . +where, *MRL* is the Macdonald roughness length in m; *zh* is the building height in m; *RDH* is the Raupach displacement height in m; $C_D$ is the obstacle drag coefficient = 1.12; $\\kappa$ is von Kármán's constant = 0.4; $A_f$ is the frontal area of the building in m^2; $A_d$ is the total surface area of the buildings in the plan area divided by the number of buildings in $m^2$. Macdonald et al. Displacement Height (117) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [Macdonald1998]_ Eq. 23 -.. math:: - - MDH = zh * (1 + \frac{1}{A^\lambda} * (\lambda - 1)) +$MDH = zh \\cdot (1 + \\frac{1}{A^\\lambda} \\cdot (\\lambda - 1))$ -where, *MDH* is the Macdonald displacement height in m; *zh* is the building height in; *A* is a constant = 3.59; *\lambda* is the plan area density. +where, *MDH* is the Macdonald displacement height in m; *zh* is the building height in; *A* is a constant = 3.59; $\\lambda$ is the plan area density. Vertical Distribution of Building Heights (118-132) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 2d267f2846fcdaff92dfecbe6f35a189d7b17355 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:35:53 -0800 Subject: [PATCH 21/23] embed links --- docs/source/user_guide.rst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index c7ade183c4..14cbe13af5 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -13,7 +13,9 @@ Though **naturf** is demonstrated for the conterminous United States (CONUS), th - A shapefile of square polygons tessellated over the study area. - A CSV file matching each tile name to its index number. -Let us know if you are using **naturf** in your research in our `discussion thread `_! +.. + TODO: no discussion section yet + Let us know if you are using **naturf** in your research in our `discussion thread `_! Setting up a **naturf** run @@ -24,12 +26,14 @@ The following with indroduce you to the input data required by **naturf** and ho Splitting the building shapefile into tiles ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -**naturf** works optimally with inputs of building shapefiles as regular square tiles that can be processed in parallel. Experiments with Los Angeles found that tiles of 3.2 km by 3.2 km were the most computationally efficient (at 100 meter output resolution). +**naturf** works optimally with inputs of building shapefiles as regular square tiles that can be processed in parallel. Experiments with Los Angeles found that tiles of 3.2 km by 3.2 km were the most computationally efficient at 100 meter output resolution. Generate a tessellation ^^^^^^^^^^^^^^^^^^^^^^^ -The first step to splitting the input building shapefile into tiles is to load the shapefile into any GIS software (ArcPro, ArcMap, QGIS, etc.) and run the "Generate Tessellation" tool (https://pro.arcgis.com/en/pro-app/2.8/tool-reference/data-management/generatetesellation.htm for ArcPro/ArcMap; https://docs.qgis.org/2.6/en/docs/user_manual/processing_algs/qgis/vector_creation_tools/creategrid.html for QGIS) with the desired tile size. After the tessellation is created, note the center latitude and longitude in decimal degrees as well as the coordinates of the bottom left corner of the tessellation. All of those coordinates will be needed to set the projection of the output data and to tell WRF where to start placing the data. +The first step to splitting the input building shapefile into tiles is to load the shapefile into any GIS software (ArcPro, ArcMap, QGIS, etc.) and run the `Generate Tessellation_ tool (https://pro.arcgis.com/en/pro-app/2.8/tool-reference/data-management/generatetesellation.htm for ArcPro/ArcMap; https://docs.qgis.org/2.6/en/docs/user_manual/processing_algs/qgis/vector_creation_tools/creategrid.html for QGIS) with the desired tile size. After the tessellation is created, note the center latitude and longitude in decimal degrees as well as the coordinates of the bottom left corner of the tessellation. All of those coordinates will be needed to set the projection of the output data and to tell WRF where to start placing the data. + +.. _Generate Tessellation: https://pro.arcgis.com/en/pro-app/2.8/tool-reference/data-management/generatetesellation.htm Assign index numbers ^^^^^^^^^^^^^^^^^^^^ From edab635c8d08c6dbc8f6205161abf55db3fafaa4 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:39:40 -0800 Subject: [PATCH 22/23] embed links --- docs/source/user_guide.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index 14cbe13af5..0ddd24b70a 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -31,9 +31,10 @@ Splitting the building shapefile into tiles Generate a tessellation ^^^^^^^^^^^^^^^^^^^^^^^ -The first step to splitting the input building shapefile into tiles is to load the shapefile into any GIS software (ArcPro, ArcMap, QGIS, etc.) and run the `Generate Tessellation_ tool (https://pro.arcgis.com/en/pro-app/2.8/tool-reference/data-management/generatetesellation.htm for ArcPro/ArcMap; https://docs.qgis.org/2.6/en/docs/user_manual/processing_algs/qgis/vector_creation_tools/creategrid.html for QGIS) with the desired tile size. After the tessellation is created, note the center latitude and longitude in decimal degrees as well as the coordinates of the bottom left corner of the tessellation. All of those coordinates will be needed to set the projection of the output data and to tell WRF where to start placing the data. +The first step to splitting the input building shapefile into tiles is to load the shapefile into any GIS software (ArcPro, ArcMap, QGIS, etc.) and run the `Generate Tessellation`_ tool for ArcPro/ArcMap; `Create Grid`_ for QGIS) with the desired tile size. After the tessellation is created, note the center latitude and longitude in decimal degrees as well as the coordinates of the bottom left corner of the tessellation. All of those coordinates will be needed to set the projection of the output data and to tell WRF where to start placing the data. .. _Generate Tessellation: https://pro.arcgis.com/en/pro-app/2.8/tool-reference/data-management/generatetesellation.htm +.. _Create Grid: https://docs.qgis.org/2.6/en/docs/user_manual/processing_algs/qgis/vector_creation_tools/creategrid.html Assign index numbers ^^^^^^^^^^^^^^^^^^^^ @@ -54,7 +55,7 @@ Next, assign the y-indices (Note: WRF requires the indexing to begin from the bo Second_Index_Y = 32 * ((Number of rows) - !Rows! + 1) First_Index_Y = !Second_Index_Y! - 31 -The x-indices require an additional step. First, calculate the Let_To_Num field by turning the letters in the Columns field into numbers using the code below, which can be adjusted to accomodated as many columns as needed: +The x-indices require an additional step. First, calculate the ``Let_To_Num`` field by turning the letters in the Columns field into numbers using the code below, which can be adjusted to accomodated as many columns as needed: .. code-block:: From cbc1f2dc05b14695a5c45b7b9077efce997ecc17 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:43:57 -0800 Subject: [PATCH 23/23] fix latex rendering --- docs/source/user_guide.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/user_guide.rst b/docs/source/user_guide.rst index 0ddd24b70a..0b5532ce2f 100644 --- a/docs/source/user_guide.rst +++ b/docs/source/user_guide.rst @@ -157,7 +157,7 @@ Frontal Area Index (96-99) Frontal area index is the ratio of the entire frontal area of a building to the building plan area. **naturf** calculates the frontal area index from the four cardinal directions. Because buildings often do not face a cardinal direction head on, **naturf** uses the average alongwind and crosswind distance from the current building centroid to all other building centroids for the building plan area. [Burian2003]_ Eq. 12 -$FAI = \\frac{l * zh}{AW * CW}$ +$FAI = \\frac{l \\cdot zh}{AW \\cdot CW}$ where, *FAI* is frontal area index; *l* is the building wall length in m; *zh* is the building height in m; *AW* the average alongwind distance to other buildings in m; *CW* is the average crosswind distance to other buildings in m. @@ -218,7 +218,7 @@ Raupach Displacment Height (106, 108, 110, 112) [Raupach1994]_ Eq. 8 -$RDH = zh \\cdot (1 - (\\frac{1 - \\exp(-\\sqrt(c_{d1} \\cdot \\Lambda))}{\\sqrt(c_{d1} \\cdot \\Lambda)})) +$RDH = zh \\cdot (1 - (\\frac{1 - \\exp(-\\sqrt(c_{d1} \\cdot \\Lambda))}{\\sqrt(c_{d1} \\cdot \\Lambda)}))$ where, *RDH* is the Raupach displacement height in m; $c_{d1}$ is a constant = 7.5; $\\Lambda$ is frontal area index times 2. @@ -229,7 +229,7 @@ Macdonald et al. Roughness Length (113-116) $MRL = zh \\cdot (1 - RDH)\\exp(-(0.5\\frac{C_{D}}{\\kappa^2}(1 - RDH)\\frac{A_{f}}{A_{d}})^{-0.5})$ -where, *MRL* is the Macdonald roughness length in m; *zh* is the building height in m; *RDH* is the Raupach displacement height in m; $C_D$ is the obstacle drag coefficient = 1.12; $\\kappa$ is von Kármán's constant = 0.4; $A_f$ is the frontal area of the building in m^2; $A_d$ is the total surface area of the buildings in the plan area divided by the number of buildings in $m^2$. +where, *MRL* is the Macdonald roughness length in m; *zh* is the building height in m; *RDH* is the Raupach displacement height in m; $C_D$ is the obstacle drag coefficient = 1.12; $\\kappa$ is von Kármán's constant = 0.4; $A_f$ is the frontal area of the building in $m^2$; $A_d$ is the total surface area of the buildings in the plan area divided by the number of buildings in $m^2$. Macdonald et al. Displacement Height (117) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -238,7 +238,7 @@ Macdonald et al. Displacement Height (117) $MDH = zh \\cdot (1 + \\frac{1}{A^\\lambda} \\cdot (\\lambda - 1))$ -where, *MDH* is the Macdonald displacement height in m; *zh* is the building height in; *A* is a constant = 3.59; $\\lambda$ is the plan area density. +where, *MDH* is the Macdonald displacement height in m; *zh* is the building height in m; *A* is a constant = 3.59; $\\lambda$ is the plan area density. Vertical Distribution of Building Heights (118-132) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~