jgomezdans / geog0133-practicals

Practicals for UCL's Department of Geography Geog0133: "Terrestrial Carbon: modelling and monitoring"
GNU General Public License v3.0
5 stars 3 forks source link

error with photJules #3

Closed aclong closed 4 years ago

aclong commented 4 years ago

when trying to run


do_photosynthesis('a')

get the error:


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-3-984accf6a1af> in <module>
     82 
     83 
---> 84 do_photosynthesis(name='a')

<ipython-input-3-984accf6a1af> in do_photosynthesis(n, name, ipar, Tc, x, xlabel, co2_ppmv, C3, pft_type, plot)
     56 
     57     # calculate leaf and canopy photosynthesis
---> 58     photo.photosynthesis()
     59 
     60     if plot:

/data/store05/phd/data/ucfnacl/geog0111/photJules.py in photosynthesis(self)
     79 
     80         '''
---> 81         self.leafPhotosynthesis()
     82         self.canopyPhotosynthesis()
     83 

/data/store05/phd/data/ucfnacl/geog0111/photJules.py in leafPhotosynthesis(self)
    463         self.gl = self.ratio * glco2
    464 
--> 465         self.Al[w] = -self.Rd * self.beta
    466 
    467         # quadratic for O3

ValueError: shape mismatch: value array of shape (100,) could not be broadcast to indexing result of shape (11,)
aclong commented 4 years ago

sorry. wrong environment.