Package 'cmsafvis'

Title: Tools to Visualize CM SAF NetCDF Data
Description: The Satellite Application Facility on Climate Monitoring (CM SAF) is a ground segment of the European Organization for the Exploitation of Meteorological Satellites (EUMETSAT) and one of EUMETSATs Satellite Application Facilities. The CM SAF contributes to the sustainable monitoring of the climate system by providing essential climate variables related to the energy and water cycle of the atmosphere (<https://www.cmsaf.eu>). It is a joint cooperation of eight National Meteorological and Hydrological Services. The 'cmsafvis' R-package provides a collection of R-operators for the analysis and visualization of CM SAF NetCDF data. CM SAF climate data records are provided for free via (<https://wui.cmsaf.eu/safira>). Detailed information and test data are provided on the CM SAF webpage (<http://www.cmsaf.eu/R_toolbox>).
Authors: Steffen Kothe [aut, cre], Danny Parsons [ctb]
Maintainer: Steffen Kothe <[email protected]>
License: GPL (>= 3)
Version: 1.2.9
Built: 2025-02-21 05:31:19 UTC
Source: https://github.com/cmsaf/cmsaf-r-tools

Help Index


cmsafvis: A 'cmsaf' package extension for visualization of CM SAF NetCDF data.

Description

The 'cmsafvis' plotting routines are designed to analyze climate files by generating graphics or videos. The functions (Fieldmean, Fieldmean and anomaly plots) were designed and tested for daily valued CM SAF NetCDF data. The functions (Absolute Map, Anomaly Map, Climatology, Warming Stripes Plot, Time Series Plot, Trend Plot) were designed and tested for daily or monthly valued CM SAF NetCDF data. As interface to NetCDF data the ncdf4 package is used.

Author(s)

Maintainer: Steffen Kothe [email protected]

Other contributors:

See Also

Useful links:


A 'cmsaf' extension for creating absolute valued plots.

Description

This plotting routine generates graphical output for the given variable within the given time range and area. Dependent on the output format a PNG or MP4 is created.

Usage

absolute_map(
  config = NULL,
  variable = NULL,
  accumulate = FALSE,
  mean_value = FALSE,
  infile = NULL,
  temp_dir = tempdir(),
  out_dir = getwd(),
  start_date = NULL,
  end_date = NULL,
  country_code = "S_A",
  lon_min = NULL,
  lon_max = NULL,
  lat_min = NULL,
  lat_max = NULL,
  outfile_name = NULL,
  output_format = "animation",
  animation_pace = 0.07,
  freeze_animation = FALSE,
  min_value = NULL,
  max_value = NULL,
  nbreaks = NULL,
  language = "eng",
  keep_files = TRUE,
  states = FALSE,
  attach = FALSE,
  infile_attach = "auto",
  dwd_logo = FALSE,
  verbose = TRUE,
  nc = NULL
)

Arguments

config

Path to YAML config file (character). The config file does not have to specify all arguments. Each addressed argument has to be formatted according to the example config file: (#TODO: LINK EXAMPLE CONFIG FILE!).

variable

Name of variable in infile (NULL or character). If NULL then the first variable from the infile is taken.

accumulate

Whether the input file should be accumulated (logical).

mean_value

Whether the input file should be averaged (logical).

infile

Path to NetCDF file (NULL or character). If NULL then it needs to be specified in the config file.

temp_dir

Path to temporary working directory (character).

out_dir

Path to output directory (character).

start_date

Start date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the first date of the infile is used.

end_date

End date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the last date of the infile is used.

country_code

Either a country code in iso3c format or from the following: 'AFR' for Africa, 'EUR' for Europe, 'TOT' for the total disc, or 'S_A' for an arbitrary region selection (character). If a country is passed the data from within this country is extracted, else a rectangular box is visualized. Directly provided latitude and longitude ranges will be ignored in case of 'AFR', 'EUR' or 'TOT'.

lon_min

Longitude of lower left corner (NULL or numeric). If NULL then the smallest longitude of the infile is used.

lon_max

Longitude of upper right left corner (NULL or numeric). If NULL then the largest longitude of the infile is used.

lat_min

Latitude of lower left corner (NULL or numeric). If NULL then the smallest latitude of the infile is used.

lat_max

Latitude of upper right corner (NULL or numeric). If NULL then the largest latitude of the infile is used.

outfile_name

Filename of the PNG or MP4 outfile (NULL or character). If NULL then a name is computed from the current configuration. Please match the file ending according to the output_format.

output_format

Specification of output format (either 'graphic' for PNG or 'animation' for MP4).

animation_pace

Pace of the animation in seconds (positive numeric). This only has an effect if output_format == 'animation'.

freeze_animation

If TRUE then the animation will freeze at the last frame (logical).

min_value

Lower values than this are ignored (NULL or numeric). If NULL, no values are ignored.

max_value

Larger values than this are ignored (NULL or numeric). If NULL, no values are ignored.

nbreaks

Number of color breaks (NULL or positive integer). A value will be computed if NULL is passed.

language

Language used for title, legend, etc. in plots (either 'eng' for English or 'deu' for German).

keep_files

A flag indicating whether all files created in the process of obtaining the output file should be kept (logical). If false, all intermediate results are deleted, otherwise all are kept. Keeping these files could improve performance in further function calls.

states

Whether to crop/plot administration level of states (logical).

attach

Whether to temporaly merge the infile to an already existing one. (logical).

infile_attach

File to attach the infile to. When 'auto', a suitable file will be searched in out_dir. If attach is false, this will be ignored(character).

Whether to add the DWD logo (logical).

verbose

Whether to display progress messages (logical).

nc

Alternatively to infile you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

Details

You can pass a YAML config file and/or specify the arguments directly. Argument prioritization is done in the following way: Direct argument > config argument > default argument. Thus, if you pass a existing config file but also want to modify a specific argument you can do that easily.


A 'cmsaf' extension for creating an anomaly map.

Description

This plotting routine generates a graph showing the anomaly of a given variable within the given time range and area. The intended application is for daily accumulated data, such as sunshine duration. Dependent on the output format a PNG or MP4 is created.

Usage

anomaly_map(
  config = NULL,
  variable = NULL,
  accumulate = FALSE,
  mean_value = FALSE,
  infile = NULL,
  temp_dir = tempdir(),
  out_dir = getwd(),
  climate_dir = NULL,
  climate_year_start = 1983,
  climate_year_end = 2018,
  start_date = NULL,
  end_date = NULL,
  country_code = "S_A",
  lon_min = NULL,
  lon_max = NULL,
  lat_min = NULL,
  lat_max = NULL,
  outfile_name = NULL,
  output_format = "animation",
  animation_pace = 0.07,
  freeze_animation = FALSE,
  min_value = NULL,
  max_value = NULL,
  color_pal = 1,
  relative = FALSE,
  nbreaks = NULL,
  language = "eng",
  keep_files = TRUE,
  states = FALSE,
  attach = FALSE,
  infile_attach = "auto",
  dwd_logo = FALSE,
  verbose = TRUE,
  nc = NULL
)

Arguments

config

Path to YAML config file (character). The config file does not have to specify all arguments. Each addressed argument has to be formatted according to the example config file: (#TODO: LINK EXAMPLE CONFIG FILE!).

variable

Name of variable in infile (NULL or character). If NULL then the first variable from the infile is taken.

accumulate

Whether the input file should be accumulated (logical).

mean_value

Whether the input file should be averaged (logical).

infile

Path to NetCDF file (NULL or character). If NULL then it needs to be specified in the config file.

temp_dir

Path to temporary working directory (character).

out_dir

Path to output directory (character).

climate_dir

Path to directory in which climatology is computed or contained (NULL or character). If NULL then the temp_dir directory is taken.

climate_year_start

Start year of climatology (integer).

climate_year_end

End year of climatology (integer).

start_date

Start date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the first date of the infile is used.

end_date

End date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the last date of the infile is used.

country_code

Either a country code in iso3c format or from the following: 'AFR' for Africa, 'EUR' for Europe, 'TOT' for the total disc, or 'S_A' for an arbitrary region selection (character). If a country is passed the data from within this country is extracted, else a rectangular box is visualized. Directly provided latitude and longitude ranges will be ignored in case of 'AFR', 'EUR' or 'TOT'.

lon_min

Longitude of lower left corner (NULL or numeric). If NULL then the smallest longitude of the infile is used.

lon_max

Longitude of upper right left corner (NULL or numeric). If NULL then the largest longitude of the infile is used.

lat_min

Latitude of lower left corner (NULL or numeric). If NULL then the smallest latitude of the infile is used.

lat_max

Latitude of upper right corner (NULL or numeric). If NULL then the largest latitude of the infile is used.

outfile_name

Filename of the PNG or MP4 outfile (NULL or character). If NULL then a name is computed from the current configuration. Please match the file ending according to the output_format.

output_format

Specification of output format (either 'graphic' for PNG or 'animation' for MP4).

animation_pace

Pace of the animation in seconds (positive numeric). This only has an effect if output_format == 'animation'.

freeze_animation

If TRUE then the animation will freeze at the last frame (logical).

min_value

Lower values than this are ignored (NULL or numeric). If NULL, no values are ignored.

max_value

Larger values than this are ignored (NULL or numeric). If NULL, no values are ignored.

color_pal

Color option for stripe and anomaly plots

relative

Use relative values for anomaly plots

nbreaks

Number of color breaks (NULL or positive integer). A value will be computed if NULL is passed.

language

Language used for title, legend, etc. in plots (either 'eng' for English or 'deu' for German).

keep_files

A flag indicating whether all files created in the process of obtaining the output file should be kept (logical). If false, all intermediate results are deleted, otherwise all are kept. Keeping these files could improve performance in further function calls.

states

Whether to crop/plot administration level of states (logical).

attach

Whether to temporaly merge the infile to an already existing one. (logical).

infile_attach

File to attach the infile to. When 'auto', a suitable file will be searched in out_dir. If attach is false, this will be ignored(character).

Whether to add the DWD logo (logical).

verbose

Whether to display progress messages (logical).

nc

Alternatively to infile you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

Details

You can pass a YAML config file and / or specify the arguments directly. Argument prioritization is done in the following way: Direct argument > config argument > default argument. Thus, if you pass a existing config file but also want to modify a specific argument you can do that easily.


A 'cmsaf' extension for creating a climatology map.

Description

This plotting routine generates the climatological mean for the given variable within the given time range and area. The intended application is for daily accumulated data, such as sunshine duration. Dependent on the output format a PNG or MP4 is created.

Usage

climatology_map(
  config = NULL,
  variable = NULL,
  accumulate = FALSE,
  mean_value = FALSE,
  infile = NULL,
  temp_dir = tempdir(),
  out_dir = getwd(),
  climate_dir = NULL,
  climate_year_start = 1983,
  climate_year_end = 2018,
  start_date = NULL,
  end_date = NULL,
  country_code = "S_A",
  lon_min = NULL,
  lon_max = NULL,
  lat_min = NULL,
  lat_max = NULL,
  outfile_name = NULL,
  output_format = "animation",
  animation_pace = 0.07,
  freeze_animation = FALSE,
  min_value = NULL,
  max_value = NULL,
  nbreaks = NULL,
  language = "eng",
  keep_files = TRUE,
  states = FALSE,
  attach = FALSE,
  infile_attach = "auto",
  dwd_logo = FALSE,
  verbose = TRUE,
  nc = NULL
)

Arguments

config

Path to YAML config file (character). The config file does not have to specify all arguments. Each addressed argument has to be formatted according to the example config file: (#TODO: LINK EXAMPLE CONFIG FILE!).

variable

Name of variable in infile (NULL or character). If NULL then the first variable from the infile is taken.

accumulate

Whether the input file should be accumulated (logical).

mean_value

Whether the input file should be averaged (logical).

infile

Path to NetCDF file (NULL or character). If NULL then it needs to be specified in the config file.

temp_dir

Path to temporary working directory (character).

out_dir

Path to output directory (character).

climate_dir

Path to directory in which climatology is computed or contained (NULL or character). If NULL then the temp_dir directory is taken.

climate_year_start

Start year of climatology (integer).

climate_year_end

End year of climatology (integer).

start_date

Start date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the first date of the infile is used.

end_date

End date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the last date of the infile is used.

country_code

Either a country code in iso3c format or from the following: 'AFR' for Africa, 'EUR' for Europe, 'TOT' for the total disc, or 'S_A' for an arbitrary region selection (character). If a country is passed the data from within this country is extracted, else a rectangular box is visualized. Directly provided latitude and longitude ranges will be ignored in case of 'AFR', 'EUR' or 'TOT'.

lon_min

Longitude of lower left corner (NULL or numeric). If NULL then the smallest longitude of the infile is used.

lon_max

Longitude of upper right left corner (NULL or numeric). If NULL then the largest longitude of the infile is used.

lat_min

Latitude of lower left corner (NULL or numeric). If NULL then the smallest latitude of the infile is used.

lat_max

Latitude of upper right corner (NULL or numeric). If NULL then the largest latitude of the infile is used.

outfile_name

Filename of the PNG or MP4 outfile (NULL or character). If NULL then a name is computed from the current configuration. Please match the file ending according to the output_format.

output_format

Specification of output format (either 'graphic' for PNG or 'animation' for MP4).

animation_pace

Pace of the animation in seconds (positive numeric). This only has an effect if output_format == 'animation'.

freeze_animation

If TRUE then the animation will freeze at the last frame (logical).

min_value

Lower values than this are ignored (NULL or numeric). If NULL, no values are ignored.

max_value

Larger values than this are ignored (NULL or numeric). If NULL, no values are ignored.

nbreaks

Number of color breaks (NULL or positive integer). A value will be computed if NULL is passed.

language

Language used for title, legend, etc. in plots (either 'eng' for English or 'deu' for German).

keep_files

A flag indicating whether all files created in the process of obtaining the output file should be kept (logical). If false, all intermediate results are deleted, otherwise all are kept. Keeping these files could improve performance in further function calls.

states

Whether to crop/plot administration level of states (logical).

attach

Whether to temporaly merge the infile to an already existing one. (logical).

infile_attach

File to attach the infile to. When 'auto', a suitable file will be searched in out_dir. If attach is false, this will be ignored(character).

Whether to add the DWD logo (logical).

verbose

Whether to display progress messages (logical).

nc

Alternatively to infile you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

Details

You can pass a YAML config file and/or specify the arguments directly. Argument prioritization is done in the following way: Direct argument > config argument > default argument. Thus, if you pass a existing config file but also want to modify a specific argument you can do that easily.


Plotting routine designed for the CM SAF R Toolbox.

Description

This function renders a difference plot (absolute or relative) of two variables.

Usage

cmsaf.diff(
  var1,
  infile1,
  var2,
  infile2,
  outfile,
  plot.out = FALSE,
  relative = FALSE,
  nc34 = 4,
  overwrite = FALSE,
  verbose = FALSE,
  toolbox = FALSE,
  nc1 = NULL,
  nc2 = NULL
)

Arguments

var1

Name of the first NetCDF variable (character).

infile1

Filename of the first input NetCDF file. This may include the directory (character).

var2

Name of the second NetCDF variable (character).

infile2

Filename of the second input NetCDF file. This may include the directory (character).

outfile

Filename of output NetCDF file. This may include the directory (character).

plot.out

logical; if TRUE, the plot will be stored in the same folder as outfile. If FALSE, the plot will not be saved.

relative

logical; if TRUE, plot a relative difference plot

nc34

NetCDF version of output file. If nc34 = 3 the output file will be in NetCDFv3 format (numeric). Default output is NetCDFv4.

overwrite

logical; should existing output file be overwritten?

verbose

logical; if TRUE, progress messages are shown

toolbox

logical; if TRUE, toolbox mode enabled. The two files are adjusted in space and time so that they can be plotted.

nc1

Alternatively to infile1 you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

nc2

Alternatively to infile2 you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

Value

A NetCDF file is written.

See Also

Other 2d visualization: cmsaf.side.by.side()


Plotting routine designed for the CM SAF R Toolbox.

Description

This function renders a histogram plot of two variables.

Usage

cmsaf.hist(
  var1,
  infile1,
  var2,
  infile2,
  outfile1,
  outfile2,
  plot.out = FALSE,
  nc34 = 4,
  overwrite = FALSE,
  verbose = FALSE,
  toolbox = FALSE,
  nc1 = NULL,
  nc2 = NULL
)

Arguments

var1

Name of the first NetCDF variable (character).

infile1

Filename of the first input NetCDF file. This may include the directory (character).

var2

Name of the second NetCDF variable (character).

infile2

Filename of the second input NetCDF file. This may include the directory (character).

outfile1

Filename of the first output NetCDF file. This may include the directory (character).

outfile2

Filename of the second output NetCDF file. This may include the directory (character).

plot.out

logical; if TRUE, the plot will be stored in the same folder as outfile1. If FALSE, the plot will not be saved.

nc34

NetCDF version of output file. If nc34 = 3 the output file will be in NetCDFv3 format (numeric). Default output is NetCDFv4.

overwrite

logical; should existing output file be overwritten?

verbose

logical; if TRUE, progress messages are shown

toolbox

logical; if TRUE, toolbox mode enabled. The two files are adjusted in space and time so that they can be plotted.

nc1

Alternatively to infile1 you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

nc2

Alternatively to infile2 you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

Value

Two NetCDF files are written.

See Also

Other 1d visualization: cmsaf.hovmoller(), cmsaf.scatter(), cmsaf.time.series()


Plotting routine designed for the CM SAF R Toolbox.

Description

This function renders a hovmoller plot of two variables.

Usage

cmsaf.hovmoller(
  var1,
  infile1,
  var2,
  infile2,
  outfile1,
  outfile2,
  plot.out = FALSE,
  nc34 = 4,
  overwrite = FALSE,
  verbose = FALSE,
  toolbox = FALSE,
  nc1 = NULL,
  nc2 = NULL
)

Arguments

var1

Name of the first NetCDF variable (character).

infile1

Filename of the first input NetCDF file. This may include the directory (character).

var2

Name of the second NetCDF variable (character).

infile2

Filename of the second input NetCDF file. This may include the directory (character).

outfile1

Filename of the first output NetCDF file. This may include the directory (character).

outfile2

Filename of the second output NetCDF file. This may include the directory (character).

plot.out

logical; if TRUE, the plot will be stored in the same folder as outfile1. If FALSE, the plot will not be saved.

nc34

NetCDF version of output file. If nc34 = 3 the output file will be in NetCDFv3 format (numeric). Default output is NetCDFv4.

overwrite

logical; should existing output file be overwritten?

verbose

logical; if TRUE, progress messages are shown

toolbox

logical; if TRUE, toolbox mode enabled. The two files are adjusted in space and time so that they can be plotted.

nc1

Alternatively to infile1 you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

nc2

Alternatively to infile2 you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

Value

Two NetCDF files are written.

See Also

Other 1d visualization: cmsaf.hist(), cmsaf.scatter(), cmsaf.time.series()


Plotting routine designed for the CM SAF R Toolbox.

Description

This function renders a scatter plot of two variables.

Usage

cmsaf.scatter(
  var1,
  infile1,
  var2,
  infile2,
  outfile1,
  outfile2,
  plot.out = FALSE,
  nc34 = 4,
  overwrite = FALSE,
  verbose = FALSE,
  toolbox = FALSE,
  nc1 = NULL,
  nc2 = NULL
)

Arguments

var1

Name of the first NetCDF variable (character).

infile1

Filename of the first input NetCDF file. This may include the directory (character).

var2

Name of the second NetCDF variable (character).

infile2

Filename of the second input NetCDF file. This may include the directory (character).

outfile1

Filename of the first output NetCDF file. This may include the directory (character).

outfile2

Filename of the second output NetCDF file. This may include the directory (character).

plot.out

logical; if TRUE, the plot will be stored in the same folder as outfile1. If FALSE, the plot will not be saved.

nc34

NetCDF version of output file. If nc34 = 3 the output file will be in NetCDFv3 format (numeric). Default output is NetCDFv4.

overwrite

logical; should existing output file be overwritten?

verbose

logical; if TRUE, progress messages are shown

toolbox

logical; if TRUE, toolbox mode enabled. The two files are adjusted in space and time so that they can be plotted.

nc1

Alternatively to infile1 you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

nc2

Alternatively to infile2 you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

Value

Two NetCDF files are written.

See Also

Other 1d visualization: cmsaf.hist(), cmsaf.hovmoller(), cmsaf.time.series()


Plotting routine designed for the CM SAF R Toolbox.

Description

This function renders a side by side plot of two variables.

Usage

cmsaf.side.by.side(
  var1,
  infile1,
  var2,
  infile2,
  outfile1,
  outfile2,
  plot.out = FALSE,
  nc34 = 4,
  overwrite = FALSE,
  verbose = FALSE,
  toolbox = FALSE,
  nc1 = NULL,
  nc2 = NULL
)

Arguments

var1

Name of the first NetCDF variable (character).

infile1

Filename of the first input NetCDF file. This may include the directory (character).

var2

Name of the second NetCDF variable (character).

infile2

Filename of the second input NetCDF file. This may include the directory (character).

outfile1

Filename of the first output NetCDF file. This may include the directory (character).

outfile2

Filename of the second output NetCDF file. This may include the directory (character).

plot.out

logical; if TRUE, the plot will be stored in the same folder as outfile1. If FALSE, the plot will not be saved.

nc34

NetCDF version of output file. If nc34 = 3 the output file will be in NetCDFv3 format (numeric). Default output is NetCDFv4.

overwrite

logical; should existing output file be overwritten?

verbose

logical; if TRUE, progress messages are shown

toolbox

logical; if TRUE, toolbox mode enabled. The two files are adjusted in space and time so that they can be plotted.

nc1

Alternatively to infile1 you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

nc2

Alternatively to infile2 you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

Value

Two NetCDF files are written.

See Also

Other 2d visualization: cmsaf.diff()


Plotting routine designed for the CM SAF R Toolbox.

Description

This function renders a time series plot of two variables.

Usage

cmsaf.time.series(
  var1,
  infile1,
  var2,
  infile2,
  outfile1,
  outfile2,
  plot.out = FALSE,
  nc34 = 4,
  overwrite = FALSE,
  verbose = FALSE,
  toolbox = FALSE,
  nc1 = NULL,
  nc2 = NULL
)

Arguments

var1

Name of the first NetCDF variable (character).

infile1

Filename of the first input NetCDF file. This may include the directory (character).

var2

Name of the second NetCDF variable (character).

infile2

Filename of the second input NetCDF file. This may include the directory (character).

outfile1

Filename of the first output NetCDF file. This may include the directory (character).

outfile2

Filename of the second output NetCDF file. This may include the directory (character).

plot.out

logical; if TRUE, the plot will be stored in the same folder as outfile1. If FALSE, the plot will not be saved.

nc34

NetCDF version of output file. If nc34 = 3 the output file will be in NetCDFv3 format (numeric). Default output is NetCDFv4.

overwrite

logical; should existing output file be overwritten?

verbose

logical; if TRUE, progress messages are shown

toolbox

logical; if TRUE, toolbox mode enabled. The two files are adjusted in space and time so that they can be plotted.

nc1

Alternatively to infile1 you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

nc2

Alternatively to infile2 you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

Value

Two NetCDF files are written.

See Also

Other 1d visualization: cmsaf.hist(), cmsaf.hovmoller(), cmsaf.scatter()


A 'cmsaf' extension for creating both, a spatial mean and an anomaly map.

Description

This plotting routine generates a graph showing the evolution of the spatial mean of a given variable and the corresponding anomaly map within the given time range and area. The intended application is for daily accumulated data, such as sunshine duration. Dependent on the output format a PNG or MP4 is created.

Usage

fieldmean_and_anomaly_map(
  config = NULL,
  variable = NULL,
  accumulate = FALSE,
  infile = NULL,
  temp_dir = tempdir(),
  out_dir = getwd(),
  climate_dir = NULL,
  climate_year_start,
  climate_year_end,
  show_extreme_climate_years = NULL,
  climatology_until_eoy = FALSE,
  start_date = NULL,
  end_date = NULL,
  country_code = "S_A",
  lon_min = NULL,
  lon_max = NULL,
  lat_min = NULL,
  lat_max = NULL,
  outfile_name = NULL,
  output_format = "animation",
  animation_pace = 0.07,
  freeze_animation = FALSE,
  min_value = NULL,
  max_value = NULL,
  nbreaks = NULL,
  language = "eng",
  keep_files = TRUE,
  states = FALSE,
  attach = FALSE,
  infile_attach = "auto",
  dwd_logo = FALSE,
  verbose = TRUE,
  nc = NULL
)

Arguments

config

Path to YAML config file (character). The config file does not have to specify all arguments. Each addressed argument has to be formatted according to the example config file: (#TODO: LINK EXAMPLE CONFIG FILE!).

variable

Name of variable in infile (NULL or character). If NULL then the first variable from the infile is taken.

accumulate

Whether the input file should be accumulated (logical).

infile

Path to NetCDF file (NULL or character). If NULL then it needs to be specified in the config file.

temp_dir

Path to temporary working directory (character).

out_dir

Path to output directory (character).

climate_dir

Path to directory in which climatology is computed or contained (NULL or character). If NULL then the temp_dir directory is taken.

climate_year_start

Start year of climatology (integer).

climate_year_end

End year of climatology (integer).

show_extreme_climate_years

Whether the minimum and maximum of the climate years should be titled in the fieldmean plot (NULL or logical). This is usually only of interest when plotting accumulated data. If the default NULL is chosen, then it will be set to the value of accumulate.

climatology_until_eoy

Plot the climatology and fieldmeans until the end of year (logical). Only affects fieldmean plots analyzed from January 1st.

start_date

Start date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the first date of the infile is used.

end_date

End date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the last date of the infile is used.

country_code

Either a country code in iso3c format or from the following: 'AFR' for Africa, 'EUR' for Europe, 'TOT' for the total disc, or 'S_A' for an arbitrary region selection (character). If a country is passed the data from within this country is extracted, else a rectangular box is visualized. Directly provided latitude and longitude ranges will be ignored in case of 'AFR', 'EUR' or 'TOT'.

lon_min

Longitude of lower left corner (NULL or numeric). If NULL then the smallest longitude of the infile is used.

lon_max

Longitude of upper right left corner (NULL or numeric). If NULL then the largest longitude of the infile is used.

lat_min

Latitude of lower left corner (NULL or numeric). If NULL then the smallest latitude of the infile is used.

lat_max

Latitude of upper right corner (NULL or numeric). If NULL then the largest latitude of the infile is used.

outfile_name

Filename of the PNG or MP4 outfile (NULL or character). If NULL then a name is computed from the current configuration. Please match the file ending according to the output_format.

output_format

Specification of output format (either 'graphic' for PNG or 'animation' for MP4).

animation_pace

Pace of the animation in seconds (positive numeric). This only has an effect if output_format == 'animation'.

freeze_animation

If TRUE then the animation will freeze at the last frame (logical).

min_value

Lower values than this are ignored (NULL or numeric). If NULL, no values are ignored.

max_value

Larger values than this are ignored (NULL or numeric). If NULL, no values are ignored.

nbreaks

Number of color breaks (NULL or positive integer). A value will be computed if NULL is passed.

language

Language used for title, legend, etc. in plots (either 'eng' for English or 'deu' for German).

keep_files

A flag indicating whether all files created in the process of obtaining the output file should be kept (logical). If false, all intermediate results are deleted, otherwise all are kept. Keeping these files could improve performance in further function calls.

states

Whether to crop/plot administration level of states (logical).

attach

Whether to temporaly merge the infile to an already existing one. (logical).

infile_attach

File to attach the infile to. When 'auto', a suitable file will be searched in out_dir. If attach is false, this will be ignored(character).

Whether to add the DWD logo (logical).

verbose

Whether to display progress messages (logical).

nc

Alternatively to infile you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

Details

You can pass a YAML config file and/or specify the arguments directly. Argument prioritization is done in the following way: Direct argument > config argument > default argument. Thus, if you pass a existing config file but also want to modify a specific argument you can do that easily.


A 'cmsaf' extension for creating spatial mean plots.

Description

This plotting routine generates a graph showing the evolution of the spatial mean of a given variable within the given time range and area. The intended application is for daily accumulated data, such as sunshine duration. Dependent on the output format a PNG or MP4 is created.

Usage

fieldmean_plot(
  config = NULL,
  variable = NULL,
  accumulate = FALSE,
  infile = NULL,
  temp_dir = tempdir(),
  out_dir = getwd(),
  climate_dir = NULL,
  climate_year_start = 1983,
  climate_year_end = 2018,
  show_extreme_climate_years = NULL,
  climatology_until_eoy = FALSE,
  start_date = NULL,
  end_date = NULL,
  country_code = "S_A",
  lon_min = NULL,
  lon_max = NULL,
  lat_min = NULL,
  lat_max = NULL,
  outfile_name = NULL,
  output_format = "animation",
  animation_pace = 0.07,
  freeze_animation = FALSE,
  language = "eng",
  keep_files = TRUE,
  states = FALSE,
  attach = FALSE,
  infile_attach = "auto",
  dwd_logo = FALSE,
  verbose = TRUE,
  nc = NULL
)

Arguments

config

Path to YAML config file (character). The config file does not have to specify all arguments. Each addressed argument has to be formatted according to the example config file: (#TODO: LINK EXAMPLE CONFIG FILE!).

variable

Name of variable in infile (NULL or character). If NULL then the first variable from the infile is taken.

accumulate

Whether the input file should be accumulated (logical).

infile

Path to NetCDF file (NULL or character). If NULL then it needs to be specified in the config file.

temp_dir

Path to temporary working directory (character).

out_dir

Path to output directory (character).

climate_dir

Path to directory in which climatology is computed or contained (NULL or character). If NULL then the temp_dir directory is taken.

climate_year_start

Start year of climatology (integer).

climate_year_end

End year of climatology (integer).

show_extreme_climate_years

Whether the minimum and maximum of the climate years should be titled in the fieldmean plot (NULL or logical). This is usually only of interest when plotting accumulated data. If the default NULL is chosen, then it will be set to the value of accumulate.

climatology_until_eoy

Plot the climatology and fieldmeans until the end of year (logical). Only affects fieldmean plots analyzed from January 1st.

start_date

Start date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the first date of the infile is used.

end_date

End date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the last date of the infile is used.

country_code

Either a country code in iso3c format or from the following: 'AFR' for Africa, 'EUR' for Europe, 'TOT' for the total disc, or 'S_A' for an arbitrary region selection (character). If a country is passed the data from within this country is extracted, else a rectangular box is visualized. Directly provided latitude and longitude ranges will be ignored in case of 'AFR', 'EUR' or 'TOT'.

lon_min

Longitude of lower left corner (NULL or numeric). If NULL then the smallest longitude of the infile is used.

lon_max

Longitude of upper right left corner (NULL or numeric). If NULL then the largest longitude of the infile is used.

lat_min

Latitude of lower left corner (NULL or numeric). If NULL then the smallest latitude of the infile is used.

lat_max

Latitude of upper right corner (NULL or numeric). If NULL then the largest latitude of the infile is used.

outfile_name

Filename of the PNG or MP4 outfile (NULL or character). If NULL then a name is computed from the current configuration. Please match the file ending according to the output_format.

output_format

Specification of output format (either 'graphic' for PNG or 'animation' for MP4).

animation_pace

Pace of the animation in seconds (positive numeric). This only has an effect if output_format == 'animation'.

freeze_animation

If TRUE then the animation will freeze at the last frame (logical).

language

Language used for title, legend, etc. in plots (either 'eng' for English or 'deu' for German).

keep_files

A flag indicating whether all files created in the process of obtaining the output file should be kept (logical). If false, all intermediate results are deleted, otherwise all are kept. Keeping these files could improve performance in further function calls.

states

Whether to crop/plot administration level of states (logical).

attach

Whether to temporaly merge the infile to an already existing one. (logical).

infile_attach

File to attach the infile to. When 'auto', a suitable file will be searched in out_dir. If attach is false, this will be ignored(character).

Whether to add the DWD logo (logical).

verbose

Whether to display progress messages (logical).

nc

Alternatively to infile you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

Details

You can pass a YAML config file and/or specify the arguments directly. Argument prioritization is done in the following way: Direct argument > config argument > default argument. Thus, if you pass a existing config file but also want to modify a specific argument you can do that easily.


Determine the basename of a NetCDF file

Description

This function determines the basename of either a file/URL path or an 'nc' object (using nc$filename).

Usage

get_basename_vis(infile, nc = NULL)

Arguments

infile

Filename of input NetCDF file. This may include the directory (character).

nc

Alternatively to infile you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

Details

When the origin of the file path is a local .nc file then get_basename_vis() is equivalent to base::basename().

get_basename_vis() also handles the case of infile/nc originating from a URL.

The value of get_basename_vis() always ends in ".nc".

If both infile and nc are specified, infile is ignored.

Value

A character string giving the basename.


Designed for the CM SAF R Toolbox.

Description

This function is a helper function for render_plot_time_series_compare.

Usage

helper_time_series_compare(visualizeVariables)

Arguments

visualizeVariables

A data frame containing all meta data for the plotting process (data.frame).


A 'cmsaf' extension for creating various climate plots.

Description

This plotting routine generates graphical output of the evolution of the given variable within the given time range and area. The intended application is for daily accumulated data, such as sunshine duration. Dependent on the output format a PNG or MP4 is created.

Usage

monitor_climate(
  plot_type = "absolute_map",
  config = NULL,
  variable = NULL,
  accumulate = FALSE,
  mean_value = FALSE,
  infile = NULL,
  temp_dir = tempdir(),
  out_dir = getwd(),
  climate_dir = NULL,
  climate_year_start = 1983,
  climate_year_end = 2018,
  show_extreme_climate_years = NULL,
  climatology_until_eoy = FALSE,
  start_date = NULL,
  end_date = NULL,
  country_code = "S_A",
  lon_min = NULL,
  lon_max = NULL,
  lat_min = NULL,
  lat_max = NULL,
  outfile_name = NULL,
  output_format = "animation",
  animation_pace = 0.07,
  freeze_animation = FALSE,
  min_value = NULL,
  max_value = NULL,
  nbreaks = NULL,
  language = "eng",
  keep_files = TRUE,
  states = FALSE,
  attach = FALSE,
  infile_attach = "auto",
  analyze_method = TRUE,
  selected_number = 1,
  color_pal = 1,
  relative = FALSE,
  circ_plot = FALSE,
  dwd_logo = FALSE,
  verbose = TRUE,
  nc = NULL
)

Arguments

plot_type

Specifies the type of the plot ('absolute_map', 'anomaly_map', 'climatology_map', 'fieldmean_plot', 'fieldmean_and_anomaly_map').

config

Path to YAML config file (character). The config file does not have to specify all arguments. Each addressed argument has to be formatted according to the example config file: (#TODO: LINK EXAMPLE CONFIG FILE!).

variable

Name of variable in infile (NULL or character). If NULL then the first variable from the infile is taken.

accumulate

Whether the input file should be accumulated (logical).

mean_value

Whether the input file should be averaged (logical).

infile

Path to NetCDF file (NULL or character). If NULL then it needs to be specified in the config file.

temp_dir

Path to temporary working directory (character).

out_dir

Path to output directory (character).

climate_dir

Path to directory in which climatology is computed or contained (NULL or character). If NULL then the temp_dir directory is taken.

climate_year_start

Start year of climatology (integer).

climate_year_end

End year of climatology (integer).

show_extreme_climate_years

Whether the minimum and maximum of the climate years should be titled in the fieldmean plot (NULL or logical). This is usually only of interest when plotting accumulated data. If the default NULL is chosen, then it will be set to the value of accumulate.

climatology_until_eoy

Plot the climatology and fieldmeans until the end of year (logical). Only affects fieldmean plots analyzed from January 1st.

start_date

Start date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the first date of the infile is used.

end_date

End date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the last date of the infile is used.

country_code

Either a country code in iso3c format or from the following: 'AFR' for Africa, 'EUR' for Europe, 'TOT' for the total disc, or 'S_A' for an arbitrary region selection (character). If a country is passed the data from within this country is extracted, else a rectangular box is visualized. Directly provided latitude and longitude ranges will be ignored in case of 'AFR', 'EUR' or 'TOT'.

lon_min

Longitude of lower left corner (NULL or numeric). If NULL then the smallest longitude of the infile is used.

lon_max

Longitude of upper right left corner (NULL or numeric). If NULL then the largest longitude of the infile is used.

lat_min

Latitude of lower left corner (NULL or numeric). If NULL then the smallest latitude of the infile is used.

lat_max

Latitude of upper right corner (NULL or numeric). If NULL then the largest latitude of the infile is used.

outfile_name

Filename of the PNG or MP4 outfile (NULL or character). If NULL then a name is computed from the current configuration. Please match the file ending according to the output_format.

output_format

Specification of output format (either 'graphic' for PNG or 'animation' for MP4).

animation_pace

Pace of the animation in seconds (positive numeric). This only has an effect if output_format == 'animation'.

freeze_animation

If TRUE then the animation will freeze at the last frame (logical).

min_value

Lower values than this are ignored (NULL or numeric). If NULL, no values are ignored.

max_value

Larger values than this are ignored (NULL or numeric). If NULL, no values are ignored.

nbreaks

Number of color breaks (NULL or positive integer). A value will be computed if NULL is passed.

language

Language used for title, legend, etc. in plots (either 'eng' for English or 'deu' for German).

keep_files

A flag indicating whether all files created in the process of obtaining the output file should be kept (logical). If false, all intermediate results are deleted, otherwise all are kept. Keeping these files could improve performance in further function calls.

states

Whether to crop/plot administration level of states (logical).

attach

Whether to temporaly merge the infile to an already existing one. (logical).

infile_attach

File to attach the infile to. When 'auto', a suitable file will be searched in out_dir. If attach is false, this will be ignored(character).

analyze_method

Two analyze methods: mean == FALSE; accumulate == TRUE (logical) (Warming Stripes Plots, Time Series Plots, Trend Plots)

selected_number

Timesteps of the same selected time range (Warming Stripes Plots, Time Series Plots, Trend Plots)

color_pal

Color option for stripe and anomaly plots

relative

Use relative values for anomaly plots

circ_plot

Circular stripe plots (logical)

Whether to add the DWD logo (logical).

verbose

Whether to display progress messages (logical).

nc

Alternatively to infile you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

Details

Circular stripe plots are inspired by Emanuele Bevacqua (see emanuele.bevacqua.eu)

You can pass a YAML config file and/or specify the arguments directly. Argument prioritization is done in the following way: Direct argument > config argument > default argument. Thus, if you pass a existing config file but also want to modify a specific argument you can do that easily.


Create a quicklook of NetCDF data

Description

The function creates a plot of the variables in NetCDF file(s) specified in the config file. Only NetCDF files that conform to the CM SAF naming convention are supported.

Usage

quicklook(
  config,
  filelist,
  outpath = getwd(),
  jpeg_quality = 100,
  dpi = 150,
  iwidth = 1242,
  logo = TRUE,
  copyright = TRUE,
  bluemarble = FALSE,
  maxpixels = TRUE,
  verbose = TRUE
)

Arguments

config

filename of configuration file. This may include the directory (character).

filelist

list of NetCDF file to create plots from (character).

outpath

directory in which to save the output files. (character).

jpeg_quality

jpeg quality for the image in percent, see grDevices::jpeg()

dpi

resolution of the image in dots per inch, see grDevices::jpeg()

iwidth

width of the resulting image in pixels, see grDevices::jpeg()

logical; should the cmsaf logo be added to the plot?

copyright

logical; should the copyright text be added to the plot?

bluemarble

logical; should the data be plotted onto a NASA bluemarble (only available for MSG/Seviri based data)? Due to data size this option is not available for the cmsafvis package on CRAN. Please have a look at our website https://www.cmsaf.eu/R_toolbox

maxpixels

logical; use actual number of pixels or default (100000)

verbose

logical; if TRUE, progress messages are shown

Details

This operator can be applied using a configuration file (quicklook_config.yml). An example config file can be found in the extdata folder of this package. The following parameters can be defined:

  • logo: color / black

  • slot: numeric (e.g., 13)

  • invert_col: TRUE / FALSE

  • Dataset: character (e.g., ICDR Seviri Radiation)

  • limits: min: numeric; max: numeric

  • legend: TRUE / FALSE

  • colorscale: character (e.g., Viridis)

  • unit: character (e.g., Percent / '%')

  • var_name: character (e.g., Percent / '%')

  • bluemarble: TRUE / FALSE

  • mirror_data: TRUE / FALSE / NP / SP

  • namin: numeric (e.g., 2e-04), minimum in case of no data

  • logmin: numeric (e.g., 0.2), minimum in case of log-scale

  • scale_factor: numeric (e.g., 1)

  • smooth_factor: numeric (e.g., 1)

  • aux_file: path to optional aux-file, including CLAAS level 2 lon/ lat data

  • sysd: path to optional sysdata.rda file, which includes bluemarble data

  • remap: remap data to regular grid. TRUE / FALSE

  • tri_up: plot upper triangle on colorscale. TRUE / FALSE

  • tri_down: plot lower triangle on colorscale. TRUE / FALSE

Value

A jpeg file with the same name as the original NetCDF file.


Get rectangular image dimensions

Description

Given regional bounds image width and height are computed in order to display a region without distortion.

Usage

recalculateImageDimensions(
  visualizeVariables,
  lon_bounds,
  lat_bounds,
  image_def,
  ihsf
)

Arguments

visualizeVariables

A dataframe containing $lon and $lat values which will be bounded by lon/lat_bounds (data.frame).

lon_bounds

Array containing two values for longitude min and max (numeric).

lat_bounds

Array containing two values for latitude min and max (numeric).

image_def

Minimal image default size for width and height (numeric).

ihsf

Image height rescaling factor (numeric).


Creating a simple histogram.

Description

This routine was implemented for creating histograms in the CM SAF R Toolbox.

Usage

render_hist_plot(
  dastat,
  shortDescription,
  grid_col,
  bordercolor,
  linesize,
  xlab
)

Arguments

dastat

Statistics given to hist plot (numeric).

shortDescription

A title will be generated using "Histogram of" + description (character).

grid_col

Color used for the grid.

bordercolor

Color used for borders.

linesize

Line width to be used (positive numeric).

xlab

Label for x axis (character).


Creating a simple instat plot.

Description

This function creates a simple r-instat plot.

Usage

render_instat_plot(
  co.data,
  shortDescription,
  grid_col,
  bordercolor,
  linesize,
  ylab
)

Arguments

co.data

Statistics given to hist plot (data.frame).

shortDescription

A title will be generated using "Comparison of" + description (character).

grid_col

Color used for the grid.

bordercolor

Color used for borders.

linesize

Line width to be used (positive numeric).

ylab

Label for y axis (character).


Plotting routine designed for the CM SAF R Toolbox.

Description

This function renders a 2D image usually called by the CM SAF R Toolbox.

Usage

render_plot(
  plot_rinstat,
  outfile = NULL,
  fileExtension = ".png",
  visualizeVariables,
  visualizeDataTimestep,
  nc_path_visualize,
  visualizeDataMax,
  lon_bounds,
  lat_bounds,
  lon_loc_vec,
  lat_loc_vec,
  name_loc_vec,
  timestep,
  num_tick,
  num_rmin,
  num_rmax,
  num_brk,
  co.data,
  co.data.compare.diff,
  proj,
  xort,
  yort,
  rort,
  slider1,
  slider2,
  imagewidth,
  imageheight,
  location,
  int,
  text1,
  text2,
  text3,
  textsize,
  bordercolor,
  linesize,
  na.color,
  PAL,
  palettes,
  reverse,
  plot_grid,
  grid_col
)

Arguments

plot_rinstat

Whether to create an R-Instat plot (logical).

outfile

Name of the outfile (NULL or character). Should match the fileExtension. If NULL is passed a file is created in the R session temporary directory.

fileExtension

The file extension of the image (character). Has to be one of the following: 'png', 'jpg', 'tif', 'kml', 'pdf'.

visualizeVariables

A data frame containing all meta data for the plotting process (data.frame).

visualizeDataTimestep

The data to be plotted.

nc_path_visualize

The nc file path of which the plot is generated for.

visualizeDataMax

Maximal data for computing breaks.

lon_bounds

Array containing two values for longitude min and max (numeric).

lat_bounds

Array containing two values for latitude min and max (numeric).

lon_loc_vec

All longitude entries for points at (lat_loc_vec, lon_loc_vec) to be specified on the map (numeric).

lat_loc_vec

All latitude entries for points at (lat_loc_vec, lon_loc_vec) to be specified on the map (numeric).

name_loc_vec

Names for the points at (lat_loc_vec, lon_loc_vec) to be specified on the map (numeric).

timestep

The current timestep chosen.

num_tick

Number of ticks (numeric).

num_rmin

Color scale range minimum (numeric).

num_rmax

Color scale range maximium (numeric).

num_brk

Number of breaks (numeric).

co.data

Data to be plotted in R-Instat mode (data.frame).

co.data.compare.diff

Data to be plotted in compare data mode (data.frame).

proj

The chosen projection (either 'rect' for rectangular or 'ortho' for orthographic).

xort

Centering the globe at longitude xort (numeric). Only in orthographic mode.

yort

Centering the globe at latitude yort (numeric). Only in orthographic mode.

rort

Rotation of the globe (numeric). Only in orthographic mode.

slider1

Controlling the horizontal plot position as vector of two values min and max (numeric).

slider2

Controlling the vertical plot position as vector of two values min and max (numeric).

imagewidth

Width of the image (numeric).

imageheight

Height of the image (numeric).

location

Whether points specified by (lat_loc_vec, lon_loc_vec, name_loc_vec) should be added to the map (logical).

int

Whether interior country borders should be added (logical).

text1

Title text (character).

text2

Text to be passed to graphics::mtext (character).

text3

Text to be added to the legend (character).

textsize

Textsize to be used (cex).

bordercolor

Color used for borders.

linesize

Line width to be used (positive numeric).

na.color

The color to be used for NA values.

PAL

Color palette.

palettes

Color palettes to be used.

reverse

Whether to revert the color palette (logical).

plot_grid

Whether to plot a grid using color grid_col (logical).

grid_col

Color used for the grid.


Plotting routine designed for the CM SAF R Toolbox.

Description

This function renders a 1D plot of data at one single lon / lat point.

Usage

render_plot_1d(
  outfile = NULL,
  fileExtension = ".png",
  visualizeVariables,
  ticknumber,
  dateformat,
  analyze_timeseries,
  addTrend,
  sliderx,
  slidery,
  checkGroup_type,
  imagewidth,
  imageheight,
  text1_1d,
  text2_1d,
  text3_1d,
  text4_1d,
  textsize,
  linesize,
  col
)

Arguments

outfile

Name of the outfile (NULL or character). Should match the fileExtension. If NULL is passed a file is created in the R session temporary directory.

fileExtension

The file extension of the image (character). Has to be one of the following: 'png', 'jpg', 'tif', 'kml', 'pdf'.

visualizeVariables

A data frame containing all meta data for the plotting process (data.frame).

ticknumber

Number of ticks (numeric).

dateformat

Date format for constructing a date label.

analyze_timeseries

Whether or not to analyze the timeseries of the given point (logical).

addTrend

Whether to add a trend line (logical).

sliderx

Limiting the time series with a two valued vector for min and max (numeric).

slidery

Limiting the y axis with a two valued vector for min and max (numeric).

checkGroup_type

An integer between 1 and 5 indicating group type (numeric). 1 for Line, 2 for Points, 3 for Line and Points, 4 for steps, 5 for histogram.

imagewidth

Width of the image (numeric).

imageheight

Height of the image (numeric).

text1_1d

Title text (character).

text2_1d

Text to be passed to graphics::mtext (character).

text3_1d

X-label (character).

text4_1d

Y-label (character).

textsize

Textsize to be used (cex).

linesize

Line width to be used (positive numeric).

col

A color chosen via colourpicker::colourInput.


Plotting routine designed for the CM SAF R Toolbox.

Description

This function renders a 1D plot of data at one single lon or one single lat point.

Usage

render_plot_1d_advanced(
  outfile = NULL,
  fileExtension = ".png",
  visualizeVariables,
  ticknumber,
  addTrend,
  sliderx,
  slidery,
  checkGroup_type,
  imagewidth,
  imageheight,
  text1_1d,
  text2_1d,
  textsize,
  linesize,
  col,
  timestep_1d_visualize
)

Arguments

outfile

Name of the outfile (NULL or character). Should match the fileExtension. If NULL is passed a file is created in the R session temporary directory.

fileExtension

The file extension of the image (character). Has to be one of the following: 'png', 'jpg', 'tif', 'kml', 'pdf'.

visualizeVariables

A data frame containing all meta data for the plotting process (data.frame).

ticknumber

Number of ticks (numeric).

addTrend

Whether to add a trend line (logical).

sliderx

Limiting the time series with a two valued vector for min and max (numeric).

slidery

Limiting the y axis with a two valued vector for min and max (numeric).

checkGroup_type

An integer between 1 and 5 indicating group type (numeric). 1 for Line, 2 for Points, 3 for Line and Points, 4 for steps, 5 for histogram.

imagewidth

Width of the image (numeric).

imageheight

Height of the image (numeric).

text1_1d

Title text (character).

text2_1d

Text to be passed to graphics::mtext (character).

textsize

Textsize to be used (cex).

linesize

Line width to be used (positive numeric).

col

A color chosen via colourpicker::colourInput.

timestep_1d_visualize

The time step to be visualized.


Plotting routine designed for the CM SAF R Toolbox.

Description

This function renders a histogram of two variables.

Usage

render_plot_hist_compare(
  outfile = NULL,
  fileExtension = ".png",
  visualizeVariables,
  imagewidth,
  imageheight,
  text1_1d,
  text2_1d,
  textsize,
  legend_label1,
  legend_label2,
  timestep_1d_visualize
)

Arguments

outfile

Name of the outfile (NULL or character). Should match the fileExtension. If NULL is passed a file is created in the R session temporary directory.

fileExtension

The file extension of the image (character). Has to be one of the following: 'png', 'jpg', 'tif', 'kml', 'pdf'.

visualizeVariables

A data frame containing all meta data for the plotting process (data.frame).

imagewidth

Width of the image (numeric).

imageheight

Height of the image (numeric).

text1_1d

Title text (character).

text2_1d

Text to be passed to graphics::mtext (character).

textsize

Textsize to be used (cex).

legend_label1

Legend label of the first data set

legend_label2

Legend label of the second data set

timestep_1d_visualize

Selected timestemp


Plotting routine designed for the CM SAF R Toolbox.

Description

This function renders a hovmoller plot of two variables.

Usage

render_plot_hovmoller(
  outfile = NULL,
  fileExtension = ".png",
  visualizeVariables,
  imagewidth,
  imageheight,
  textsize,
  linesize,
  title_data1,
  title_data2,
  nc = NULL,
  nc2 = NULL
)

Arguments

outfile

Name of the outfile (NULL or character). Should match the fileExtension. If NULL is passed a file is created in the R session temporary directory.

fileExtension

The file extension of the image (character). Has to be one of the following: 'png', 'jpg', 'tif', 'kml', 'pdf'.

visualizeVariables

A data frame containing all meta data for the plotting process (data.frame).

imagewidth

Width of the image (numeric).

imageheight

Height of the image (numeric).

textsize

Textsize to be used (cex).

linesize

Line width to be used (positive numeric).

title_data1

Title of the first data set

title_data2

Title of the second data set

nc

Alternatively to infile1 you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

nc2

Alternatively to infile2 you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).


Plotting routine designed for the CM SAF R Toolbox.

Description

This function renders a scatter plot of two variables.

Usage

render_plot_scatter(
  outfile = NULL,
  fileExtension = ".png",
  visualizeVariables,
  dateformat,
  ticknumber,
  imagewidth,
  imageheight,
  text1_1d,
  text2_1d,
  textsize,
  linesize,
  x_axis_label_1d,
  y_axis_label_1d,
  timestep_1d_visualize
)

Arguments

outfile

Name of the outfile (NULL or character). Should match the fileExtension. If NULL is passed a file is created in the R session temporary directory.

fileExtension

The file extension of the image (character). Has to be one of the following: 'png', 'jpg', 'tif', 'kml', 'pdf'.

visualizeVariables

A data frame containing all meta data for the plotting process (data.frame).

dateformat

Date format for constructing a date label.

ticknumber

Number of ticks (numeric).

imagewidth

Width of the image (numeric).

imageheight

Height of the image (numeric).

text1_1d

Title text (character).

text2_1d

Text to be passed to graphics::mtext (character).

textsize

Textsize to be used (cex).

linesize

Line width to be used (positive numeric).

x_axis_label_1d

x-label (first data set)

y_axis_label_1d

y-label (second data set)

timestep_1d_visualize

Selected timestemp


Plotting routine designed for the CM SAF R Toolbox.

Description

This function renders a 2D image of two files usually called by the CM SAF R Toolbox.

Usage

render_plot_side_by_side(
  plot_rinstat,
  outfile = NULL,
  fileExtension = ".png",
  visualizeVariables,
  visualizeDataTimestep,
  nc_path_visualize,
  visualizeDataMax,
  timestep_2d,
  lon_bounds,
  lat_bounds,
  lon_loc_vec,
  lat_loc_vec,
  name_loc_vec,
  timestep,
  num_tick,
  num_rmin,
  num_rmax,
  num_brk,
  co.data,
  proj,
  xort,
  yort,
  rort,
  slider1,
  slider2,
  imagewidth,
  imageheight,
  location,
  int,
  text1,
  text2,
  text3,
  textsize,
  bordercolor,
  linesize,
  na.color,
  PAL,
  palettes,
  reverse,
  plot_grid,
  grid_col,
  text1_2,
  text2_2
)

Arguments

plot_rinstat

Whether to create an R-Instat plot (logical).

outfile

Name of the outfile (NULL or character). Should match the fileExtension. If NULL is passed a file is created in the R session temporary directory.

fileExtension

The file extension of the image (character). Has to be one of the following: 'png', 'jpg', 'tif', 'kml', 'pdf'.

visualizeVariables

A data frame containing all meta data for the plotting process (data.frame).

visualizeDataTimestep

The data to be plotted.

nc_path_visualize

The nc file path of which the plot is generated for.

visualizeDataMax

Maximal data for computing breaks.

timestep_2d

The time step to be visualized.

lon_bounds

Array containing two values for longitude min and max (numeric).

lat_bounds

Array containing two values for latitude min and max (numeric).

lon_loc_vec

All longitude entries for points at (lat_loc_vec, lon_loc_vec) to be specified on the map (numeric).

lat_loc_vec

All latitude entries for points at (lat_loc_vec, lon_loc_vec) to be specified on the map (numeric).

name_loc_vec

Names for the points at (lat_loc_vec, lon_loc_vec) to be specified on the map (numeric).

timestep

The current timestep chosen.

num_tick

Number of ticks (numeric).

num_rmin

Color scale range minimum (numeric).

num_rmax

Color scale range maximium (numeric).

num_brk

Number of breaks (numeric).

co.data

Data to be plotted in R-Instat mode (data.frame).

proj

The chosen projection (either 'rect' for rectangular or 'ortho' for orthographic).

xort

Centering the globe at longitude xort (numeric). Only in orthographic mode.

yort

Centering the globe at latitude yort (numeric). Only in orthographic mode.

rort

Rotation of the globe (numeric). Only in orthographic mode.

slider1

Controlling the horizontal plot position as vector of two values min and max (numeric).

slider2

Controlling the vertical plot position as vector of two values min and max (numeric).

imagewidth

Width of the image (numeric).

imageheight

Height of the image (numeric).

location

Whether points specified by (lat_loc_vec, lon_loc_vec, name_loc_vec) should be added to the map (logical).

int

Whether interior country borders should be added (logical).

text1

Title text data set 1 (character).

text2

Text to be passed to graphics::mtext for data set 1 (character).

text3

Text to be added to the legend (character).

textsize

Textsize to be used (cex).

bordercolor

Color used for borders.

linesize

Line width to be used (positive numeric).

na.color

The color to be used for NA values.

PAL

Color palette.

palettes

Color palettes to be used.

reverse

Whether to revert the color palette (logical).

plot_grid

Whether to plot a grid using color grid_col (logical).

grid_col

Color used for the grid.

text1_2

Title text data set 2 (character).

text2_2

Text to be passed to graphics::mtext for data set 2 (character).


Plotting routine designed for the CM SAF R Toolbox.

Description

This function provides a time series comparison of two data sets.

Usage

render_plot_time_series_compare(
  outfile = NULL,
  fileExtension = ".png",
  visualizeVariables,
  ticknumber,
  dateformat,
  sliderx,
  slidery,
  checkGroup_type,
  imagewidth,
  imageheight,
  text1_1d,
  text2_1d,
  textsize,
  linesize,
  col,
  legend_label1,
  legend_label2,
  station_number
)

Arguments

outfile

Name of the outfile (NULL or character). Should match the fileExtension. If NULL is passed a file is created in the R session temporary directory.

fileExtension

The file extension of the image (character). Has to be one of the following: 'png', 'jpg', 'tif', 'kml', 'pdf'.

visualizeVariables

A data frame containing all meta data for the plotting process (data.frame).

ticknumber

Number of ticks (numeric).

dateformat

Date format for constructing a date label.

sliderx

Limiting the time series with a two valued vector for min and max (numeric).

slidery

Limiting the y axis with a two valued vector for min and max (numeric).

checkGroup_type

An integer between 1 and 5 indicating group type (numeric). 1 for Line, 2 for Points, 3 for Line and Points, 4 for steps, 5 for histogram.

imagewidth

Width of the image (numeric).

imageheight

Height of the image (numeric).

text1_1d

Title text (character).

text2_1d

Text to be passed to graphics::mtext (character).

textsize

Textsize to be used (cex).

linesize

Line width to be used (positive numeric).

col

A color chosen via colourpicker::colourInput.

legend_label1

Legend label of the first data set

legend_label2

Legend label of the second data set

station_number

For station data compare; which station is selected


Creates a preview plot of a selected area

Description

This function creates a simple preview plot via maps::map of a given region.

Usage

render_preview_plot(spatial_lon_range, spatial_lat_range, lonRange, latRange)

Arguments

spatial_lon_range

Array containing two values for longitude min and max (numeric).

spatial_lat_range

Array containing two values for latitude min and max (numeric).

lonRange

Array containing two values for longitude min and max (numeric).

latRange

Array containing two values for latitude min and max (numeric).


Function to create a plot of a selected country.

Description

This function generates a plot of within a certain region (e.g. a country).

Usage

render_region_plot(
  infile,
  outfile = NULL,
  fileExtension = ".png",
  visualizeVariables,
  visualizeDataMax,
  lon_bounds,
  lat_bounds,
  lon_loc_vec,
  lat_loc_vec,
  name_loc_vec,
  division,
  selectedRegion,
  region_data,
  timestep,
  num_tick,
  num_rmin,
  num_rmax,
  location,
  text1,
  text2,
  text3,
  PAL,
  palettes,
  num_brk,
  reverse,
  textsize,
  bordercolor,
  plot_grid,
  grid_col,
  image_def,
  ihsf,
  nc = NULL
)

Arguments

infile

The nc file to be visualized.

outfile

Name of the outfile (NULL or character). Should match the fileExtension. If NULL is passed a file is created in the R session temporary directory.

fileExtension

The file extension of the image (character). Has to be one of the following: 'png', 'jpg', 'tif', 'kml', 'pdf'.

visualizeVariables

A data frame containing all meta data for the plotting process (data.frame).

visualizeDataMax

Maximal data for computing breaks.

lon_bounds

Array containing two values for longitude min and max (numeric).

lat_bounds

Array containing two values for latitude min and max (numeric).

lon_loc_vec

All longitude entries for points at (lat_loc_vec, lon_loc_vec) to be specified on the map (numeric).

lat_loc_vec

All latitude entries for points at (lat_loc_vec, lon_loc_vec) to be specified on the map (numeric).

name_loc_vec

Names for the points at (lat_loc_vec, lon_loc_vec) to be specified on the map (numeric).

division

Division to contain region (either 'COUNTRY' or something coherent to region_data).

selectedRegion

The region to be cropped according to division. If division == "COUNTRY", the country's 3-character ISO code should be used. Otherwise it has to fit to the passed region data.

region_data

If Division is not 'COUNTRY' then region_data has to contain spatial data of the given division.

timestep

Timestep to visualize at (character).

num_tick

Number of ticks (numeric).

num_rmin

Color scale range minimum (numeric).

num_rmax

Color scale range maximium (numeric).

location

Whether points specified by (lat_loc_vec, lon_loc_vec, name_loc_vec) should be added to the map (logical).

text1

Title text (character).

text2

Text to be passed to graphics::mtext (character).

text3

Text to be added to the legend (character).

PAL

Color palette.

palettes

Color palettes to be used.

num_brk

Number of breaks (numeric).

reverse

Whether to revert the color palette (logical).

textsize

Textsize to be used (cex).

bordercolor

Color used for borders.

plot_grid

Whether to plot a grid using color grid_col (logical).

grid_col

Color used for the grid.

image_def

Default size (positive numeric).

ihsf

Image height scaling factor (positive numeric).

nc

Alternatively to infile you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).


A 'cmsaf' extension for creating time series plots.

Description

This plotting routine generates graphical output for the given variable within the given time range and area. Dependent on the output format a PNG is created.

Usage

time_series_plot(
  variable = NULL,
  infile = NULL,
  selected_number = 1,
  analyze_method = TRUE,
  temp_dir = tempdir(),
  out_dir = getwd(),
  climate_dir = NULL,
  climate_year_start = 1983,
  climate_year_end = 2018,
  start_date = NULL,
  end_date = NULL,
  country_code = "S_A",
  lon_min = NULL,
  lon_max = NULL,
  lat_min = NULL,
  lat_max = NULL,
  outfile_name = NULL,
  output_format = "graphic",
  language = "eng",
  keep_files = TRUE,
  states = FALSE,
  attach = FALSE,
  infile_attach = "auto",
  title = "",
  verbose = TRUE,
  nc = NULL
)

Arguments

variable

Name of variable in infile (NULL or character). If NULL then the first variable from the infile is taken.

infile

Path to NetCDF file (NULL or character). If NULL then it needs to be specified in the config file.

selected_number

Timesteps of the same selected time range (Warming Stripes Plots, Time Series Plots, Trend Plots)

analyze_method

Two analyze methods: mean == FALSE; accumulate == TRUE (logical) (Warming Stripes Plots, Time Series Plots, Trend Plots)

temp_dir

Path to temporary working directory (character).

out_dir

Path to output directory (character).

climate_dir

Path to directory in which climatology is computed or contained (NULL or character). If NULL then the temp_dir directory is taken.

climate_year_start

Start year of climatology (integer).

climate_year_end

End year of climatology (integer).

start_date

Start date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the first date of the infile is used.

end_date

End date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the last date of the infile is used.

country_code

Either a country code in iso3c format or from the following: 'AFR' for Africa, 'EUR' for Europe, 'TOT' for the total disc, or 'S_A' for an arbitrary region selection (character). If a country is passed the data from within this country is extracted, else a rectangular box is visualized. Directly provided latitude and longitude ranges will be ignored in case of 'AFR', 'EUR' or 'TOT'.

lon_min

Longitude of lower left corner (NULL or numeric). If NULL then the smallest longitude of the infile is used.

lon_max

Longitude of upper right left corner (NULL or numeric). If NULL then the largest longitude of the infile is used.

lat_min

Latitude of lower left corner (NULL or numeric). If NULL then the smallest latitude of the infile is used.

lat_max

Latitude of upper right corner (NULL or numeric). If NULL then the largest latitude of the infile is used.

outfile_name

Filename of the PNG or MP4 outfile (NULL or character). If NULL then a name is computed from the current configuration. Please match the file ending according to the output_format.

output_format

Specification of output format (either 'graphic' for PNG or 'animation' for MP4).

language

Language used for title, legend, etc. in plots (either 'eng' for English or 'deu' for German).

keep_files

A flag indicating whether all files created in the process of obtaining the output file should be kept (logical). If false, all intermediate results are deleted, otherwise all are kept. Keeping these files could improve performance in further function calls.

states

Whether to crop/plot administration level of states (logical).

attach

Whether to temporaly merge the infile to an already existing one. (logical).

infile_attach

File to attach the infile to. When 'auto', a suitable file will be searched in out_dir. If attach is false, this will be ignored(character).

title

Set title (character).

verbose

Whether to display progress messages (logical).

nc

Alternatively to infile you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).


A 'cmsaf' extension for creating trend plots.

Description

This plotting routine generates graphical output for the given variable within the given time range and area. Dependent on the output format a PNG is created.

Usage

trend_plot(
  variable = NULL,
  infile = NULL,
  selected_number = 1,
  analyze_method = TRUE,
  temp_dir = tempdir(),
  out_dir = getwd(),
  climate_dir = NULL,
  climate_year_start = 1983,
  climate_year_end = 2018,
  start_date = NULL,
  end_date = NULL,
  country_code = "S_A",
  lon_min = NULL,
  lon_max = NULL,
  lat_min = NULL,
  lat_max = NULL,
  outfile_name = NULL,
  output_format = "graphic",
  language = "eng",
  keep_files = TRUE,
  states = FALSE,
  attach = FALSE,
  infile_attach = "auto",
  verbose = TRUE,
  nc = NULL
)

Arguments

variable

Name of variable in infile (NULL or character). If NULL then the first variable from the infile is taken.

infile

Path to NetCDF file (NULL or character). If NULL then it needs to be specified in the config file.

selected_number

Timesteps of the same selected time range (Warming Stripes Plots, Time Series Plots, Trend Plots)

analyze_method

Two analyze methods: mean == FALSE; accumulate == TRUE (logical) (Warming Stripes Plots, Time Series Plots, Trend Plots)

temp_dir

Path to temporary working directory (character).

out_dir

Path to output directory (character).

climate_dir

Path to directory in which climatology is computed or contained (NULL or character). If NULL then the temp_dir directory is taken.

climate_year_start

Start year of climatology (integer).

climate_year_end

End year of climatology (integer).

start_date

Start date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the first date of the infile is used.

end_date

End date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the last date of the infile is used.

country_code

Either a country code in iso3c format or from the following: 'AFR' for Africa, 'EUR' for Europe, 'TOT' for the total disc, or 'S_A' for an arbitrary region selection (character). If a country is passed the data from within this country is extracted, else a rectangular box is visualized. Directly provided latitude and longitude ranges will be ignored in case of 'AFR', 'EUR' or 'TOT'.

lon_min

Longitude of lower left corner (NULL or numeric). If NULL then the smallest longitude of the infile is used.

lon_max

Longitude of upper right left corner (NULL or numeric). If NULL then the largest longitude of the infile is used.

lat_min

Latitude of lower left corner (NULL or numeric). If NULL then the smallest latitude of the infile is used.

lat_max

Latitude of upper right corner (NULL or numeric). If NULL then the largest latitude of the infile is used.

outfile_name

Filename of the PNG or MP4 outfile (NULL or character). If NULL then a name is computed from the current configuration. Please match the file ending according to the output_format.

output_format

Specification of output format (either 'graphic' for PNG or 'animation' for MP4).

language

Language used for title, legend, etc. in plots (either 'eng' for English or 'deu' for German).

keep_files

A flag indicating whether all files created in the process of obtaining the output file should be kept (logical). If false, all intermediate results are deleted, otherwise all are kept. Keeping these files could improve performance in further function calls.

states

Whether to crop/plot administration level of states (logical).

attach

Whether to temporaly merge the infile to an already existing one. (logical).

infile_attach

File to attach the infile to. When 'auto', a suitable file will be searched in out_dir. If attach is false, this will be ignored(character).

verbose

Whether to display progress messages (logical).

nc

Alternatively to infile you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).


A 'cmsaf' extension for creating warming stripes plots.

Description

This plotting routine generates graphical output for the given variable within the given time range and area. Dependent on the output format a PNG is created.

Usage

warming_stripes_plot(
  variable = NULL,
  infile = NULL,
  selected_number = 1,
  color_pal = 1,
  analyze_method = TRUE,
  temp_dir = tempdir(),
  out_dir = getwd(),
  climate_dir = NULL,
  climate_year_start = 1983,
  climate_year_end = 2018,
  start_date = NULL,
  end_date = NULL,
  country_code = "S_A",
  lon_min = NULL,
  lon_max = NULL,
  lat_min = NULL,
  lat_max = NULL,
  outfile_name = NULL,
  output_format = "graphic",
  language = "eng",
  keep_files = TRUE,
  states = FALSE,
  attach = FALSE,
  infile_attach = "auto",
  pointsTF = FALSE,
  lineTF = FALSE,
  circ_plot = FALSE,
  title = "",
  verbose = TRUE,
  nc = NULL
)

Arguments

variable

Name of variable in infile (NULL or character). If NULL then the first variable from the infile is taken.

infile

Path to NetCDF file (NULL or character). If NULL then it needs to be specified in the config file.

selected_number

Timesteps of the same selected time range (Warming Stripes Plots, Time Series Plots, Trend Plots)

color_pal

Color option for stripe and anomaly plots

analyze_method

Two analyze methods: mean == FALSE; accumulate == TRUE (logical) (Warming Stripes Plots, Time Series Plots, Trend Plots)

temp_dir

Path to temporary working directory (character).

out_dir

Path to output directory (character).

climate_dir

Path to directory in which climatology is computed or contained (NULL or character). If NULL then the temp_dir directory is taken.

climate_year_start

Start year of climatology (integer).

climate_year_end

End year of climatology (integer).

start_date

Start date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the first date of the infile is used.

end_date

End date in format of 'YYYY-MM-DD' (NULL or character). If NULL then the last date of the infile is used.

country_code

Either a country code in iso3c format or from the following: 'AFR' for Africa, 'EUR' for Europe, 'TOT' for the total disc, or 'S_A' for an arbitrary region selection (character). If a country is passed the data from within this country is extracted, else a rectangular box is visualized. Directly provided latitude and longitude ranges will be ignored in case of 'AFR', 'EUR' or 'TOT'.

lon_min

Longitude of lower left corner (NULL or numeric). If NULL then the smallest longitude of the infile is used.

lon_max

Longitude of upper right left corner (NULL or numeric). If NULL then the largest longitude of the infile is used.

lat_min

Latitude of lower left corner (NULL or numeric). If NULL then the smallest latitude of the infile is used.

lat_max

Latitude of upper right corner (NULL or numeric). If NULL then the largest latitude of the infile is used.

outfile_name

Filename of the PNG or MP4 outfile (NULL or character). If NULL then a name is computed from the current configuration. Please match the file ending according to the output_format.

output_format

Specification of output format (either 'graphic' for PNG or 'animation' for MP4).

language

Language used for title, legend, etc. in plots (either 'eng' for English or 'deu' for German).

keep_files

A flag indicating whether all files created in the process of obtaining the output file should be kept (logical). If false, all intermediate results are deleted, otherwise all are kept. Keeping these files could improve performance in further function calls.

states

Whether to crop/plot administration level of states (logical).

attach

Whether to temporaly merge the infile to an already existing one. (logical).

infile_attach

File to attach the infile to. When 'auto', a suitable file will be searched in out_dir. If attach is false, this will be ignored(character).

pointsTF

Show data points (logical).

lineTF

Show trend line (logical).

circ_plot

Circular stripe plots (logical)

title

Set title (character).

verbose

Whether to display progress messages (logical).

nc

Alternatively to infile you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

Details

Circular stripe plots are inspired by Emanuele Bevacqua (see emanuele.bevacqua.eu)