export_data_to_csv: Export Data to CSV Function

View source: R/rIACI.R

export_data_to_csvR Documentation

Export Data to CSV Function

Description

Exports data from a NetCDF file to CSV files, one for each latitude and longitude point, including only points where data is present. This function utilizes a Python script to perform the data processing.

Usage

export_data_to_csv(nc_file, output_dir)

Arguments

nc_file

Character. Path to the NetCDF file.

output_dir

Character. Output directory where CSV files will be saved.

Details

The function calls a Python script using the 'reticulate' package to process the NetCDF file. The Python script 'data_processing.py' should be located in the 'python' directory of the 'rIACI' package. Only grid points with available data are exported to CSV files. Each CSV file corresponds to a specific latitude and longitude point.

Value

None. CSV files are saved to the specified output directory.

Examples

## Not run: 
# Example usage of export_data_to_csv
netcdf_file <- "/path/to/processed_data.nc"
csv_output_directory <- "/path/to/csv_output"
export_data_to_csv(nc_file = netcdf_file, output_dir = csv_output_directory)

## End(Not run)

rIACI documentation built on April 12, 2025, 9:16 a.m.