diff --git a/docs/pestutilslib/fortran_library_documentation.md b/docs/pestutilslib/fortran_library_documentation.md index 59550b0..3ccc7ff 100644 --- a/docs/pestutilslib/fortran_library_documentation.md +++ b/docs/pestutilslib/fortran_library_documentation.md @@ -1005,7 +1005,7 @@ Function *uninstall_structured_grid()* returns a value of zero unless an error c ### Description -The task performed by function *calc_kriging_factors_2d()* resembles that performed by a PLPROC function of the same name. As the name suggests, this function calculates kriging factors. More accurately, it calls modified functions of the SGLIB library (Deutsch and Journel, 1998) to calcite kriging factors. These factors will often be used to implement spatial interpolation from pilot points to a model grid. However function *calc_kriging_factors_2d()* makes no mention of either pilot points nor a model grid. The set of points to which spatial interpolation takes place are specified only by their coordinates. These can be the centres of cells of a structured or unstructured model grid. Alternatively, they may have no relationship to a model grid whatsoever. +The task performed by function *calc_kriging_factors_2d()* resembles that performed by a PLPROC function of the same name. As the name suggests, this function calculates kriging factors. More accurately, it calls modified functions of the GSLIB library (Deutsch and Journel, 1998) to calculate kriging factors. These factors will often be used to implement spatial interpolation from pilot points to a model grid. However function *calc_kriging_factors_2d()* makes no mention of either pilot points nor a model grid. The set of points to which spatial interpolation takes place are specified only by their coordinates. These can be the centres of cells of a structured or unstructured model grid. Alternatively, they may have no relationship to a model grid whatsoever. Other features of *calc_kriging_factors_2d* include the following: diff --git a/examples/exploring_lowlevel_pypestutils_functions.ipynb b/examples/exploring_lowlevel_pypestutils_functions.ipynb index 88510d2..311f711 100644 --- a/examples/exploring_lowlevel_pypestutils_functions.ipynb +++ b/examples/exploring_lowlevel_pypestutils_functions.ipynb @@ -260,6 +260,17 @@ "hdsdf" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "4ae6b876-8232-4dea-92cf-91aaf6448a74", + "metadata": {}, + "outputs": [], + "source": [ + "mtop = m.dis.top.array\n", + "mtop[mtop<-100] = np.nan" + ] + }, { "cell_type": "code", "execution_count": null, @@ -272,7 +283,7 @@ " ax.set_aspect(\"equal\")\n", " kdf = hdsdf.loc[hdsdf.layer==lay,:]\n", " assert kdf.shape[0] > 0\n", - " ax.pcolormesh(Easting,Northing,m.dis.top.array)\n", + " ax.pcolormesh(Easting,Northing,mtop)\n", " ax.scatter(kdf.x,kdf.y,marker=\"^\",c=\"k\",label=\"gw level loc\")\n", " ax.legend(loc=\"upper left\")\n", " ax.set_title(\"gw level locations in layer {0}\".format(lay),loc=\"left\")\n" @@ -806,6 +817,14 @@ "ax.pcolormesh(Easting,Northing,id_mask)\n", "ax.scatter(ppeasting,ppnorthing,marker=\".\",s=50,c=ppval)\n" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "25bbd45c-bbcb-425b-bf84-7f518acb7a78", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/examples/exploring_pypestutils_helpers.ipynb b/examples/exploring_pypestutils_helpers.ipynb index 4809da3..5b06963 100644 --- a/examples/exploring_pypestutils_helpers.ipynb +++ b/examples/exploring_pypestutils_helpers.ipynb @@ -191,7 +191,7 @@ " iidf = idf.loc[idf.site==site,:]\n", " iidf.loc[iidf.simulated>1e29,\"simulated\"] = np.nan\n", " fig,ax = plt.subplots(1,1,figsize=(8,5))\n", - " ax.plot(aadf.index,aadf.values,\"0.5\",lw=0.5,label=\"all sim times\")\n", + " ax.plot(aadf.index,aadf.values,\"0.5\",lw=0.5,marker=\"o\",mfc='none',label=\"all sim times\")\n", " ax.scatter(iidf.datetime,iidf.obsval,marker=\"^\",c=\"r\",label=\"observed\")\n", " ax.scatter(iidf.datetime,iidf.simulated,marker=\"^\",c=\"0.5\",label=\"interp to obs\")\n", " ax.set_title(site,loc=\"left\")\n", diff --git a/pypestutils/helpers.py b/pypestutils/helpers.py index 1adc4ed..cf3ab0a 100644 --- a/pypestutils/helpers.py +++ b/pypestutils/helpers.py @@ -287,7 +287,7 @@ def get_2d_pp_info_structured_grid( gridinfo_fname: str, array_dict = {}, name_prefix="pp" -) -> pandas.DataFrame: +) -> pd.DataFrame: """Create a grid of pilot point locations for a 2-D structured grid Parameters