.TH "g2cparams.c" 3 "Version 2.2.0" "NCEPLIBS-g2c" \" -*- nroff -*-
.ad l
.nh
.SH NAME
g2cparams.c \- Functions for serving up NOAA parameter abbreviations and GRIB1/GRIB2 translations\&.  

.SH SYNOPSIS
.br
.PP
\fC#include 'grib2_int\&.h'\fP
.br

.SS "Macros"

.in +1c
.ti -1c
.RI "#define \fBCSV_FILE\fP   'noaa_grib2_params\&.csv'"
.br
.RI "The name of the CSV file which contains the NOAA abbreviations\&. "
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "int \fBg2c_param_abbrev\fP (int g2disc, int g2cat, int g2num, char *abbrev)"
.br
.RI "Get NOAA abbreviation for a GRIB2 parameter\&. "
.ti -1c
.RI "int \fBg2c_param_all\fP (int param_idx, int *g1num, int *g1ver, int *g2disc, int *g2cat, int *g2num, char *abbrev)"
.br
.RI "Return all the information about a parameter\&. "
.ti -1c
.RI "int \fBg2c_param_g1tog2\fP (int g1num, int g1ver, int *g2disc, int *g2cat, int *g2num)"
.br
.RI "Translate GRIB1 parameter to GRIB2 parameter\&. "
.ti -1c
.RI "int \fBg2c_param_g2tog1\fP (int g2disc, int g2cat, int g2num, int *g1num, int *g1ver)"
.br
.RI "Translate GRIB2 parameter to GRIB1 parameter\&. "
.in -1c
.SS "Variables"

.in +1c
.ti -1c
.RI "static \fBG2C_PARAM_T\fP \fBparam\fP [\fBG2C_MAX_NOAA_PARAMS\fP]"
.br
.RI "An array of parameter information\&. "
.in -1c
.SH "Detailed Description"
.PP 
Functions for serving up NOAA parameter abbreviations and GRIB1/GRIB2 translations\&. 


.PP
\fBAuthor\fP
.RS 4
Ed Hartnett 
.RE
.PP
\fBDate\fP
.RS 4
9/19/22 
.RE
.PP

.PP
Definition in file \fBg2cparams\&.c\fP\&.
.SH "Macro Definition Documentation"
.PP 
.SS "#define CSV_FILE   'noaa_grib2_params\&.csv'"

.PP
The name of the CSV file which contains the NOAA abbreviations\&. 
.PP
Definition at line \fB11\fP of file \fBg2cparams\&.c\fP\&.
.SH "Function Documentation"
.PP 
.SS "int g2c_param_abbrev (int g2disc, int g2cat, int g2num, char * abbrev)"

.PP
Get NOAA abbreviation for a GRIB2 parameter\&. 
.PP
\fBParameters\fP
.RS 4
\fIg2disc\fP The GRIB2 discipline number\&. 
.br
\fIg2cat\fP The GRIB2 category number\&. 
.br
\fIg2num\fP The GRIB2 parameter number\&. 
.br
\fIabbrev\fP Pointer that gets the abbreviation\&. Ignored if NULL\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
\fBG2C_NOERROR\fP No error\&.
.IP "\(bu" 2
\fBG2C_EFILE\fP Error reading CSV file\&.
.IP "\(bu" 2
\fBG2C_ENOPARAM\fP Parameter not found\&.
.PP
.RE
.PP
\fBAuthor\fP
.RS 4
Ed Hartnett 
.RE
.PP
\fBDate\fP
.RS 4
9/19/22 
.RE
.PP

.PP
Definition at line \fB1091\fP of file \fBg2cparams\&.c\fP\&.
.PP
References \fBG2C_MAX_NOAA_ABBREV_LEN\fP, \fBG2C_MAX_NOAA_PARAMS\fP, \fBG2C_NOERROR\fP, \fBLOG\fP, and \fBparam\fP\&.
.PP
Referenced by \fBg2c_degrib2()\fP, and \fBg2c_log_section()\fP\&.
.SS "int g2c_param_all (int param_idx, int * g1num, int * g1ver, int * g2disc, int * g2cat, int * g2num, char * abbrev)"

.PP
Return all the information about a parameter\&. 
.PP
\fBParameters\fP
.RS 4
\fIparam_idx\fP Parameter index between 0 and \fBG2C_MAX_NOAA_PARAMS\fP\&. 
.br
\fIg1num\fP Pointer that gets the GRIB1 parameter\&. Ignored if NULL\&. 
.br
\fIg1ver\fP Pointer that gets the GRIB1 parameter table version number\&. Ignored if NULL\&. 
.br
\fIg2disc\fP Pointer that gets the GRIB2 discipline number\&. Ignored if NULL\&. 
.br
\fIg2cat\fP Pointer that gets the GRIB2 category number\&. Ignored if NULL\&. 
.br
\fIg2num\fP Pointer that gets the GRIB2 parameter number\&. Ignored if NULL\&. 
.br
\fIabbrev\fP Pointer that gets the abbreviation\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
\fBG2C_NOERROR\fP No error\&.
.IP "\(bu" 2
\fBG2C_EINVAL\fP Invalid input\&.
.IP "\(bu" 2
\fBG2C_EFILE\fP Error reading CSV file\&.
.IP "\(bu" 2
\fBG2C_ENOPARAM\fP Parameter not found\&.
.PP
.RE
.PP
\fBAuthor\fP
.RS 4
Ed Hartnett 
.RE
.PP
\fBDate\fP
.RS 4
9/19/22 
.RE
.PP

