Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 17, 2024
1 parent 0f55afe commit 9434fd2
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions pyrealm_build_data/two_leaf/Untitled.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"from matplotlib import pyplot as plt\n",
"from pvlib.location import Location\n",
"\n",
"from pyrealm.pmodel import PModelEnvironment, PModel, SubdailyPModel, SubdailyScaler\n"
"from pyrealm.pmodel import PModel, PModelEnvironment, SubdailyPModel"
]
},
{
Expand Down Expand Up @@ -239,9 +238,9 @@
}
],
"source": [
"forcing_data = pd.read_csv('merged_BE-Vie_data.csv')\n",
"forcing_data = pd.read_csv(\"merged_BE-Vie_data.csv\")\n",
"forcing_data[\"time\"] = pd.to_datetime(forcing_data[\"time\"])\n",
"forcing_data\n"
"forcing_data"
]
},
{
Expand Down Expand Up @@ -492,12 +491,11 @@
" beta_angle > solar_obscurity_angle, 0.46 / np.sin(self.beta_angle), 27\n",
" )\n",
"\n",
" \n",
" m = (PATM / PA0) / np.sin(beta_angle)\n",
"\n",
" fd = (1 - 0.72**m) / (1 + ((0.72**m) * ((1 / fa) - 1)))\n",
"\n",
"# beam irradiance horizontal leaves (A20)\n",
" # beam irradiance horizontal leaves (A20)\n",
" rho_h = (1 - np.sqrt(1 - sigma)) / (1 + np.sqrt(1 - sigma))\n",
"\n",
" # beam irradiance uniform leaf-angle distribution (A19)\n",
Expand Down Expand Up @@ -553,8 +551,7 @@
" self.I_d = I_d\n",
" self.I_b = I_b\n",
" self.I_bs = I_bs\n",
" self.kb_prime = kb_prime\n",
"\n"
" self.kb_prime = kb_prime"
]
},
{
Expand Down Expand Up @@ -651,7 +648,6 @@
" def __init__(\n",
" self, pmodel: PModel | SubdailyPModel, irrad: TwoLeafIrradiance, LAI: np.array\n",
" ):\n",
"\n",
" # A load of needless inconsistencies in the object attribute names - to be resolved!\n",
" vcmax_pmod = (\n",
" pmodel.vcmax if isinstance(pmodel, PModel) else pmodel.subdaily_vcmax\n",
Expand Down Expand Up @@ -705,7 +701,12 @@
" )\n",
"\n",
" # Calculate J and Aj for each partition\n",
" self.J_sun = self.Jmax_sun * irrad.I_csun * (1 - 0.15) / (irrad.I_csun + 2.2 * self.Jmax_sun)\n",
" self.J_sun = (\n",
" self.Jmax_sun\n",
" * irrad.I_csun\n",
" * (1 - 0.15)\n",
" / (irrad.I_csun + 2.2 * self.Jmax_sun)\n",
" )\n",
" self.J_shade = (\n",
" self.Jmax_shade\n",
" * irrad.I_cshade\n",
Expand Down

0 comments on commit 9434fd2

Please sign in to comment.