These functions help with the definition and reading of latitude and longitude coordinate variables and dimensions. More...
Functions | |
| int | nccf_def_lvl (int ncid, const char *name, size_t len, nc_type xtype, const char *units, int positive_up, const char *standard_name, const char *formula_terms, int cdm_axis_type, int *lvl_dimidp, int *lvl_varidp) |
| Define a coordinate variable and dimension with all the CF recommended attribute accessories for a vertical level. | |
| int | nccf_inq_lvl (int ncid, char *name, size_t *lenp, nc_type *xtypep, size_t *ft_lenp, char *formula_terms, int *positive_upp, int *lvl_dimidp, int *lvl_varidp) |
| Inquire about a vertical dimension and coordinate variable. | |
| int | nccf_def_lvl_atm_ln (int ncid, const char *name, nc_type xtype, size_t len, int *lvl_dimidp, int *lvl_varidp) |
| Define a vertical coordinate for atmosphere natural log pressure. | |
| int | nccf_def_ft_atm_ln (int ncid, int varid, int pref_varid) |
| Define formula terms for atmosphere natural log pressure. | |
| int | nccf_inq_lvl_atm_ln (int ncid, char *name, nc_type *xtypep, size_t *lenp, int *pref_varidp, int *lvl_dimidp, int *lvl_varidp) |
| Inquire about atmosphere natural log pressure coordinate. | |
| int | nccf_def_lvl_vert (int ncid, int lvl_type, const char *name, nc_type xtype, size_t len, int *lvl_dimidp, int *lvl_varidp) |
| Create a unitless vertical dimension/variable from appendix D of the CF standard. | |
| int | nccf_def_lvl_sigma (int ncid, const char *name, nc_type xtype, size_t len, int *lvl_dimidp, int *lvl_varidp) |
| Define a vertical sigma coordinate dimension. | |
| int | nccf_def_ft_sigma (int ncid, int lvl_varid, int ps_varid, int p0_varid) |
| Define formula terms attribute for atmosphere sigma coordinate variable. | |
| int | nccf_inq_lvl_vert (int ncid, char *name, nc_type *xtypep, size_t *lenp, int *lvl_typep, int *lvl_dimidp, int *lvl_varidp) |
| Inquire about a level dimension and coordinate variable. | |
| int | nccf_inq_lvl_sigma (int ncid, char *name, nc_type *xtypep, size_t *lenp, int *ps_varidp, int *ptop_varidp, int *lvl_dimidp, int *lvl_varidp) |
| Inquire about atmospheric sigma coordinate. | |
| int | nccf_def_lvl_hybrid_sigma (int ncid, const char *name, nc_type xtype, size_t len, int *lvl_dimidp, int *lvl_varidp) |
| Define hybrid sigma pressure coordinate. | |
| int | nccf_def_ft_hybrid_sigma (int ncid, int lvl_varid, int a_varid, int b_varid, int ps_varid, int p0_varid) |
| Define formula terms attribute for atmosphere hybrid sigma coordinate variable. | |
| int | nccf_inq_lvl_hybrid_sigma (int ncid, char *name, nc_type *xtypep, size_t *lenp, int *a_varidp, int *b_varidp, int *ps_varidp, int *p0_varidp, int *lvl_dimidp, int *lvl_varidp) |
| Inquire about hybrid sigma coordinate. | |
| int | nccf_def_lvl_hybrid_height (int ncid, const char *name, nc_type xtype, size_t len, int *lvl_dimidp, int *lvl_varidp) |
| Atmosphere hybrid height coordinate. | |
| int | nccf_def_ft_hybrid_height (int ncid, int varid, int a_varid, int b_varid, int orog_varid) |
| Define formula terms attribute for atmosphere hybrid height coordinate variable. | |
| int | nccf_inq_lvl_hybrid_height (int ncid, char *name, nc_type *xtypep, size_t *lenp, int *a_varidp, int *b_varidp, int *orog_varidp, int *lvl_dimidp, int *lvl_varidp) |
| Inquire about atmosphere hybrid_height coordinate. | |
| int | nccf_def_lvl_sleve (int ncid, const char *name, nc_type xtype, size_t len, int *lvl_dimidp, int *lvl_varidp) |
| Atmosphere smooth level vertical (SLEVE) coordinate. | |
| int | nccf_def_ft_sleve (int ncid, int varid, int a_varid, int b1_varid, int b2_varid, int ztop_varid, int zsurf1_varid, int zsurf2_varid) |
| Define formula terms attribute for the atmosphere sleve coordinate variable. | |
| int | nccf_inq_lvl_sleve (int ncid, char *name, nc_type *xtypep, size_t *lenp, int *a_varidp, int *b1_varidp, int *b2_varidp, int *ztop_varidp, int *zsurf1_varidp, int *zsurf2_varidp, int *lvl_dimidp, int *lvl_varidp) |
| Inquire about atmosphere sleve coordinate. | |
| int | nccf_def_lvl_ocean_sigma (int ncid, const char *name, nc_type xtype, size_t len, int *lvl_dimidp, int *lvl_varidp) |
| Define an ocean sigma coordinate. | |
| int | nccf_def_ft_ocean_sigma (int ncid, int varid, int eta_varid, int depth_varid) |
| Define the formula terms attribute for the ocean sigma coordinate variable. | |
| int | nccf_inq_lvl_ocean_sigma (int ncid, char *name, nc_type *xtypep, size_t *lenp, int *eta_varidp, int *depth_varidp, int *lvl_dimidp, int *lvl_varidp) |
| Inquire about ocean sigma coordinate. | |
| int | nccf_def_lvl_ocean_s (int ncid, const char *name, nc_type xtype, size_t len, int *lvl_dimidp, int *lvl_varidp) |
| Define ocean s-coordinate. | |
| int | nccf_def_ft_ocean_s (int ncid, int varid, int eta_varid, int depth_varid, int a_varid, int b_varid, int depth_c_varid) |
| Define the formula terms attribute for the ocean sigma coordinate variable. | |
| int | nccf_inq_lvl_ocean_s (int ncid, char *name, nc_type *xtypep, size_t *lenp, int *eta_varidp, int *depth_varidp, int *a_varidp, int *b_varidp, int *depth_c_varidp, int *lvl_dimidp, int *lvl_varidp) |
| Inquire about ocean_s coordinate. | |
| int | nccf_def_lvl_ocean_sigma_z (int ncid, const char *name, nc_type xtype, size_t len, int *lvl_dimidp, int *lvl_varidp) |
| Define ocean sigma over z coordinate. | |
| int | nccf_def_ft_ocean_sigma_z (int ncid, int varid, int eta_varid, int depth_varid, int depth_c_varid, int nsigma_varid, int zlev_varid) |
| Define formula terms for the ocean sigma z coordinate. | |
| int | nccf_inq_lvl_ocean_sigma_z (int ncid, char *name, nc_type *xtypep, size_t *lenp, int *eta_varidp, int *depth_varidp, int *depth_c_varidp, int *nsigma_varidp, int *zlev_varidp, int *lvl_dimidp, int *lvl_varidp) |
| Inquire about atmosphere ocean_sigma_z coordinate. | |
| int | nccf_def_lvl_ocean_dbl_sigma (int ncid, const char *name, nc_type xtype, size_t len, int *lvl_dimidp, int *lvl_varidp) |
| Define ocean double sigma coordinate. | |
| int | nccf_def_ft_ocean_dbl_sigma (int ncid, int varid, int depth_varid, int z1_varid, int z2_varid, int a_varid, int href_varid, int k_c_varid) |
| Define formula terms for ocean double sigma coordinate. | |
| int | nccf_inq_lvl_ocean_dbl_sigma (int ncid, char *name, nc_type *xtypep, size_t *lenp, int *depth_varidp, int *z1_varidp, int *z2_varidp, int *a_varidp, int *href_varidp, int *k_c_varidp, int *lvl_dimidp, int *lvl_varidp) |
| Inquire about the ocean double sigma coordinate. | |
These functions help with the definition and reading of latitude and longitude coordinate variables and dimensions.
| int nccf_def_ft_atm_ln | ( | int | ncid, |
| int | varid, | ||
| int | pref_varid | ||
| ) |
| int nccf_def_ft_hybrid_height | ( | int | ncid, |
| int | varid, | ||
| int | a_varid, | ||
| int | b_varid, | ||
| int | orog_varid | ||
| ) |
Define formula terms attribute for atmosphere hybrid height coordinate variable.
| ncid | The ncid of the file. |
| varid | The varid of the vertical coordinate variable. |
| a_varid | The variable ID of the a variable. |
| b_varid | The variable ID of the b variable. |
| orog_varid | The variable ID of the orog variable. |
| int nccf_def_ft_hybrid_sigma | ( | int | ncid, |
| int | lvl_varid, | ||
| int | a_varid, | ||
| int | b_varid, | ||
| int | ps_varid, | ||
| int | p0_varid | ||
| ) |
Define formula terms attribute for atmosphere hybrid sigma coordinate variable.
| ncid | The ncid of the file. |
| lvl_varid | The varid of the vertical coordinate variable. |
| a_varid | The variable ID of the a variable. |
| b_varid | The variable ID of the b variable. |
| ps_varid | The variable ID of the ps variable. |
| p0_varid | The variable ID of the ptop variable. |
| int nccf_def_ft_ocean_dbl_sigma | ( | int | ncid, |
| int | varid, | ||
| int | depth_varid, | ||
| int | z1_varid, | ||
| int | z2_varid, | ||
| int | a_varid, | ||
| int | href_varid, | ||
| int | k_c_varid | ||
| ) |
Define formula terms for ocean double sigma coordinate.
| ncid | The ncid of the file. |
| varid | The varid of the vertical coordinate variable. |
| depth_varid | The variable ID of the depth variable. |
| z1_varid | The variable ID of the z1 variable. |
| z2_varid | The variable ID of the z2 variable. |
| a_varid | The variable ID of the a variable. |
| href_varid | The variable ID of the href variable. |
| k_c_varid | The variable ID of the k_c variable. |
| int nccf_def_ft_ocean_s | ( | int | ncid, |
| int | varid, | ||
| int | eta_varid, | ||
| int | depth_varid, | ||
| int | a_varid, | ||
| int | b_varid, | ||
| int | depth_c_varid | ||
| ) |
Define the formula terms attribute for the ocean sigma coordinate variable.
| ncid | The ncid of the file. |
| varid | The varid of the vertical coordinate variable. |
| eta_varid | The variable ID of the eta variable. |
| depth_varid | The variable ID of the depth variable. |
| a_varid | The variable ID of the a variable. |
| b_varid | The variable ID of the b variable. |
| depth_c_varid | The variable ID of the depth_c variable. |
| int nccf_def_ft_ocean_sigma | ( | int | ncid, |
| int | varid, | ||
| int | eta_varid, | ||
| int | depth_varid | ||
| ) |
Define the formula terms attribute for the ocean sigma coordinate variable.
| ncid | The ncid of the file. |
| varid | The varid of the vertical coordinate variable. |
| eta_varid | The variable ID of the eta variable. |
| depth_varid | The variable ID of the depth variable. |
| int nccf_def_ft_ocean_sigma_z | ( | int | ncid, |
| int | varid, | ||
| int | eta_varid, | ||
| int | depth_varid, | ||
| int | depth_c_varid, | ||
| int | nsigma_varid, | ||
| int | zlev_varid | ||
| ) |
Define formula terms for the ocean sigma z coordinate.
| ncid | The ncid of the file. |
| varid | The varid of the vertical coordinate variable. |
| eta_varid | The variable ID of the eta variable. |
| depth_varid | The variable ID of the depth variable. |
| depth_c_varid | The variable ID of the depth_c variable. |
| nsigma_varid | The variable ID of the nsigma variable. |
| zlev_varid | The variable ID of the zlev variable. |
| int nccf_def_ft_sigma | ( | int | ncid, |
| int | lvl_varid, | ||
| int | ps_varid, | ||
| int | p0_varid | ||
| ) |
Define formula terms attribute for atmosphere sigma coordinate variable.
| ncid | The ncid of the file. |
| lvl_varid | The variable ID of the level. |
| ps_varid | The variable ID of the ps variable. |
| p0_varid | The variable ID of the p0 variable. |
| int nccf_def_ft_sleve | ( | int | ncid, |
| int | varid, | ||
| int | a_varid, | ||
| int | b1_varid, | ||
| int | b2_varid, | ||
| int | ztop_varid, | ||
| int | zsurf1_varid, | ||
| int | zsurf2_varid | ||
| ) |
Define formula terms attribute for the atmosphere sleve coordinate variable.
| ncid | The ncid of the file. |
| varid | The varid of the vertical coordinate variable. |
| a_varid | The variable ID of the a variable. |
| b1_varid | The variable ID of the b1 variable. |
| b2_varid | The variable ID of the b2 variable. |
| ztop_varid | The variable ID of the ztop variable. |
| zsurf1_varid | The variable ID of the zsurf1 variable. |
| zsurf2_varid | The variable ID of the zsurf2 variable. |
| int nccf_def_lvl | ( | int | ncid, |
| const char * | name, | ||
| size_t | len, | ||
| nc_type | xtype, | ||
| const char * | units, | ||
| int | positive_up, | ||
| const char * | standard_name, | ||
| const char * | formula_terms, | ||
| int | cdm_axis_type, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Define a coordinate variable and dimension with all the CF recommended attribute accessories for a vertical level.
| ncid | The ncid of the file. |
| name | The name of the coordinate dimension and variable. |
| len | The length of this coordinate dimension and variable. |
| xtype | The type of this coordinate variable. |
| units | If non-NULL, a string which will be written as the ``units'' attribute on the coordinate variable. |
| positive_up | Set to 0 and the attribute ``positive'' to ``down''. Set to any other value to get ``up''. |
| standard_name | If non-NULL, a string which will be written as the ``standard_name'' attribute on the coordinate variable. |
| formula_terms | If non-NULL, a string which will be written as the ``formula_terms'' attribute on the coordinate variable. |
| cdm_axis_type | CDM axis type. |
| lvl_dimidp | If non-NULL, nccf_def_lvl will write the dimension ID of the netCDF dimension for the level here. |
| lvl_varidp | If non-NULL, nccf_def_lvl will write the variable ID of the netCDF coordinate variable for the level here. |
| int nccf_def_lvl_atm_ln | ( | int | ncid, |
| const char * | name, | ||
| nc_type | xtype, | ||
| size_t | len, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Define a vertical coordinate for atmosphere natural log pressure.
Atmosphere natural log pressure coordinate
standard_name = 'atmosphere_ln_pressure_coordinate'
Definition:
p(k) = p0 * exp(-lev(k))
where p(k) is the pressure at gridpoint (k), p0 is a reference pressure, lev(k) is the dimensionless coordinate at vertical gridpoint (k).
The format for the formula_terms attribute is
formula_terms = 'p0: var1 lev: var2'
| ncid | The ncid of the file. |
| name | the name of the dimension and variable. |
| xtype | The type of this coordinate variable. |
| len | The length of this coordinate dimension. |
| lvl_dimidp | If non-NULL, nccf_def_longitude will write the dimension ID of the netCDF dimension for the longitude here. |
| lvl_varidp | If non-NULL, nccf_def_longitude will write the variable ID of the netCDF coordinate variable for the longitude here. |
| int nccf_def_lvl_hybrid_height | ( | int | ncid, |
| const char * | name, | ||
| nc_type | xtype, | ||
| size_t | len, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Atmosphere hybrid height coordinate.
standard_name = 'atmosphere_hybrid_height_coordinate'
Definition: z(n,k,j,i) = a(k) + b(k)*orog(n,j,i)
where z(n,k,j,i) is the height above the geoid (approximately mean sea level) at gridpoint (k,j,i) and time (n), orog(n,j,i) is the height of the surface above the geoid at (j,i) and time (n), and a(k) and b(k) are the coordinates which define hybrid height level k. a(k) has the dimensions of height and b(k) is dimensionless.
The format for the formula_terms attribute is formula_terms = 'a: var1 b: var2 orog: var3'
There is no dimensionless hybrid height coordinate. The hybrid height is best approximated as a(k) if a level-dependent constant is needed.
| ncid | The ncid of the file. |
| name | The name of the coordinate dimension and variable. |
| xtype | The type of this coordinate variable. |
| len | The length of this coordinate dimension and variable. |
| lvl_dimidp | If non-NULL, the function will write the dimension ID of the netCDF dimension for the level here. |
| lvl_varidp | If non-NULL, the function will write the variable ID of the netCDF coordinate variable for the level here. |
| int nccf_def_lvl_hybrid_sigma | ( | int | ncid, |
| const char * | name, | ||
| nc_type | xtype, | ||
| size_t | len, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Define hybrid sigma pressure coordinate.
standard_name = 'atmosphere_hybrid_sigma_pressure_coordinate'
Definition:
p(n,k,j,i) = a(k)*p0 + b(k)*ps(n,j,i)
or
p(n,k,j,i) = ap(k) + b(k)*ps(n,j,i)
where p(n,k,j,i) is the pressure at gridpoint (n,k,j,i), a(k) or ap(k) and b(k) are components of the hybrid coordinate at level k, p0 is a reference pressure, and ps(n,j,i) is the surface pressure at horizontal gridpoint (j,i) and time (n). The choice of whether a(k) or ap(k) is used depends on model formulation; the former is a dimensionless fraction, the latter a pressure value. In both formulations, b(k) is a dimensionless fraction.
The format for the formula_terms attribute is
formula_terms = 'a: var1 b: var2 ps: var3 p0: var4'
where a is replaced by ap if appropriate.
The hybrid sigma-pressure coordinate for level k is defined as a(k)+b(k) or ap(k)/p0+b(k), as appropriate.
| ncid | The ncid of the file. |
| name | If non-NULL, the name of this vertical level dimension (and variable) will be written here. |
| xtype | If non-NULL, the type of the coordinate variable will be written here. |
| len | If non-NULL, the length of the level dimension will be written here by nccf_inq_lvl. |
| lvl_dimidp | If non-NULL, the dimid of the level dimension will be written here. |
| lvl_varidp | If non-NULL, the varid of the level coordinate variable will be written here. |
| int nccf_def_lvl_ocean_dbl_sigma | ( | int | ncid, |
| const char * | name, | ||
| nc_type | xtype, | ||
| size_t | len, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Define ocean double sigma coordinate.
standard_name = 'ocean_double_sigma_coordinate'
Definition:
for k <= k_c
z(k,j,i)= sigma(k)*f(j,i)
for k > k_c
z(k,j,i)= f(j,i) + (sigma(k)-1)*(depth(j,i)-f(j,i))
f(j,i)= 0.5*(z1+ z2) + 0.5*(z1-z2)* tanh(2*a/(z1-z2)*(depth(j,i)-href))
where z(k,j,i) is height, positive upwards, relative to ocean datum (e.g. mean sea level) at gridpoint (k,j,i), sigma(k) is the dimensionless coordinate at vertical gridpoint (k) for k <= k_c, and depth(j,i) is the distance from ocean datum to sea floor (positive value) at horizontal gridpoint (j,i). z1, z2, a, and href are constants.
The format for the formula_terms attribute is:
formula_terms = 'sigma: var1 depth: var2 z1: var3 z2: var4 a: var5 href: var6 k_c: var7'
| ncid | The ncid of the file. |
| name | The name of the coordinate dimension and variable. |
| xtype | The type of this coordinate variable. |
| len | The length of this coordinate dimension and variable. |
| lvl_dimidp | If non-NULL, the function will write the dimension ID of the netCDF dimension for the level here. |
| lvl_varidp | If non-NULL, the function will write the variable ID of the netCDF coordinate variable for the level here. |
| int nccf_def_lvl_ocean_s | ( | int | ncid, |
| const char * | name, | ||
| nc_type | xtype, | ||
| size_t | len, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Define ocean s-coordinate.
standard_name = 'ocean_s_coordinate'
z(n,k,j,i) = eta(n,j,i)*(1+s(k)) + depth_c*s(k) + (depth(j,i)-depth_c)*C(k)
C(k) = (1-b)*sinh(a*s(k))/sinh(a) + b*[tanh(a*(s(k)+0.5))/(2*tanh(0.5*a)) - 0.5]
where z(n,k,j,i) is height, positive upwards, relative to ocean datum (e.g. mean sea level) at gridpoint (n,k,j,i), eta(n,j,i) is the height of the ocean surface, positive upwards, relative to ocean datum at gridpoint (n,j,i), s(k) is the dimensionless coordinate at vertical gridpoint (k), and depth(j,i) is the distance from ocean datum to sea floor (positive value) at horizontal gridpoint (j,i). The constants a, b, and depth_c control the stretching.
The format for the formula_terms attribute is
formula_terms = 's: var1 eta: var2 depth: var3 a: var4 b: var5 depth_c: var6'
| ncid | The ncid of the file. |
| name | The name of the coordinate dimension and variable. |
| xtype | The type of this coordinate variable. |
| len | The length of this coordinate dimension and variable. |
| lvl_dimidp | If non-NULL, the function will write the dimension ID of the netCDF dimension for the level here. |
| lvl_varidp | If non-NULL, the function will write the variable ID of the netCDF coordinate variable for the level here. |
| int nccf_def_lvl_ocean_sigma | ( | int | ncid, |
| const char * | name, | ||
| nc_type | xtype, | ||
| size_t | len, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Define an ocean sigma coordinate.
standard_name = 'ocean_sigma_coordinate'
Definition: z(n,k,j,i) = eta(n,j,i) + sigma(k) * (depth(j,i)+eta(n,j,i))
where z(n,k,j,i) is height, positive upwards, relative to ocean datum (e.g. mean sea level) at gridpoint (n,k,j,i), eta(n,j,i) is the height of the ocean surface, positive upwards, relative to ocean datum at gridpoint (n,j,i), sigma(k) is the dimensionless coordinate at vertical gridpoint (k), and depth(j,i) is the distance from ocean datum to sea floor (positive value) at horizontal gridpoint (j,i).
The format for the formula_terms attribute is formula_terms = 'sigma: var1 eta: var2 depth: var3'
| ncid | The ncid of the file. |
| name | The name of the coordinate dimension and variable. |
| xtype | The type of this coordinate variable. |
| len | The length of this coordinate dimension and variable. |
| lvl_dimidp | If non-NULL, the function will write the dimension ID of the netCDF dimension for the level here. |
| lvl_varidp | If non-NULL, the function will write the variable ID of the netCDF coordinate variable for the level here. |
| int nccf_def_lvl_ocean_sigma_z | ( | int | ncid, |
| const char * | name, | ||
| nc_type | xtype, | ||
| size_t | len, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Define ocean sigma over z coordinate.
standard_name = 'ocean_sigma_z_coordinate'
for k <= nsigma: z(n,k,j,i) = eta(n,j,i) + sigma(k)*(min(depth_c,depth(j,i))+eta(n,j,i))
for k > nsigma: z(n,k,j,i) = zlev(k)
where z(n,k,j,i) is height, positive upwards, relative to ocean datum (e.g. mean sea level) at gridpoint (n,k,j,i), eta(n,j,i) is the height of the ocean surface, positive upwards, relative to ocean datum at gridpoint (n,j,i), sigma(k) is the dimensionless coordinate at vertical gridpoint (k) for k <= nsigma, and depth(j,i) is the distance from ocean datum to sea floor (positive value) at horizontal gridpoint (j,i). Above depth depth_c there are nsigma layers.
The format for the formula_terms attribute is
formula_terms = 'sigma: var1 eta: var2 depth: var3 depth_c: var4 nsigma: var5 zlev: var6'
| ncid | The ncid of the file. |
| name | The name of the coordinate dimension and variable. |
| xtype | The type of this coordinate variable. |
| len | The length of this coordinate dimension and variable. |
| lvl_dimidp | If non-NULL, the function will write the dimension ID of the netCDF dimension for the level here. |
| lvl_varidp | If non-NULL, the function will write the variable ID of the netCDF coordinate variable for the level here. |
| int nccf_def_lvl_sigma | ( | int | ncid, |
| const char * | name, | ||
| nc_type | xtype, | ||
| size_t | len, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Define a vertical sigma coordinate dimension.
From the CF doc:
Atmosphere sigma coordinate: float lev(lev) ; lev:long_name = 'sigma at layer midpoints' ; lev:positive = 'down' ; lev:standard_name = 'atmosphere_sigma_coordinate' ; lev:formula_terms = 'sigma: lev ps: PS ptop: PTOP' ;
| ncid | The ncid of the file. |
| name | If non-NULL, the name of this vertical level dimension (and variable) will be written here. |
| xtype | If non-NULL, the type of the coordinate variable will be written here. |
| len | If non-NULL, the length of the level dimension will be written here by nccf_inq_lvl. |
| lvl_dimidp | If non-NULL, the dimid of the level dimension will be written here. |
| lvl_varidp | If non-NULL, the varid of the level coordinate variable will be written here. |
| int nccf_def_lvl_sleve | ( | int | ncid, |
| const char * | name, | ||
| nc_type | xtype, | ||
| size_t | len, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Atmosphere smooth level vertical (SLEVE) coordinate.
standard_name = 'atmosphere_sleve_coordinate'
Definition: z(n,k,j,i) = a(k)*ztop + b1(k)*zsurf1(n,j,i) + b2(k)*zsurf2(n,j,i)
where z(n,k,j,i) is the height above the geoid (approximately mean sea level) at gridpoint (k,j,i) and time (n), ztop is the height of the top of the model, and a(k), b1(k) and b2(k) are the dimensionless coordinates which define hybrid height level k. zsurf1(n,j,i) and zsurf2(n,j,i) are respectively the large and small scale parts of the topography. See Schaer et al [SCH02] for details.
The format for the formula_terms attribute is
formula_terms = 'a: var1 b1: var2 b2: var3 ztop: var4 zsurf1: var5 zsurf2: var6'
The hybrid height coordinate for level k is defined as a(k)*ztop.
| ncid | The ncid of the file. |
| name | The name of the coordinate dimension and variable. |
| xtype | The type of this coordinate variable. |
| len | The length of this coordinate dimension and variable. |
| lvl_dimidp | If non-NULL, the function will write the dimension ID of the netCDF dimension for the level here. |
| lvl_varidp | If non-NULL, the function will write the variable ID of the netCDF coordinate variable for the level here. |
| int nccf_def_lvl_vert | ( | int | ncid, |
| int | lvl_type, | ||
| const char * | name, | ||
| nc_type | xtype, | ||
| size_t | len, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Create a unitless vertical dimension/variable from appendix D of the CF standard.
| ncid | The ncid of the file. |
| lvl_type | One of: CF_VERT_ATM_LN, CF_VERT_SIGMA, CF_VERT_HYBRID_SIGMA, CF_VERT_HYBRID_HEIGHT, CF_VERT_SLEVE, CF_VERT_OCEAN_SIGMA, CF_VERT_OCEAN_S, CF_VERT_OCEAN_SIGMA_Z, CF_VERT_OCEAN_DBL_SIGMA. |
| name | The name of the coordinate dimension and variable. |
| xtype | The type of this coordinate variable. |
| len | The length of this coordinate dimension and variable. |
| lvl_dimidp | If non-NULL, the function will write the dimension ID of the netCDF dimension for the level here. |
| lvl_varidp | If non-NULL, the function will write the variable ID of the netCDF coordinate variable for the level here. |
| int nccf_inq_lvl | ( | int | ncid, |
| char * | name, | ||
| size_t * | lenp, | ||
| nc_type * | xtypep, | ||
| size_t * | ft_lenp, | ||
| char * | formula_terms, | ||
| int * | positive_upp, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Inquire about a vertical dimension and coordinate variable.
| ncid | The ncid of the file. |
| name | If non-NULL, the name of this vertical level dimension (and variable) will be written here. |
| lenp | If non-NULL, the length of the level dimension will be written here by nccf_inq_lvl. |
| xtypep | If non-NULL, the type of the coordinate variable will be written here. |
| ft_lenp | If non-NULL, the length of the value of the ``formula_terms'' attribute will be written here by ft_lenp. If there is no ``formula_terms'' attribute, zero will be written. |
| formula_terms | If non-NULL, the value of the formula terms attribute will be copied here. |
| positive_upp | If non-NULL, a one will be written here if the ``positive'' attribute of this coordinate variable is ``up'', a zero will be written if it is ``down''. |
| lvl_dimidp | If non-NULL, the dimid of the level dimension will be written here. |
| lvl_varidp | If non-NULL, the varid of the level coordinate variable will be written here. |
| int nccf_inq_lvl_atm_ln | ( | int | ncid, |
| char * | name, | ||
| nc_type * | xtypep, | ||
| size_t * | lenp, | ||
| int * | pref_varidp, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Inquire about atmosphere natural log pressure coordinate.
| ncid | The ncid of the file. |
| name | If non-NULL the name of the time dimension and variable will be copied here. |
| xtypep | If non-NULL, the type of the coordinate variable will be copied here. |
| lenp | If non-NULL, the length of the time dimension will be copied here by nccf_inq_time. |
| pref_varidp | If non-NULL, the varid of the pref variable will be copied here. |
| lvl_dimidp | If non-NULL, the dimid of the vertical dimension will be copied here. |
| lvl_varidp | If non-NULL, the varid of the vertical coordinate variable will be copied here. |
| int nccf_inq_lvl_hybrid_height | ( | int | ncid, |
| char * | name, | ||
| nc_type * | xtypep, | ||
| size_t * | lenp, | ||
| int * | a_varidp, | ||
| int * | b_varidp, | ||
| int * | orog_varidp, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Inquire about atmosphere hybrid_height coordinate.
| ncid | The ncid of the file. |
| name | If non-NULL, this pointer gets the name of the coordinate variable and dimension. |
| xtypep | If non-NULL, the type of the coordinate variable will be written here. |
| lenp | If non-NULL, the length of the coordinate dimension will be written here. |
| a_varidp | If non-NULL, the variable ID of the a variable will be written here. |
| b_varidp | If non-NULL, the variable ID of the b variable will be written here. |
| orog_varidp | If non-NULL, the variable ID of the orog variable will be written here. |
| lvl_dimidp | If non-NULL, the dimid of the coordinate dimension will be written here. |
| lvl_varidp | If non-NULL, the varid of the coordinate variable will be written here. |
| int nccf_inq_lvl_hybrid_sigma | ( | int | ncid, |
| char * | name, | ||
| nc_type * | xtypep, | ||
| size_t * | lenp, | ||
| int * | a_varidp, | ||
| int * | b_varidp, | ||
| int * | ps_varidp, | ||
| int * | p0_varidp, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Inquire about hybrid sigma coordinate.
| ncid | The ncid of the file. |
| name | If non-NULL, this pointer gets the name of the coordinate variable and dimension. |
| xtypep | If non-NULL, the type of the coordinate variable will be written here. |
| lenp | If non-NULL, the length of the coordinate dimension will be written here. |
| a_varidp | If non-NULL, the variable ID of the a variable will be written here. |
| b_varidp | If non-NULL, the variable ID of the b variable will be written here. |
| ps_varidp | If non-NULL, the variable ID of the ps variable will be written here. |
| p0_varidp | If non-NULL, the variable ID of the ptop variable will be written here. |
| lvl_dimidp | If non-NULL, the dimid of the coordinate dimension will be written here. |
| lvl_varidp | If non-NULL, the varid of the coordinate variable will be written here. |
| int nccf_inq_lvl_ocean_dbl_sigma | ( | int | ncid, |
| char * | name, | ||
| nc_type * | xtypep, | ||
| size_t * | lenp, | ||
| int * | depth_varidp, | ||
| int * | z1_varidp, | ||
| int * | z2_varidp, | ||
| int * | a_varidp, | ||
| int * | href_varidp, | ||
| int * | k_c_varidp, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Inquire about the ocean double sigma coordinate.
| ncid | The ncid of the file. |
| name | If non-NULL, this pointer gets the name of the coordinate variable and dimension. |
| xtypep | If non-NULL, the type of the coordinate variable will be copied here. |
| lenp | If non-NULL, the length of the coordinate dimension will be copied here. |
| depth_varidp | If non-NULL, the variable ID of the depth variable will be copied here. |
| z1_varidp | If non-NULL, the variable ID of the z1 variable will be copied here. |
| z2_varidp | If non-NULL, the variable ID of the z2 variable will be copied here. |
| a_varidp | If non-NULL, the variable ID of the a variable will be copied here. |
| href_varidp | If non-NULL, the variable ID of the href variable will be copied here. |
| k_c_varidp | If non-NULL, the variable ID of the k_c variable will be copied here. |
| lvl_dimidp | If non-NULL, the dimid of the coordinate dimension will be copied here. |
| lvl_varidp | If non-NULL, the varid of the coordinate variable will be copied here. |
| int nccf_inq_lvl_ocean_s | ( | int | ncid, |
| char * | name, | ||
| nc_type * | xtypep, | ||
| size_t * | lenp, | ||
| int * | eta_varidp, | ||
| int * | depth_varidp, | ||
| int * | a_varidp, | ||
| int * | b_varidp, | ||
| int * | depth_c_varidp, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Inquire about ocean_s coordinate.
| ncid | The ncid of the file. |
| name | If non-NULL, this pointer gets the name of the coordinate variable and dimension. |
| xtypep | If non-NULL, the type of the coordinate variable will be written here. |
| lenp | If non-NULL, the length of the coordinate dimension will be written here. |
| eta_varidp | If non-NULL, the variable ID of the eta variable will be written here. |
| depth_varidp | If non-NULL, the variable ID of the depth variable will be written here. |
| a_varidp | If non-NULL, the variable ID of the a variable will be written here. |
| b_varidp | If non-NULL, the variable ID of the b variable will be written here. |
| depth_c_varidp | If non-NULL, the variable ID of the depth_c variable will be written here. |
| lvl_dimidp | If non-NULL, the dimid of the coordinate dimension will be written here. |
| lvl_varidp | If non-NULL, the varid of the coordinate variable will be written here. |
| int nccf_inq_lvl_ocean_sigma | ( | int | ncid, |
| char * | name, | ||
| nc_type * | xtypep, | ||
| size_t * | lenp, | ||
| int * | eta_varidp, | ||
| int * | depth_varidp, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Inquire about ocean sigma coordinate.
| ncid | The ncid of the file. |
| name | If non-NULL, this pointer gets the name of the coordinate variable and dimension. |
| xtypep | If non-NULL, the type of the coordinate variable will be written here. |
| lenp | If non-NULL, the length of the coordinate dimension will be written here. |
| eta_varidp | If non-NULL, the variable ID of the eta variable will be written here. |
| depth_varidp | If non-NULL, the variable ID of the depth variable will be written here. |
| lvl_dimidp | If non-NULL, the dimid of the coordinate dimension will be written here. |
| lvl_varidp | If non-NULL, the varid of the coordinate variable will be written here. |
| int nccf_inq_lvl_ocean_sigma_z | ( | int | ncid, |
| char * | name, | ||
| nc_type * | xtypep, | ||
| size_t * | lenp, | ||
| int * | eta_varidp, | ||
| int * | depth_varidp, | ||
| int * | depth_c_varidp, | ||
| int * | nsigma_varidp, | ||
| int * | zlev_varidp, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Inquire about atmosphere ocean_sigma_z coordinate.
| ncid | The ncid of the file. |
| name | If non-NULL, this pointer gets the name of the coordinate variable and dimension. |
| xtypep | If non-NULL, the type of the coordinate variable will be written here. |
| lenp | If non-NULL, the length of the coordinate dimension will be written here. |
| eta_varidp | If non-NULL, the variable ID of the eta variable will be written here. |
| depth_varidp | If non-NULL, the variable ID of the depth variable will be written here. |
| depth_c_varidp | If non-NULL, the variable ID of the depth_c variable will be written here. |
| nsigma_varidp | If non-NULL, the variable ID of the nsigma variable will be written here. |
| zlev_varidp | If non-NULL, the variable ID of the zlev variable will be written here. |
| lvl_dimidp | If non-NULL, the dimid of the coordinate dimension will be written here. |
| lvl_varidp | If non-NULL, the varid of the coordinate variable will be written here. |
| int nccf_inq_lvl_sigma | ( | int | ncid, |
| char * | name, | ||
| nc_type * | xtypep, | ||
| size_t * | lenp, | ||
| int * | ps_varidp, | ||
| int * | ptop_varidp, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Inquire about atmospheric sigma coordinate.
| ncid | The ncid of the file. |
| name | If non-NULL, this pointer gets the name of the coordinate variable and dimension. |
| xtypep | If non-NULL, the type of the coordinate variable will be written here. |
| lenp | If non-NULL, the length of the coordinate dimension will be written here. |
| ps_varidp | If non-NULL, the variable ID of the ps variable will be written here. |
| ptop_varidp | If non-NULL, the variable ID of the ptop variable will be written here. |
| lvl_dimidp | If non-NULL, the dimid of the coordinate dimension will be written here. |
| lvl_varidp | If non-NULL, the varid of the coordinate variable will be written here. |
| int nccf_inq_lvl_sleve | ( | int | ncid, |
| char * | name, | ||
| nc_type * | xtypep, | ||
| size_t * | lenp, | ||
| int * | a_varidp, | ||
| int * | b1_varidp, | ||
| int * | b2_varidp, | ||
| int * | ztop_varidp, | ||
| int * | zsurf1_varidp, | ||
| int * | zsurf2_varidp, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Inquire about atmosphere sleve coordinate.
| ncid | The ncid of the file. |
| name | If non-NULL, this pointer gets the name of the coordinate variable and dimension. |
| xtypep | If non-NULL, the type of the coordinate variable will be written here. |
| lenp | If non-NULL, the length of the coordinate dimension will be written here. |
| a_varidp | If non-NULL, the variable ID of the a variable will be written here. |
| b1_varidp | If non-NULL, the variable ID of the b1 variable will be written here. |
| b2_varidp | If non-NULL, the variable ID of the b2 variable will be written here. |
| ztop_varidp | If non-NULL, the variable ID of the ztop variable will be written here. |
| zsurf1_varidp | If non-NULL, the variable ID of the zsurf1 variable will be written here. |
| zsurf2_varidp | If non-NULL, the variable ID of the zsurf2 variable will be written here. |
| lvl_dimidp | If non-NULL, the dimid of the coordinate dimension will be written here. |
| lvl_varidp | If non-NULL, the varid of the coordinate variable will be written here. |
| int nccf_inq_lvl_vert | ( | int | ncid, |
| char * | name, | ||
| nc_type * | xtypep, | ||
| size_t * | lenp, | ||
| int * | lvl_typep, | ||
| int * | lvl_dimidp, | ||
| int * | lvl_varidp | ||
| ) |
Inquire about a level dimension and coordinate variable.
| ncid | The ncid of the file. |
| name | If non-NULL, the name of this vertical level dimension (and variable) will be written here. |
| xtypep | If non-NULL, the type of the coordinate variable will be written here. |
| lenp | If non-NULL, the length of the level dimension will be written here. |
| lvl_typep | If non-NULL, the type of vertical dimension will be written here, one of CF_VERT_ATM_LN, CF_VERT_SIGMA, CF_VERT_HYBRID_SIGMA, CF_VERT_HYBRID_HEIGHT, CF_VERT_SLEVE, CF_VERT_OCEAN_SIGMA, CF_VERT_OCEAN_S, CF_VERT_OCEAN_SIGMA_Z, CF_VERT_OCEAN_DBL_SIGMA. |
| lvl_dimidp | If non-NULL, the dimid of the level dimension will be written here. |
| lvl_varidp | If non-NULL, the varid of the level coordinate variable will be written here. |