![]() |
MODFLOW 6
version 6.9.0.dev0
USGS Modular Hydrologic Model
|
This module contains the NCModelExportModule. More...
Data Types | |
| type | exportpackagetype |
| type | ncexportannotation |
| netcdf export attribute annotations More... | |
| type | ncmodelexporttype |
| base class for an export model More... | |
| type | ncbasemodelexporttype |
| abstract type for model netcdf export type More... | |
| interface | model_define |
| abstract interfaces for model netcdf export type More... | |
| interface | model_step |
| interface | package_export |
| interface | package_export_ilayer |
Enumerations | |
| enum | |
| netcdf export types enumerator More... | |
Functions/Subroutines | |
| subroutine | epkg_init (this, mf6_input, mshape, naux, param_names, nparam) |
| initialize dynamic package export object More... | |
| subroutine | epkg_destroy (this) |
| destroy dynamic package export object More... | |
| subroutine | set (this, modelname, modeltype, modelfname, nctype, disenum) |
| set netcdf file scoped attributes More... | |
| subroutine | export_init (this, modelname, modeltype, modelfname, nc_fname, disenum, nctype, iout) |
| initialization of model netcdf export More... | |
| class(exportpackagetype) function, pointer | export_get (this, idx) |
| retrieve dynamic export object from package list More... | |
| character(len=linelength) function | input_attribute (this, pkgname, idt) |
| build modflow_input attribute string More... | |
| integer(i4b) function | istp (this) |
| step index for timeseries data More... | |
| character(len=linelength) function, public | export_varname (pkgname, tagname, mempath, layer, iaux) |
| build netcdf variable name More... | |
| character(len=linelength) function, public | export_longname (longname, pkgname, tagname, mempath, layer, iaux, component_type, subcomponent_type) |
| build netcdf variable longname More... | |
| subroutine | export_input (this) |
| netcdf dynamic package period export More... | |
| character(len=linelength) function, public | wkt_to_cf_gridmapping (wkt) |
| map a WKT string to a CF-1.13 grid_mapping_name More... | |
| real(dp) function | wkt_find_param (wkt, name, found) |
| find the first number following a quoted parameter name More... | |
| subroutine | wkt_find_ellipsoid (wkt, semi_major_axis, inverse_flattening, found) |
| find semi-major axis and inverse flattening from a WKT string More... | |
| subroutine, public | wkt_transverse_mercator_params (wkt, longitude_of_central_meridian, latitude_of_projection_origin, scale_factor_at_central_meridian, false_easting, false_northing, semi_major_axis, inverse_flattening, found) |
| extract CF transverse_mercator grid_mapping parameters More... | |
| subroutine, public | wkt_lambert_conformal_conic_params (wkt, standard_parallel_1, standard_parallel_2, longitude_of_central_meridian, latitude_of_projection_origin, false_easting, false_northing, semi_major_axis, inverse_flattening, is_2sp, found) |
| extract CF lambert_conformal_conic grid_mapping parameters More... | |
| subroutine, public | wkt_albers_conical_equal_area_params (wkt, standard_parallel_1, standard_parallel_2, longitude_of_central_meridian, latitude_of_projection_origin, false_easting, false_northing, semi_major_axis, inverse_flattening, found) |
| extract CF albers_conical_equal_area grid_mapping parameters More... | |
| character(len=lenbigline) function, public | wrap_rotated_crs (wkt, xorigin, yorigin, angrot) |
| wrap a WKT2 PROJCRS in a derived CRS encoding grid rotation More... | |
| subroutine | export_destroy (this) |
| destroy model netcdf export object More... | |
Variables | |
| @, public | netcdf_undef = 0 |
| undefined netcdf export type More... | |
| @, public | netcdf_structured = 1 |
| netcdf structrured export More... | |
| @, public | netcdf_mesh2d = 2 |
| netcdf ugrid layered mesh export More... | |
This module defines a model export and base type for supported netcdf files and is not dependent on netcdf libraries.
|
private |
Definition at line 35 of file NCModel.f90.
| subroutine ncmodelexportmodule::epkg_destroy | ( | class(exportpackagetype), intent(inout) | this | ) |
Definition at line 198 of file NCModel.f90.
|
private |
| [in] | mshape | model shape |
Definition at line 150 of file NCModel.f90.

| subroutine ncmodelexportmodule::export_destroy | ( | class(ncmodelexporttype), intent(inout) | this | ) |
Definition at line 1012 of file NCModel.f90.

