Skip to content

bug: Trying to export model grid shapefile gives error without explanation #2744

@aestrad-intera

Description

@aestrad-intera
sim_export = flopy.mf6.MFSimulation(sim_name='name')
gwf_export = flopy.mf6.ModflowGwf(sim_export)
mg_export = gwf_export.modelgrid
mg_export.set_coord_info(xoff=xoff, yoff=yoff, angrot=angrot, crs=rgrid.crs,
                         merge_coord_info=False) 
dis_export = flopy.mf6.ModflowGwfdis(gwf, nlay=nlay, nrow=nrow, ncol=ncol,
                                     top=top_use, botm=botm, delr=delr*0.3048,
                                     delc=delc*0.3048, idomain=idomain,
                                     xorigin=xoff, yorigin=yoff, angrot=angrot,
                                     length_units='meters')
shp_utils.model_attributes_to_shapefile(pshp_ws/f'dis.shp',
                                        gwf_export, package_names='dis',
                                        modelgrid=mg_export)

the error: TypeError: Grid.to_geodataframe() missing 1 required positional argument: 'features'

What does this mean?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions