Ignore:
Timestamp:
Nov 24, 2020 10:40:20 AM (4 years ago)
Author:
maronga
Message:

use negative numbers for tree ids and tree types for vegetation patches

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/palm_csd_files/palm_csd_canopy_generator.py

    r4793 r4794  
    2525# -----------------
    2626# $Id: palm_csd_canopy_generator.py 3773 2019-03-01 08:56:57Z maronga $
     27# tree_type for patches is now considered by negative values accrordng to the
     28# vegetation_type classification
     29#
     30# 3773 2019-03-01 08:56:57Z maronga
    2731# Bugfix: do not allow BAD < 0, revised treatment of tree trunks
    2832#
     
    550554      vegetation_type_int = vegetation_type.astype(int)
    551555      patch_id[k,:,:]   = np.where((patch_id_2d != 0) & (lad_loc[k,:,:] != fillvalues["tree_data"]), patch_id_2d, fillvalues["tree_id"])
    552       patch_type[k,:,:] = np.where((patch_id_2d != 0) & (lad_loc[k,:,:] != fillvalues["tree_data"]), np.byte(100+vegetation_type), fillvalues["tree_type"])
     556      patch_type[k,:,:] = np.where((patch_id_2d != 0) & (lad_loc[k,:,:] != fillvalues["tree_data"]), np.byte(-vegetation_type), fillvalues["tree_type"])
    553557
    554558   return lad_loc, patch_id, patch_type, nz, 0
Note: See TracChangeset for help on using the changeset viewer.