| class(exportpackagetype) function, pointer ncmodelexportmodule::export_get | ( | class(ncmodelexporttype), intent(inout) | this, |
| integer(i4b), intent(in) | idx | ||
| ) |
Definition at line 403 of file NCModel.f90.
| subroutine ncmodelexportmodule::export_init | ( | class(ncmodelexporttype), intent(inout) | this, |
| character(len=*), intent(in) | modelname, | ||
| character(len=*), intent(in) | modeltype, | ||
| character(len=*), intent(in) | modelfname, | ||
| character(len=*), intent(in) | nc_fname, | ||
| integer(i4b), intent(in) | disenum, | ||
| integer(i4b), intent(in) | nctype, | ||
| integer(i4b), intent(in) | iout | ||
| ) |
Definition at line 281 of file NCModel.f90.

| subroutine ncmodelexportmodule::export_input | ( | class(ncbasemodelexporttype), intent(inout) | this | ) |
Definition at line 548 of file NCModel.f90.
| character(len=linelength) function, public ncmodelexportmodule::export_longname | ( | character(len=*), intent(in) | longname, |
| character(len=*), intent(in) | pkgname, | ||
| character(len=*), intent(in) | tagname, | ||
| character(len=*), intent(in) | mempath, | ||
| integer(i4b), intent(in), optional | layer, | ||
| integer(i4b), intent(in), optional | iaux, | ||
| character(len=*), intent(in), optional | component_type, | ||
| character(len=*), intent(in), optional | subcomponent_type | ||
| ) |
Definition at line 494 of file NCModel.f90.


| character(len=linelength) function, public ncmodelexportmodule::export_varname | ( | character(len=*), intent(in) | pkgname, |
| character(len=*), intent(in) | tagname, | ||
| character(len=*), intent(in) | mempath, | ||
| integer(i4b), intent(in), optional | layer, | ||
| integer(i4b), intent(in), optional | iaux | ||
| ) |
Definition at line 453 of file NCModel.f90.


| character(len=linelength) function ncmodelexportmodule::input_attribute | ( | class(ncmodelexporttype), intent(inout) | this, |
| character(len=*), intent(in) | pkgname, | ||
| type(inputparamdefinitiontype), intent(in), pointer | idt | ||
| ) |
Definition at line 421 of file NCModel.f90.

| integer(i4b) function ncmodelexportmodule::istp | ( | class(ncmodelexporttype), intent(inout) | this | ) |
Definition at line 439 of file NCModel.f90.
| subroutine ncmodelexportmodule::set | ( | class(ncexportannotation), intent(inout) | this, |
| character(len=*), intent(in) | modelname, | ||
| character(len=*), intent(in) | modeltype, | ||
| character(len=*), intent(in) | modelfname, | ||
| integer(i4b), intent(in) | nctype, | ||
| integer(i4b), intent(in) | disenum | ||
| ) |
| subroutine, public ncmodelexportmodule::wkt_albers_conical_equal_area_params | ( | character(len=*), intent(in) | wkt, |
| real(dp), intent(out) | standard_parallel_1, | ||
| real(dp), intent(out) | standard_parallel_2, | ||
| real(dp), intent(out) | longitude_of_central_meridian, | ||
| real(dp), intent(out) | latitude_of_projection_origin, | ||
| real(dp), intent(out) | false_easting, | ||
| real(dp), intent(out) | false_northing, | ||
| real(dp), intent(out) | semi_major_axis, | ||
| real(dp), intent(out) | inverse_flattening, | ||
| logical(lgp), intent(out) | found | ||
| ) |
Best-effort extraction from a WKT1 or WKT2 string – MF6 has no CRS parsing library. found=.false. if any parameter cannot be located.
Definition at line 867 of file NCModel.f90.


| subroutine ncmodelexportmodule::wkt_find_ellipsoid | ( | character(len=*), intent(in) | wkt, |
| real(dp), intent(out) | semi_major_axis, | ||
| real(dp), intent(out) | inverse_flattening, | ||
| logical(lgp), intent(out) | found | ||
| ) |
Matches SPHEROID["name",A,B,...] (WKT1) or ELLIPSOID["name",A,B,...] (WKT2). Best-effort only. found=.false. if neither keyword is present or the two numbers cannot be read.
Definition at line 698 of file NCModel.f90.


| real(dp) function ncmodelexportmodule::wkt_find_param | ( | character(len=*), intent(in) | wkt, |
| character(len=*), intent(in) | name, | ||
| logical(lgp), intent(out) | found | ||
| ) |
Matches e.g. PARAMETER["central_meridian",-117] (WKT1) or PARAMETER["Longitude of natural origin",-117,...] (WKT2). Best-effort only – MF6 has no CRS parsing library. found=.false. if name is not present or no number follows it.
Definition at line 656 of file NCModel.f90.


| subroutine, public ncmodelexportmodule::wkt_lambert_conformal_conic_params | ( | character(len=*), intent(in) | wkt, |
| real(dp), intent(out) | standard_parallel_1, | ||
| real(dp), intent(out) | standard_parallel_2, | ||
| real(dp), intent(out) | longitude_of_central_meridian, | ||
| real(dp), intent(out) | latitude_of_projection_origin, | ||
| real(dp), intent(out) | false_easting, | ||
| real(dp), intent(out) | false_northing, | ||
| real(dp), intent(out) | semi_major_axis, | ||
| real(dp), intent(out) | inverse_flattening, | ||
| logical(lgp), intent(out) | is_2sp, | ||
| logical(lgp), intent(out) | found | ||
| ) |
Best-effort extraction from a WKT1 or WKT2 string – MF6 has no CRS parsing library. 2SP (two standard parallels) only: CF's lambert_conformal_conic has no scale_factor attribute, so a 1SP (scale-factor-based) WKT cannot be exactly represented without trigonometric conversion MF6 has no library for. is_2sp=.false. if a second standard parallel is not present (i.e. likely 1SP); found=.false. if is_2sp but any other parameter cannot be located.
Definition at line 807 of file NCModel.f90.


| character(len=linelength) function, public ncmodelexportmodule::wkt_to_cf_gridmapping | ( | character(len=*), intent(in) | wkt | ) |
Accepts either WKT1 (OGC 01-009, PROJECTION["name"]) or WKT2 (ISO 19162:2019, METHOD["name"]) format. WKT1 is tried first; if PROJECTION[ is absent the WKT2 METHOD[ path is attempted. Returns '' for geographic CRS or unrecognised projection names. Only common groundwater projections included. Matching is case-insensitive.
Definition at line 573 of file NCModel.f90.


| subroutine, public ncmodelexportmodule::wkt_transverse_mercator_params | ( | character(len=*), intent(in) | wkt, |
| real(dp), intent(out) | longitude_of_central_meridian, | ||
| real(dp), intent(out) | latitude_of_projection_origin, | ||
| real(dp), intent(out) | scale_factor_at_central_meridian, | ||
| real(dp), intent(out) | false_easting, | ||
| real(dp), intent(out) | false_northing, | ||
| real(dp), intent(out) | semi_major_axis, | ||
| real(dp), intent(out) | inverse_flattening, | ||
| logical(lgp), intent(out) | found | ||
| ) |
Best-effort extraction from a WKT1 or WKT2 string – MF6 has no CRS parsing library. Tries WKT1 parameter names first, falling back to WKT2 names. found=.false. if any parameter cannot be located.
Definition at line 757 of file NCModel.f90.


| character(len=lenbigline) function, public ncmodelexportmodule::wrap_rotated_crs | ( | character(len=*), intent(in) | wkt, |
| real(dp), intent(in) | xorigin, | ||
| real(dp), intent(in) | yorigin, | ||
| real(dp), intent(in) | angrot | ||
| ) |
Builds a DerivedProjectedCRS wrapping the given WKT2 PROJCRS in an EPSG:9624 (affine parametric transformation) deriving conversion parameterized from xorigin/yorigin/angrot (degrees). Per ISO 19111, a deriving conversion is directed base->derived, so the parameters encode the world->local (inverse) rotation; a CRS-aware consumer applies the inverse to resolve true position from local coordinates. Returns '' if wkt is not recognized as a WKT2 PROJCRS – a best-effort structural check only, as MF6 has no CRS parsing library and does not validate the WKT beyond this.
Definition at line 928 of file NCModel.f90.


| @, public ncmodelexportmodule::netcdf_mesh2d = 2 |
Definition at line 38 of file NCModel.f90.
| @, public ncmodelexportmodule::netcdf_structured = 1 |
Definition at line 37 of file NCModel.f90.
| @, public ncmodelexportmodule::netcdf_undef = 0 |
Definition at line 36 of file NCModel.f90.