.PP
Definition at line \fB1185\fP of file \fBg2cparams\&.c\fP\&.
.PP
References \fBg2c_param::g1num\fP, \fBg2c_param::g1ver\fP, \fBG2C_EINVAL\fP, \fBG2C_MAX_NOAA_ABBREV_LEN\fP, \fBG2C_MAX_NOAA_PARAMS\fP, \fBG2C_NOERROR\fP, \fBg2c_param::g2cat\fP, \fBg2c_param::g2disc\fP, \fBg2c_param::g2num\fP, and \fBparam\fP\&.
.SS "int g2c_param_g1tog2 (int g1num, int g1ver, int * g2disc, int * g2cat, int * g2num)"

.PP
Translate GRIB1 parameter to GRIB2 parameter\&. 
.PP
\fBParameters\fP
.RS 4
\fIg1num\fP The GRIB1 parameter\&. 
.br
\fIg1ver\fP The GRIB1 parameter table version number\&. 
.br
\fIg2disc\fP Pointer that gets the GRIB2 discipline number\&. Ignored if NULL\&. 
.br
\fIg2cat\fP Pointer that gets the GRIB2 category number\&. Ignored if NULL\&. 
.br
\fIg2num\fP Pointer that gets the GRIB2 parameter number\&. Ignored if NULL\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
\fBG2C_NOERROR\fP No error\&.
.IP "\(bu" 2
\fBG2C_EFILE\fP Error reading CSV file\&.
.IP "\(bu" 2
\fBG2C_ENOPARAM\fP Parameter not found\&.
.PP
.RE
.PP
\fBAuthor\fP
.RS 4
Ed Hartnett 
.RE
.PP
\fBDate\fP
.RS 4
9/19/22 
.RE
.PP

.PP
Definition at line \fB1051\fP of file \fBg2cparams\&.c\fP\&.
.PP
References \fBG2C_ENOPARAM\fP, \fBG2C_MAX_NOAA_PARAMS\fP, \fBG2C_NOERROR\fP, \fBg2c_param::g2cat\fP, \fBg2c_param::g2disc\fP, \fBg2c_param::g2num\fP, and \fBparam\fP\&.
.SS "int g2c_param_g2tog1 (int g2disc, int g2cat, int g2num, int * g1num, int * g1ver)"

.PP
Translate GRIB2 parameter to GRIB1 parameter\&. 
.PP
\fBParameters\fP
.RS 4
\fIg2disc\fP The GRIB2 discipline number\&. 
.br
\fIg2cat\fP The GRIB2 category number\&. 
.br
\fIg2num\fP The GRIB2 parameter number\&. 
.br
\fIg1num\fP Pointer that gets the GRIB1 parameter\&. Ignored if NULL\&. 
.br
\fIg1ver\fP Pointer that gets the GRIB1 parameter table version number\&. Ignored if NULL\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
\fBG2C_NOERROR\fP No error\&.
.IP "\(bu" 2
\fBG2C_EFILE\fP Error reading CSV file\&.
.IP "\(bu" 2
\fBG2C_ENOPARAM\fP Parameter not found\&.
.PP
.RE
.PP
\fBAuthor\fP
.RS 4
Ed Hartnett 
.RE
.PP
\fBDate\fP
.RS 4
9/19/22 
.RE
.PP

.PP
Definition at line \fB1136\fP of file \fBg2cparams\&.c\fP\&.
.PP
References \fBg2c_param::g1num\fP, \fBg2c_param::g1ver\fP, \fBG2C_ENOPARAM\fP, \fBG2C_MAX_NOAA_PARAMS\fP, \fBG2C_NOERROR\fP, \fBLOG\fP, and \fBparam\fP\&.
.SH "Variable Documentation"
.PP 
.SS "\fBG2C_PARAM_T\fP param[\fBG2C_MAX_NOAA_PARAMS\fP]\fC [static]\fP"

.PP
An array of parameter information\&. 
.PP
Definition at line \fB14\fP of file \fBg2cparams\&.c\fP\&.
.PP
Referenced by \fBg2c_param_abbrev()\fP, \fBg2c_param_all()\fP, \fBg2c_param_g1tog2()\fP, and \fBg2c_param_g2tog1()\fP\&.
.SH "Author"
.PP 
Generated automatically by Doxygen for NCEPLIBS-g2c from the source code\&.
