Skip to content
casadoj edited this page Aug 30, 2024 · 1 revision

This tool generates correlation decay distance (CDD) maps starting from station timeseries.

Requirements: python3, pyg2p

Usage

cddmap [directory]/[--analyze]/[--merge-and-filter-jsons]/--generatemap] [--start first_station] [--end last_station] [--parallel] [--only-extract-timeseries timeseries_keys_file] [--maxdistance max_distance_in_km]

The tool requires an input argument indicating the station timeseries main folder, and calculates the CDD for each station as well as correlations and distance files. Outputs the results in a TXT file containing station coordinates and CDD values. After creating the CDD text file, it can be used with one of the following commands:

  • --analyze: read cdd file previously created for postprocessing
  • --merge-and-filter-jsons: merge all CDD files in a folder and filters out a list of stations.
  • --generatemap: generate a NetCDF CDD map file using CDD txt file and angular distance weighted interpolation between station points.
  • --start and --end arguments are used to split the task in many sub tasks, evaluating only the stations between "start" and "end", since the CDD evaluation can be very time-demanding.
  • --only-extract-timeseries: in combination with path of the station's main folder, extracts the timeseries specified in the timeseries_keys_file txt list of keys.
  • --parallel: enable CDD evaluation in parallel on multiple cores. It will require more memory.
  • --maxdistance: evaluates only stations that are closer than this distance (km).

The input folder must contain the meteorological observation in text files.

Example

Example of command that will generate text files for the CDD of precipitation (pr), in parallel mode, for stations that are closer then 500 km:

cddmap /meteo/pr --parallel --maxdistance 500
Clone this wiki locally