1 | //netcdf |
---|
2 | #ifndef NCUTIL |
---|
3 | #define NCUTIL |
---|
4 | |
---|
5 | #include <stdio.h> |
---|
6 | #include <stdlib.h> |
---|
7 | #include <iostream> |
---|
8 | #include <netcdf.h> |
---|
9 | |
---|
10 | |
---|
11 | void handle_error (int status, char *txt);///*fonction de message d'erreur |
---|
12 | int Ouvre_nc(char const *var_file );///* Ouvre un fichier nc et renvoie son id var_file_id |
---|
13 | int Ouvre_nc_write(char const *var_file); ///* ouvre un fichier nc pour écriture et renvoie son id var_file_id |
---|
14 | int Var_id(int var_file_id,char* varn); ///*initial traceurs actifs |
---|
15 | |
---|
16 | |
---|
17 | void vonclire(int t,int znbval, int ynbval, int xnbval, int ncid, int varid, double vect[]); |
---|
18 | void vonclire(int t,int znbval, int ynbval, int xnbval, int ncid, int varid, int vect[]); |
---|
19 | // lire volume 3D au temps t |
---|
20 | // le parametre t commence de 0 et pas de 1 |
---|
21 | // (t,znbval,ynbval,xnbval,ncid, varid): |
---|
22 | // lit la variable varid aux points (t,1:znbval,1:ynbval,1:xnbval) et |
---|
23 | // renvoie un vecteur de dim znbval*ynbval*xnbval |
---|
24 | |
---|
25 | void sonclire(int t,int ynbval, int xnbval, int ncid, int varid, double vect[]); |
---|
26 | void sonclire(int t,int ynbval, int xnbval, int ncid, int varid, float vect[]); |
---|
27 | void sonclire(int t,int ynbval, int xnbval, int ncid, int varid, int vect[]); |
---|
28 | // lire surface 2D au temps t |
---|
29 | // le parametre t commence de 0 et pas de 1 |
---|
30 | // (t,ynbval,xnbval,ncid, varid): |
---|
31 | // lit la variable varid aux points (t,1:ynbval,1:xnbval) et |
---|
32 | // renvoie un vecteur de dim ynbval*xnbval |
---|
33 | |
---|
34 | void zonclire(int t,int znbval, int ncid, int varid, double vect[]); |
---|
35 | void zonclire(int t,int znbval, int ncid, int varid, int vect[]); |
---|
36 | // lire surface 1D au temps t |
---|
37 | // le parametre t commence de 0 et pas de 1 |
---|
38 | // (t,znbval,ncid, varid): |
---|
39 | // lit la variable varid aux points (t,1:znbval) et |
---|
40 | // renvoie un vecteur de dim znbval |
---|
41 | |
---|
42 | #endif |
---|
43 | |
---|