KMarkert / servir-vic-training

Training materials for the VIC hydrologic model setup developed for the @SERVIR program
GNU General Public License v3.0
37 stars 33 forks source link

How to calculate Land Cover fraction in each cell? #24

Closed giaMSU closed 4 years ago

giaMSU commented 4 years ago

Hi all Could you instruct me on how to calculate the fraction of Land Cover in grid cells? I want to run 1km grid-cell basin, but I have a 300 m Land Cover dataset. So if I snap the LC by 1km grid cell, each cell may contain multiple LC types. Best GiaMSU

KMarkert commented 4 years ago

Is this land cover fraction in reference to the vegetation parameter file or are you wanting to get a fraction of all land cover values in general for a given pixel as another raster?

giaMSU commented 4 years ago

Hi KMarkert It is confusing me, actually. I think I need the land cover fraction in the vegetation parameter file and band cover fraction in the snow parameter file. So, I want to calculate them before put them in these files. Or your scripts will automatically calculate them while creating the veg.param and snow.param files.

Thanks

KMarkert commented 4 years ago

Hi @giaMSU, the scripts will automatically calculate the land cover fractions based on the pixels that overlap with the larger grid that you are setting VIC up to run over. With that said, the reduction is primitive meaning that it assumes that the lower resolution raster resolution is a factor of the large resolution. So, if you are running a 1km and you have land cover at 300m the closest acceptable resolution will be 250m which means you have to resample. If the lower resolution dataset is not a factor of the larger resolution it will technically work but there will be a misalignment of the pixels used to calculate the fraction leading to a wrong result. I hope this helps explain. Let me know if I can help clarify anything else.

KMarkert commented 4 years ago

Assuming this question has been answered, closing due to inactivity.