stefanfluck / palmpy

Package supporting the generation of static driver files for simulations with the PALM model system. Check out the Wiki and engage in the Discussions!
GNU General Public License v3.0
18 stars 4 forks source link

vegetation_type und vegetation_patches #80

Open martin0schneider opened 11 months ago

martin0schneider commented 11 months ago

Hi,

Currently, palmpy assigns vegetation_type 3 to all areas where a "canopy" is present.

vegarr = np.where((canopyid[:,:] != -9999) & (watarr[:,:] == -127), 3, vegarr[:,:])

As far as I understood, this should only be done for single trees, not for vegetation patches (e.g. forests, parks). I am not 100% sure about the concept of tree rows here. See https://palm.muk.uni-hannover.de/trac/wiki/doc/app/iofiles/pids/palm_csd https://palm.muk.uni-hannover.de/trac/ticket/1408

It shouldn't be that hard to fix, e.g. the user adds the required information in the "resolvedforest" and "bb" files and the above mentioned line is changed to

vegarr = np.where((resebgebid[:,:] != -9999) & (resbreiheid[:,:] != -9999) & (watarr[:,:] == -127), 3, vegarr[:,:])

What do you think?

Cheers, Martin