Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export tool unable to compress the resampled DEM and HRU ASCII files to the output #27

Closed
jdduh opened this issue Dec 22, 2015 · 8 comments

Comments

@jdduh
Copy link

jdduh commented Dec 22, 2015

The error message says that "An error occurred when package the HRU zones and DEM for eWSF. They are not included in the zip file." This occurred on both Gus and Dave's computers (running 10.2.2). When I copied their AOIs to my computer, the export succeeded without any error. What triggered the error message? I suspect that it's related to the temp output folder (or the temp files were removed before the compression was finished). Any thought? The meeting went well today.

@lbross
Copy link
Contributor

lbross commented Dec 22, 2015

What resolution did you resample to?

@lbross
Copy link
Contributor

lbross commented Dec 22, 2015

Given the error message, the error likely occurred in the AddZonesToZipFolder function in FrmExportParametersEwsf. If you send me the AOIs, I can try to replicate the error but if it succeeded for you, I don't know how productive this would be.

Does the error occur when they do not resample the HRU? If not, then we know the problem is in the resample code.

The temporary zip folder is created as a subfolder in the output path. If they don't have permissions to create a folder here, the code would fail. It's also possible that the length of the path to the temporary zip folder is too long. We only write the .asc file to this folder but it may have the same limitations as the GRID format.

The rest of the intermediate steps are all written to the hru.gdb so they would already have to have permissions there.

If none of this helps, I can create a debug version with MessageBoxes so we can pinpoint exactly where the error is occurring. Glad things went well on Monday.

Sample file paths:
zipFolder: "C:\Docs\Lesley\NRCS_Code_Migration\BAGIS_P\BagisZip"
hruGdbName: "C:\Docs\Lesley\ochoco_FGDB\zones\hru_ca\hru_ca.gdb"
outputFileBase: "C:\Docs\Lesley\ochoco_FGDB\zones\hru_ca\hru_ca.gdb\grid"
hruClipPath: "C:\Docs\Lesley\ochoco_FGDB\zones\hru_ca\hru_ca.gdb\tmpResample"
outputRaster: "C:\Docs\Lesley\ochoco_FGDB\zones\hru_ca\hru_ca.gdb\tmpResample"

@jdduh
Copy link
Author

jdduh commented Dec 22, 2015

Gus told me that he exported the file(s) to a path (i.e., his desktop) that he used before. The previous export didn't have any error. Dave and Gus both resampled the rasters to 100 meters resolution. They are willing to help with the debugging if you need them to install a new addin that could generate more specific error messages.

Dave's AOI can be downloaded from ftp://basins.geog.pdx.edu/BAGIS/BAGIS_aois/. The AOI is Sprague_R_nr_Chiloquin_06072013. The file size is about 200 MB. There is only one HRU in the AOI. I ran the export tool on this AOI on my desktop computer successfully.

@jdduh
Copy link
Author

jdduh commented Dec 22, 2015

I saw a log file (automatically generated by ArcMap?) on my output folder. Do you think the file might be useful? I can ask Gus or Dave to find this file. Here is the content of the log file.

201512221256 0 0 0jduh E:\NRCS\AOIs\Sprague_R_nr_Chiloquin_06072013\BagisZip\clipDem = SELECTMASK(E:\NRCS\AOIs\Sprague_R_nr_Chiloquin_06072013\BagisZip\reDem, E:\NRCS\AOIs\Sprague_R_nr_Chiloquin_06072013\zones\hru2_e5_3_recond\hru2_e5_3_recond.gdb\tmpResample)
201512221256 0 1 0jduh E:\NRCS\AOIs\SPRAGU1\BagisZip\test_dem.asc = GRIDASCII ( E:\NRCS\AOIs\SPRAGU1\BagisZip\clipDem )

@lbross
Copy link
Contributor

lbross commented Dec 22, 2015

Sure. If they can find the log file, that might help answer some questions. Also, could you ask them to try again without resampling to see if that works? If they can't find the log file, can you ask for the name of the output path? That is the basis of the ascii file name and I wonder if there is something in the name that is messing things up?

@jdduh
Copy link
Author

jdduh commented Dec 22, 2015

Just to confirm that, despite the error message, the export was successful. The parameter file and the zip file were created, but without the two resampled ASCII files.

@jdduh
Copy link
Author

jdduh commented Dec 23, 2015

After recalculating the parameters, Dave was able to export the parameters and resampled ASCII files without any error. Maybe the "bug" was related to the addin installation process. Both Dave and Gus performed the export right after they installed the addin. Dave will keep us posted if the same error occurs. I will close this issue for now.

@jdduh jdduh closed this as completed Dec 23, 2015
@lbross
Copy link
Contributor

lbross commented Dec 23, 2015

Good news! Just so you know, the code worked as designed. If the
resampling/ascii file conversion fails, the parameter export still
completes and is added to the .zip file. Hopefully this is okay.

On Wed, Dec 23, 2015 at 11:50 AM, jdduh notifications@github.com wrote:

After recalculating the parameters, Dave was able to export the parameters
and resampled ASCII files without any error. Maybe the "bug" was related to
the addin installation process. Both Dave and Gus performed the export
right after they installed the addin. Dave will keep us posted if the same
error occurs. I will close this issue for now.


Reply to this email directly or view it on GitHub
#27 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants