ocssw
V2022
|
#include <netcdf.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string.h>
#include <unistd.h>
#include <dfutils.h>
#include <genutils.h>
#include <l12_parms.h>
#include <l2_flags.h>
#include "l2extract.h"
Go to the source code of this file.
Macros | |
#define | MAX_VARIABLES 128 |
#define | NCDIE(function) |
#define | GEOBOX_INC 20.0 |
Functions | |
void | copyGlobalAttributes (int ncid_r, int ncid_w) |
void | copyVariableAttributes (int ncid_r, int varid_r, int ncid_w, int varid_w) |
int | checkIfInProdlist (const char *prodlist, const char *name) |
void | copyVariable (int ncid_r, const char *name, size_t *start, size_t *count, int *dimIds, int ncid_w, void *data) |
int | extractNetCDF (const char *infile, const char *outfile, int spix, int epix, int sscan, int escan, const char *prodlist) |
Macro Definition Documentation
◆ GEOBOX_INC
#define GEOBOX_INC 20.0 |
◆ MAX_VARIABLES
#define MAX_VARIABLES 128 |
Definition at line 22 of file l2extract_netcdf.c.
◆ NCDIE
#define NCDIE | ( | function | ) |
Definition at line 24 of file l2extract_netcdf.c.
Function Documentation
◆ checkIfInProdlist()
Definition at line 59 of file l2extract_netcdf.c.
◆ copyGlobalAttributes()
void copyGlobalAttributes | ( | int | ncid_r, |
int | ncid_w | ||
) |
Definition at line 34 of file l2extract_netcdf.c.
◆ copyVariable()
void copyVariable | ( | int | ncid_r, |
const char * | name, | ||
size_t * | start, | ||
size_t * | count, | ||
int * | dimIds, | ||
int | ncid_w, | ||
void * | data | ||
) |
copy a piece of a variable and all of it's attributes to another file
- Parameters
-
ncid_r netCDF file or group to read name name of the variable start location to start copying from count how many of each dimension to copy dimIds dimension IDs from the destination file to attach to the new variable ncid_w netCDF file or group to write the variable to data write this data to the new variable or copy from read variable if NULL
Definition at line 87 of file l2extract_netcdf.c.
◆ copyVariableAttributes()
void copyVariableAttributes | ( | int | ncid_r, |
int | varid_r, | ||
int | ncid_w, | ||
int | varid_w | ||
) |
Definition at line 46 of file l2extract_netcdf.c.
◆ extractNetCDF()
int extractNetCDF | ( | const char * | infile, |
const char * | outfile, | ||
int | spix, | ||
int | epix, | ||
int | sscan, | ||
int | escan, | ||
const char * | prodlist | ||
) |
extract a L2 netCDF file
- Parameters
-
infile input file name outfile output file name spix start pixel (1 based) epix ending pixel (1 based) sscan start line (1 based) escan end line (1 based) prodlist product list, comma separated, empty string outputs all products
- Returns
- 0 = success
Definition at line 170 of file l2extract_netcdf.c.