I am attempting to prepare the routing files for WRF-Hydro. However, I keep on getting the following error (shown in red where it failed). The arcpy appears to fail to project the elevation raster to WRF format. Can anybody please help me fix it?
Thank you very much.
Best,
Feyera
Step 1: NetCDF Conversion initiated...
Map Projection: Lambert Conformal Conic
Using MOAD_CEN_LAT for latitude of origin.
Using Standard Parallel 2 in Lambert Conformal Conic map projection.
Georeferencing step completed without error.
The GEOGRID File resolution is 1000.0sm
Proj4: +proj=lcc +units=m +a=6370000.0 +b=6370000.0 +lat_1=34.0 +lat_2=40.0 +lat_0=37.999996 +lon_0=-120.5 +x_0=0 +y_0=0 +k_0=1.0 +nadgrids=@null +wktext +no_defs
GeoTransform: -224500.03374 1000.0 0 399500.086078 0 -1000.0
Created projection definition from input NetCDF GEOGRID file.
Creating CF-netCDF File.
Esri PE String: PROJCS['Sphere_Lambert_Conformal_Conic',GEOGCS['GCS_Sphere',DATUM['D_Sphere',SPHEROID['Sphere',6370000.0,0.0]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Lambert_Conformal_Conic'],PARAMETER['false_easting',0.0],PARAMETER['false_northing',0.0],PARAMETER['central_meridian',-120.5],PARAMETER['standard_parallel_1',34.0],PARAMETER['standard_parallel_2',40.0],PARAMETER['latitude_of_origin',37.999996],UNIT['Meter',1.0]];-37535200 -29208400 10000;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision
Map Projection of input raster : lambert_conformal_conic
Dimensions created after 0.01 seconds.
Coordinate variables and variable attributes set after 0.03 seconds.
netCDF global attributes set after 0.03 seconds.
Step 2 initiated...
The GEOGRID File resolution is 1000.0sm
The High-resolution dataset will be 100.0m
WKT for CRS 1:
PROJCS['Sphere_Lambert_Conformal_Conic',GEOGCS['GCS_Sphere',DATUM['D_Sphere',SPHEROID['Sphere',6370000.0,0.0]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Lambert_Conformal_Conic'],PARAMETER['false_easting',0.0],PARAMETER['false_northing',0.0],PARAMETER['central_meridian',-120.5],PARAMETER['standard_parallel_1',34.0],PARAMETER['standard_parallel_2',40.0],PARAMETER['latitude_of_origin',37.999996],UNIT['Meter',1.0]];-37535200 -29208400 10000;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision
WKT for CRS 2:
PROJCS['NAD_1983_California_Teale_Albers',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Albers'],PARAMETER['False_Easting',0.0],PARAMETER['False_Northing',-4000000.0],PARAMETER['Central_Meridian',-120.0],PARAMETER['Standard_Parallel_1',34.0],PARAMETER['Standard_Parallel_2',40.5],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]];-16909700 -8597000 266332319.755554;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision
CRS differs between datasets.
Custom geotransformation will be necessary.
ArcGIS version 10.9.1 detected. Transformation: GeoTransform_Null_WRFHydro
MakeRasterLayer process completed without error.
The coarse grid has 799 rows and 449 columns.
The input elevation grid (before reprojection) has 73991 rows and 44069 columns.
Projecting input elevation data to WRF coordinate system.
ArcGIS version 10.9.1 found. Using Custom Geotransformation (GeoTransform_Null_WRFHydro)
Traceback (most recent call last):
File "<string>", line 405, in execute
File "C:\Users\feyhir4209\Downloads\wrf_hydro_arcgis_preprocessor-5.2.0\wrf_hydro_arcgis_preprocessor-5.2.0\wrf_hydro_functions.py", line 1444, in create_high_res_topogaphy
arcpy.ProjectRaster_management(MosaicLayer, mosprj, sr2, ElevResampleMethod, cellsize2, geoTransfmName)
File "c:\program files (x86)\arcgis\desktop10.8\arcpy\arcpy\management.py", line 9887, in ProjectRaster
raise e
ExecuteError: ERROR 999999: Error executing function.
Failed to create raster dataset
Failed to execute (ProjectRaster).
Failed to execute (ProcessGeogridFile).
Failed at Wed Jan 17 13:28:33 2024 (Elapsed Time: 26.74 seconds)