|
RCube
Rcube Rest Server calculates sail routes based on Grib files and sailing boat polar files
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <stdbool.h>#include <time.h>#include <math.h>#include <sys/stat.h>#include <locale.h>#include "eccodes.h"#include "../csources/glibwrapper.h"#include "../csources/r3types.h"#include "../csources/r3util.h"#include "../csources/inline.h"#include <grib_api.h>
Go to the source code of this file.
Macros | |
| #define | EPSILON 0.001 |
compilation: gcc -c grib.c pkg-config --cflags glib-2.0 | |
| #define | GUST_GFS 180 |
Functions | |
| char * | gribReaderVersion (char *str, size_t maxLen) |
| return version of ECCODE API | |
| static long | indLat (double lat, const Zone *zone) |
| return indice of lat in gribData wind or current | |
| static long | indLon (double lon, const Zone *zone) |
| return indice of lon in gribData wind or current | |
| static long | updateLong (long value, size_t n, size_t maxSize, long array[]) |
| Modify array with new value if not already in array. | |
| bool | readGribLists (const char *fileName, Zone *zone) |
| Read lists zone.timeStamp, shortName, zone.dataDate, dataTime before full grib reading. | |
| bool | readGribParameters (const char *fileName, Zone *zone) |
| Read grib parameters in zone before full grib reading. | |
| static long | indexOf (int timeStep, double lat, double lon, const Zone *zone) |
| find index in gribData table | |
| bool | readGribAll (const char *fileName, Zone *zone, int iFlow) |
| read grib file using eccodes C API return true if OK | |
Variables | |
| FlowP * | tGribData [2] = {NULL, NULL} |
| grib data description | |
| #define EPSILON 0.001 |
compilation: gcc -c grib.c pkg-config --cflags glib-2.0
Definition at line 17 of file readgriballeccodes.c.
| #define GUST_GFS 180 |
Definition at line 18 of file readgriballeccodes.c.
| char * gribReaderVersion | ( | char * | str, |
| size_t | maxLen | ||
| ) |
return version of ECCODE API
Definition at line 23 of file readgriballeccodes.c.
|
inlinestatic |
find index in gribData table
Definition at line 178 of file readgriballeccodes.c.
References indLat(), indLon(), Zone::nbLat, Zone::nbLon, Zone::nTimeStamp, Zone::timeStamp, and zone.
Referenced by readGribAll().


|
inlinestatic |
return indice of lat in gribData wind or current
Definition at line 29 of file readgriballeccodes.c.
References Zone::latMin, Zone::latStep, and zone.
Referenced by indexOf().

|
inlinestatic |
return indice of lon in gribData wind or current
Definition at line 34 of file readgriballeccodes.c.
References Zone::lonLeft, Zone::lonStep, and zone.
Referenced by indexOf().

| bool readGribAll | ( | const char * | fileName, |
| Zone * | zone, | ||
| int | iFlow | ||
| ) |
read grib file using eccodes C API return true if OK
Definition at line 196 of file readgriballeccodes.c.
| bool readGribLists | ( | const char * | fileName, |
| Zone * | zone | ||
| ) |
Read lists zone.timeStamp, shortName, zone.dataDate, dataTime before full grib reading.
Definition at line 56 of file readgriballeccodes.c.
Referenced by readGribAll().

| bool readGribParameters | ( | const char * | fileName, |
| Zone * | zone | ||
| ) |
Read grib parameters in zone before full grib reading.
Definition at line 128 of file readgriballeccodes.c.
Referenced by readGribAll().

|
static |
Modify array with new value if not already in array.
Return new array size
Definition at line 40 of file readgriballeccodes.c.
Referenced by readGribLists().

| FlowP* tGribData[2] = {NULL, NULL} |
grib data description
Definition at line 20 of file readgriballeccodes.c.
Referenced by readGribAll().