YAC 3.6.2
Yet Another Coupler
Loading...
Searching...
No Matches
read_grid.c File Reference
#include "config.h"
#include <netcdf.h>
#include <string.h>
#include "geometry.h"
#include "utils_common.h"
#include "io_utils.h"
Include dependency graph for read_grid.c:

Go to the source code of this file.

Functions

static size_t check_dimension (int ncid, int varids[2])
 
int yac_check_coord_units (int ncid, int varid)
 
static double * read_coord (int ncid, int varid, size_t varlen)
 
void yac_read_coords (int ncid, char const *lon_name, char const *lat_name, double **lon, double **lat, size_t *len)
 

Function Documentation

◆ check_dimension()

static size_t check_dimension ( int ncid,
int varids[2] )
static

Definition at line 20 of file read_grid.c.

Here is the caller graph for this function:

◆ read_coord()

static double * read_coord ( int ncid,
int varid,
size_t varlen )
static

Definition at line 80 of file read_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_check_coord_units()

int yac_check_coord_units ( int ncid,
int varid )

Checks the variable for an attribute with the name "units". If it is available and contains the string "degree", this routine will return 1, 0 otherwise.

Definition at line 45 of file read_grid.c.

Here is the caller graph for this function:

◆ yac_read_coords()

void yac_read_coords ( int ncid,
char const * lon_name,
char const * lat_name,
double ** lon,
double ** lat,
size_t * len )

reads a coordinate array from a netcdf file, tries to interpret the units attribute of the variable and will convert the coordinates into radiant if necessary

Parameters
[in]ncid
[in]lon_namename of longitude array in grid file
[in]lat_namename of latitude array in grid file
[out]lonlon array in radiant
[out]latlat array in radiant
[out]lennumber of coordinates in lon and lat arrays

Definition at line 94 of file read_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function: