Basic climate data analysis

The following processes concern basic climate data analysis, methods for formatting data to examine a specific region or time interval.

Spatial subsetting and regridding are methods of deriving a new set of data from another set of data using interpolation techniques to generate different spatial or temporal resolutions.

For more information on these processes, see the NCAR description of regridding page.

Spatial and temporal subsetting

class flyingpigeon.processes.SubsetWFSProcess[source]

subset_WFS Subset WFS (v0.1)

Return the data for which grid cells intersect the selected polygon for each input dataset.

Parameters:
  • resource (string) – NetCDF files, can be OPEnDAP urls.
  • typename (string) – Name of the layer in GeoServer.
  • featureids (string) – fid(s) of the feature in the layer.
  • geoserver (string, optional) – Typically of the form http://host:port/geoserver/wfs
  • mosaic (boolean, optional) – If True, selected regions will be merged into a single geometry.
  • variable (string, optional) – Name of the variable in the NetCDF file.Will be guessed if not provided.
Returns:

output – JSON file with link to NetCDF outputs.

Return type:

application/json

class flyingpigeon.processes.SubsetBboxProcess[source]

subset_bbox Subset (v0.1)

Return the data for which grid cells intersect the bounding box for each input dataset as well asthe time range selected.

Parameters:
  • resource (string) – NetCDF files, can be OPEnDAP urls.
  • lon0 (float) – Minimum longitude.
  • lon1 (float) – Maximum longitude.
  • lat0 (float) – Minimum latitude.
  • lat1 (float) – Maximum latitude.
  • initial_datetime (dateTime, optional) – Initial datetime for temporal subsetting.
  • final_datetime (dateTime, optional) – Final datetime for temporal subsetting.
  • variable (string, optional) – Name of the variable in the NetCDF file.Will be guessed if not provided.
Returns:

output – JSON file with link to NetCDF outputs.

Return type:

application/json

class flyingpigeon.processes.AveragerWFSProcess[source]

averager_WFS Averager WFS (v0.1)

Return the data with weighted average of grid cells intersecting the selected polygon for each input dataset.

Parameters:
  • resource (string) – NetCDF files, can be OPEnDAP urls.
  • typename (string) – Name of the layer in GeoServer.
  • featureids (string) – fid(s) of the feature in the layer.
  • geoserver (string, optional) – Typically of the form http://host:port/geoserver/wfs
  • mosaic (boolean, optional) – If True, selected regions will be merged into a single geometry.
  • variable (string, optional) – Name of the variable in the NetCDF file.Will be guessed if not provided.
Returns:

output – JSON file with link to NetCDF outputs.

Return type:

application/json

class flyingpigeon.processes.AveragerBboxProcess[source]

averager_bbox Averager (v0.1)

Return the data with weighted average of grid cells intersecting the bounding box for each input dataset as well as the time range selected.

Parameters:
  • resource (string) – NetCDF files, can be OPEnDAP urls.
  • lon0 (float) – Minimum longitude.
  • lon1 (float) – Maximum longitude.
  • lat0 (float) – Minimum latitude.
  • lat1 (float) – Maximum latitude.
  • initial_datetime (dateTime, optional) – Initial datetime for temporal subsetting.
  • final_datetime (dateTime, optional) – Final datetime for temporal subsetting.
  • variable (string, optional) – Name of the variable in the NetCDF file.Will be guessed if not provided.
Returns:

output – JSON file with link to NetCDF outputs.

Return type:

application/json

class flyingpigeon.processes.ClippingProcess[source]

subset_countries Subset (World Countries) (v0.10)

Return the data whose grid cells intersect the selected countries for each input dataset.

Parameters:
  • region ({'ABW', 'AFG', 'AGO', 'ALB', 'ALD', 'AND', 'ARE', 'ARG', 'ARM', 'ASM', ..}) – Country code, see ISO-3166-3: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements
  • mosaic (boolean, optional) – If True, selected regions will be merged into a single geometry.
  • resource (application/x-netcdf, application/x-tar, application/zip) – NetCDF Files or archive (tar/zip) containing NetCDF files. (Info)
Returns:

  • output (application/x-tar) – Tar archive of the subsetted netCDF files.
  • ncout (application/x-netcdf) – NetCDF file with subset for one dataset.
  • output_log (text/plain) – Collected logs during process run.

References

class flyingpigeon.processes.ClipcontinentProcess[source]

subset_continents Subset (Continents) (v0.10)

Return the data whose grid cells intersect the selected continents for each input dataset.

Parameters:
  • region ({'Africa', 'Asia', 'Australia', 'North America', 'Oceania', 'South America', 'Antarctica', 'Europe'}) – Continent name.
  • mosaic (boolean, optional) – If True, selected regions will be merged into a single geometry.
  • resource (application/x-netcdf, application/x-tar, application/zip) –

    NetCDF Files or archive (tar/zip) containing netCDF files. (Info)

Returns:

  • output (application/x-tar) – Tar archive of the subsetted netCDF files.
  • ncout (application/x-netcdf) – NetCDF file with subset for one dataset.
  • output_log (text/plain) – Collected logs during process run.

References

class flyingpigeon.processes.ClipregionseuropeProcess[source]

subset_regionseurope Subset (European Regions) (v0.10)

Return the data whose grid cells inteserct the selected regions for each input dataset.

Parameters:
  • region ({'DE.BR', 'ME.AN', 'SE.VN', 'UA.KM', 'UK.NI', 'DE.BW', 'UK.WA', 'LV.RG', 'DE.BY', 'EE.SA', ..}) – European region code, see ISO-3166 Alpha2: https://en.wikipedia.org/wiki/ISO_3166-2
  • mosaic (boolean, optional) – If True, selected regions will be merged into a single geometry.
  • resource (application/x-netcdf, application/x-tar, application/zip) – NetCDF Files or archive (tar/zip) containing NetCDF files.
