diff --git a/pyrealm_build_data/two_leaf/Untitled.ipynb b/pyrealm_build_data/two_leaf/Untitled.ipynb index aae3b6b5..e8487fdc 100644 --- a/pyrealm_build_data/two_leaf/Untitled.ipynb +++ b/pyrealm_build_data/two_leaf/Untitled.ipynb @@ -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" ] }, { @@ -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" ] }, { @@ -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", @@ -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" ] }, { @@ -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", @@ -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",