LSRathore / vic-auto

A script to generate input files i.e. soil, vegetation parameter file, elevation band file and meteorological forcing files for Variable Infiltration Capacity (VIC) hydrologic Model.
10 stars 4 forks source link

tabulate area line 242 #9

Open Saadi4469 opened 4 years ago

Saadi4469 commented 4 years ago

Hello sir,

In line2 42 you are tabulating the area with respect to the DEM and the grid, my area units are coming off. I think that is because both my grid and DEM are in WGS84. I have attached a screenshot for further reference. Can you please guide me on this Dr. Rathore? Capture

Saadi4469 commented 4 years ago

My DEM is of 30 meter resolution and my GRID has a resolution of 0.0625 degree (approximately 6 km). Both of them are in WGS84 coordinates.

LSRathore commented 4 years ago

Hi, can you manually check if the sum of all the bands' areas equal to the total area of a grid?

Saadi4469 commented 4 years ago

For calculating the area, I will have to change the projection of the grid to UTM right? And if that is so then for the tabulate area step, both the DEM and grid have to be in projected coordinate system. Please correct me if I am wrong!

LSRathore commented 4 years ago

Yes, you have to change the projection of the fishnet file to UTM to calculate the area of each pixel, you can do that in Arcgis and check if the output of line242 matches with what you generate. The script requires the shapefiles and rasters to be in GCS. I am not sure if it would work if inputs are in UTM projection. I do not have access to my data so I can not cross-check it, sorry.

Saadi4469 commented 4 years ago

Hi Sir, If I upload my data (a very small area) and share the link here, can you please have a look at it?

Thank you,

LSRathore commented 4 years ago

I can do it but not today, maybe tomorrow. Share the link with me and I’ll have a look.

Saadi4469 commented 4 years ago

Thank you so much sir! VIC_GRID_fishnet.zip The DEM can be downloaded from the following link: https://app.box.com/s/8qg5e8qif9r8hqr7han440zdw61mlxfn Please let me know if you data access issues!

Saadi4469 commented 4 years ago

Hi Sir, I figured out the solution but now I am getting an error in line 271. I will post a new issue for that. Thank you for feedback!

LSRathore commented 4 years ago

That's good, I downloaded the data but could not run because my computer has an issue with arcpy.