I trying to run crayfish:CrayfishExportRaster in the QGIS Python Console, but get the following error:
Incorrect parameter value for CRAYFISH_INPUT_GROUP
I get the processing.run script from processing/history using previous successful run of crayfish:CrayfishExportRaster, where I used the GUI interface:
----------------------------------------------------------------------------------
import processing
processing.run("crayfish:CrayfishExportRaster", {'CRAYFISH_INPUT_LAYER':'/home/jmcmanus/Work/Surge/Data/florence/maxele.mod.63.nc','CRAYFISH_INPUT_EXTENT':'-97.85833,-60.040029999999994,7.909559999999999,45.83612','MAP_UNITS_PER_PIXEL':0.001,'CRAYFISH_INPUT_GROUP':0,'CRAYFISH_INPUT_TIMESTEP':0,'CRAYFISH_OUTPUT_RASTER':'TEMPORARY_OUTPUT'})
----------------------------------------------------------------------------------
When I run crayfish:CrayfishExportRaster, using the GUI interface, I can select a mesh layer that has been already loaded in QGIS. When I select the layer, in the crayfish:CrayfishExportRaster GUI, the CRAYFISH_INPUT_GROUP and CRAYFISH_INPUT_TIMESTEP are automatically filled with the values of 'maximum water surface elevationabove geoid' and '56 days, 0:00:00', respectively.
I attempted to run crayfish:CrayfishExportRaster, in the python console, using a loaded layer, and those inputs but got the same error message.
----------------------------------------------------------------------------------
import processing
mfile = '/home/jmcmanus/Work/Surge/Data/florence/maxele.mod.63.nc'
meshfile = mfile.strip().split('/')[-1]
meshname = meshfile.split('.')[0]
meshlayer = QgsMeshLayer(mfile, meshname, 'mdal')
processing.run("crayfish:CrayfishExportRaster", \
{'CRAYFISH_INPUT_LAYER': meshlayer,\
'CRAYFISH_INPUT_EXTENT':'-97.85833,-60.040029999999994,7.909559999999999,45.83612',\
'MAP_UNITS_PER_PIXEL':0.001,\
'CRAYFISH_INPUT_GROUP':'maximum water surface elevationabove geoid',\
'CRAYFISH_INPUT_TIMESTEP':'56 days, 0:00:00',\
'CRAYFISH_OUTPUT_RASTER':'TEMPORARY_OUTPUT'})
----------------------------------------------------------------------------------
I trying to run crayfish:CrayfishExportRaster in the QGIS Python Console, but get the following error:
Incorrect parameter value for CRAYFISH_INPUT_GROUP
I get the processing.run script from processing/history using previous successful run of crayfish:CrayfishExportRaster, where I used the GUI interface:
Jim