Focus Areas
Advanced Prompt Library
5 Expert PromptsGiven a dataset of 1000 daily precipitation records from 10 weather stations, create a Python script using the pandas library to preprocess and clean the data, then generate a summary statistics table and plot the frequency distribution of the precipitation records using matplotlib. Please include all necessary code and comments, and use best practices for code readability and organization. Assume the data is stored in a CSV file named 'precipitation_data.csv' with columns 'station_id', 'date', and 'precipitation_amount'.
Develop a hydrologic model using the MODFLOW code to simulate groundwater flow in a porous medium. The model should account for the following properties: porosity, hydraulic conductivity, and initial head. Assume a 2D simulation area with a grid size of 100x100 cells, and use the following input values: - porosity (n): 0.3 - hydraulic conductivity (K): 10 m/d - initial head (h): 10 m Use the following boundary conditions: - no-flow boundaries on the left and right edges - a constant-head boundary on the top edge with a head of 15 m - a constant-head boundary on the bottom edge with a head of 5 m Write the model input file and a Python script to automate the model run and visualization of the results.
Using the ArcGIS API for Python, create a script to extract and analyze hydrologically relevant data from a shapefile of a watershed area. The script should calculate the following metrics: - drainage area - stream length - slope Use the following input parameters: - shapefile path: '/path/to/shapefile.shp' Output a summary data frame containing the calculated metrics and visualizations of the results, including a 3D plot of the drainage area and a 2D plot of the stream length along the watershed.
Using a Python library such as Scipy, develop a script to perform a sensitivity analysis of the parameters in a hydrologic model of a stormwater drainage system. The model parameters include: - Manning's roughness coefficient (n) - pipe diameter (D) - slope (S) Use the Sobol' sensitivity analysis method to estimate the sensitivity of the system's peak outflow rate to each parameter. Assume a model of a single stormwater pipe with a length of 100 meters and an initial flow rate of 10 liters per second. Output a summary table containing the estimated sensitivity indices and a plot of the sensitivity analysis results.
Create a Python script to generate a report containing the results of a hydrologic model of a flood-prone watershed area. The report should include: - a summary of the model input parameters and assumptions - a description of the model results, including water surface elevations and flow rates - visualizations of the model results, including a 3D plot of the water surface elevation and a 2D plot of the flow rate along the watershed Use the following input parameters: - model input file: 'model_input.txt' Output a PDF report containing the summary and visualizations, and a data frame containing the model results.