# GSPy Setup Instructions

## Quick Setup Checklist

### 1. Python Environment
```bash
# Create virtual environment
python -m venv venv

# Activate (Windows)
venv\Scripts\activate

# Install dependencies  
pip install -r requirements.txt

# Get MODFLOW executable
python -c "import flopy; flopy.utils.get_modflow('mf2005')"
```

### 2. GSPy Files
- Copy `GSPy.dll` to this folder
- Rename it to `gspy_modflow.dll`
- Update `python_path` in `gspy_modflow.json`

### 3. GoldSim Setup
- External Element > DLL Path: `gspy_modflow.dll`
- External Element > Function Name: `GSPy`
- Interface Tab: 1 scalar input, 1 scalar output

### 4. Test
```bash
python gspy_interface.py
```

## File Requirements

The GSPy bridge requires these exact file names:
- `gspy_modflow.dll` (renamed GSPy.dll)
- `gspy_modflow.json` (configuration file)
- `gspy_interface.py` (Python script)

## Common Issues

1. **Python path**: Update `python_path` in JSON to your Python installation
2. **MODFLOW**: Ensure `mf2005.exe` is in PATH or current directory
3. **Dependencies**: Run `pip install flopy numpy` in activated environment