Returns:

  • output (application/x-tar) – Tar archive of the subsetted netCDF files.
  • ncout (application/x-netcdf) – NetCDF file with subset for one dataset.
  • output_log (text/plain) – Collected logs during process run.

References

class flyingpigeon.processes.PointinspectionProcess[source]

pointinspection Point Inspection (v0.10)

Extract the timeseries at the given coordinates.

Parameters:
  • resource (application/x-netcdf, application/x-tar, application/zip) –

    NetCDF Files or archive (tar/zip) containing NetCDF files. (Info)

  • coords (string) – A comma-seperated tuple of WGS85 lon,lat decimal coordinates (e.g. 2.356138, 48.846450)
Returns:

  • output_log (text/plain) – Collected logs during process run.
  • tarout (application/x-tar) – Tar archive containing the netCDF files

References

class flyingpigeon.processes.LandseamaskProcess[source]

landseamask Land-Sea Mask (v0.3)

Mask grid cells according to their land area fraction. This process uses the ESGF datastore to access an appropriate land/sea mask.

Parameters:
  • dataset (application/x-netcdf, application/x-tar, application/zip, optional) – URL pointing to a NetCDF File or an archive (tar/zip) containing NetCDF files.
  • dataset_opendap (string, optional) – Remote OpenDAP data URL, for example: http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis2.dailyavgs/surface/mslp.2016.nc (application/x-ogc-dods)
  • threshold ({'10', '25', '50', '75', '90'}) – Land Area Fraction in percent.
  • mask (string, optional) – Optionally provide an OpenDAP URL to an appropriate land area fraction file. If no file is provided, the process will run a search on the ESGF archive.
  • land_or_sea ({'land', 'sea'}) – Either the land or the sea area of the mask will be subsetted.
Returns:

  • output_archive (application/x-tar) – Tar archive of the masked netCDF files.
  • output_example (application/x-netcdf) – An example file to display in the WMS.
  • output_log (text/plain) – Collected logs during process run.

References

class pavics_datacatalog.wps_processes.Period2Indices[source]

period2indices NetCDF time indices from a period (v0.1)

The final index is inclusive.

Parameters:
  • initial_date (string) – Format must be %Y-%m-%dT%H:%M:%S
  • final_date (string) – Format must be %Y-%m-%dT%H:%M:%S
  • opendap_url (string) – OPeNDAP url to a NetCDF file
  • calendar (string, optional) – If left unspecified, taken from NetCDF file time variable.
Returns:

  • initial_index (integer) – Initial time index of the period in the NetCDF file
  • final_index (integer) – Final time index of the period in the NetCDF file. The final index is inclusive.

class pavics_datacatalog.wps_processes.GetPoint[source]

getpoint Point value from a NetCDF file (v0.1)

Return a single value from a NetCDF file at the given grid coordinates.

Parameters:
  • opendap_url (string) – OPeNDAP url to NetCDF file.
  • variable (string) – NetCDF variable name.
  • use_ordered_indices (boolean, optional) – Whether ordered indices are used.
  • ordered_index (integer, optional) – Indices for the point in the NetCDF variable.
  • named_index (string, optional) – Indices for the point in the NetCDF variable with named dimensions (dim:index).
  • nearest_to (string, optional) – Nearest value for each dimension in the NetCDF variable for the point with named dimensions (dim:value).
  • threshold (string, optional) – Thresholds for the distance to each nearest value with named dimensions (dim:threshold).
Returns:

point_result – Information for the requested point.

Return type:

application/json

Spatial regridding

class flyingpigeon.processes.ESMFRegridProcess[source]

esmf_regrid ESMF regridding (v0.10)

Regrid netCDF files to a destination grid.

Parameters:
  • resource (application/x-netcdf, application/x-tar, application/zip) –

    NetCDF Files or archive (tar/zip) containing NetCDF files. (Info)

  • dest (application/x-netcdf, application/x-tar, application/zip) –

    NetCDF file whose grid defines the interpolation target. (Info)

  • method ({'bilinear', 'patch', 'conserve', 'nearest_stod', 'nearest_dtos'}, optional) – Regridding method. Note that conserve requires grid corners to be defined.
  • snippet (boolean, optional) – Run process only for first time step.
Returns:

  • output_log (text/plain) – Collected logs during process run.
  • output (application/json) – JSON file listing the regridded netCDF URLs.
  • output_netcdf (application/x-netcdf) – First NetCDF file generated by process.

References

Notes

Bilinear interpolation. Destination value is a linear combination of the source values in the cell which contains the destination point. The weights for the linear combination are based on the distance of the destination point from each source value.

Higher-order patch recovery interpolation. Destination value is a weighted average of 2D polynomial patches constructed from cells surrounding the source cell which contains the destination point. This method typically results in better approximations to values and derivatives than bilinear. However, because of its larger stencil, it also results in a much larger interpolation matrix than the bilinear method.

First order conservative interpolation. Value of a destination cell is the weighted sum of the values of the source cells that it overlaps. The weights are determined by the amount the source cell overlaps the destination cell. This method will typically give less accurate approximations to values than the other interpolation methods, however, it will do a much better job preserving the integral of the value between the source and destination. This method requires the corner coordinate values to be provided in the Grid, and it currently only works for Fields created on the Grid center stagger (or the Mesh element location).

In this version of nearest neighbor interpolation each destination point is mapped to the closest source point. A given source point may go to multiple destination points, but no destination point will receive input from more than one source point.

In this version of nearest neighbor interpolation each source point is mapped to the closest destination point. A given destination point may receive input from multiple source points, but no source point will go to more than one destination point.

Todo

Add content to the basic climate data analysis section