BG_Flood  0.1
Documentation (Work-in-progress)
Read_netcdf.h
Go to the documentation of this file.
1 
2 #ifndef READNETCDF_H
3 #define READNETCDF_H
4 
5 #include "General.h"
6 #include "Input.h"
7 #include "ReadInput.h"
8 #include "Write_txtlog.h"
9 #include "Write_netcdf.h"
10 #include "Util_CPU.h"
11 #include "GridManip.h"
12 #include "Forcing.h"
13 #include "utctime.h"
14 
15 
16 
17 inline int nc_get_var_T(int ncid, int varid, float * &zb);
18 inline int nc_get_var_T(int ncid, int varid, double * &zb);
19 
20 inline int nc_get_vara_T(int ncid, int varid, const size_t* startp, const size_t* countp, float * &zb);
21 inline int nc_get_vara_T(int ncid, int varid, const size_t* startp, const size_t* countp, double * &zb);
22 
23 inline int nc_get_var1_T(int ncid, int varid, const size_t* startp, float * zsa);
24 inline int nc_get_var1_T(int ncid, int varid, const size_t* startp, double * zsa);
25 
26 //template <class T> int readnczb(int nx, int ny, const std::string ncfile, T * &zb);
27 //int readnczb(int nx, int ny, const std::string ncfile, float*& zb);
28 //int readnczb(int nx, int ny, const std::string ncfile, double*& zb);
29 std::string checkncvarname(int ncid, std::string stringA, std::string stringB, std::string stringC, std::string stringD, std::string stringE);
30 
31 
32 void readgridncsize(const std::string ncfilestr, const std::string varstr, std::string reftime, int& nx, int& ny, int& nt, double& dx, double& dy, double& dt, double& xo, double& yo, double& to, double& xmax, double& ymax, double& tmax, bool& flipx, bool& flipy);
33 void readgridncsize(forcingmap& Fmap, Param XParam);
34 
35 template<class T> void readgridncsize(T& Imap);
36 
37 
38 int readvarinfo(std::string filename, std::string Varname, size_t *&ddimU);
39 int readnctime(std::string filename, double * &time);
40 int readnctime2(int ncid,char* timecoordname, std::string refdate, size_t nt, double*& time);
41 template <class T> int readncslev1(std::string filename, std::string varstr, size_t indx, size_t indy, size_t indt, bool checkhh, double eps, T * &zsa);
42 template <class T> int readvardata(std::string filename, std::string Varname, int step, T*& vardata, bool flipx, bool flipy);
43 //template <class T> int readhotstartfile(Param XParam, int * leftblk, int *rightblk, int * topblk, int* botblk, double * blockxo, double * blockyo, T * &zs, T * &zb, T * &hh, T *&uu, T * &vv);
44 
45 void readWNDstep(forcingmap WNDUmap, forcingmap WNDVmap, int steptoread, float *&Uo, float *&Vo);
46 void readATMstep(forcingmap ATMPmap, int steptoread, float *&Po);
47 
48 extern "C" void read3Dnc(int nx, int ny, int ntheta, char ncfile[], float*& ee);
49 extern "C" void read2Dnc(int nx, int ny, char ncfile[], float*& hh);
50 extern "C" void readnczb(int nx, int ny, std::string ncfile, float*& zb);
51 
52 
53 // End of global definition
54 #endif
float * hh
Definition: BasCart_gpu.cu:54
float * zb
Definition: BasCart_gpu.cu:54
int readnctime2(int ncid, char *timecoordname, std::string refdate, size_t nt, double *&time)
Definition: Read_netcdf.cu:430
void readATMstep(forcingmap ATMPmap, int steptoread, float *&Po)
Definition: Read_netcdf.cu:1049
int nc_get_vara_T(int ncid, int varid, const size_t *startp, const size_t *countp, float *&zb)
Definition: Read_netcdf.cu:50
void readWNDstep(forcingmap WNDUmap, forcingmap WNDVmap, int steptoread, float *&Uo, float *&Vo)
Definition: Read_netcdf.cu:958
std::string checkncvarname(int ncid, std::string stringA, std::string stringB, std::string stringC, std::string stringD, std::string stringE)
Definition: Read_netcdf.cu:913
void readgridncsize(const std::string ncfilestr, const std::string varstr, std::string reftime, int &nx, int &ny, int &nt, double &dx, double &dy, double &dt, double &xo, double &yo, double &to, double &xmax, double &ymax, double &tmax, bool &flipx, bool &flipy)
Definition: Read_netcdf.cu:83
int readncslev1(std::string filename, std::string varstr, size_t indx, size_t indy, size_t indt, bool checkhh, double eps, T *&zsa)
Definition: Read_netcdf.cu:558
void read3Dnc(int nx, int ny, int ntheta, char ncfile[], float *&ee)
Definition: Read_netcdf.cu:1113
int readvardata(std::string filename, std::string Varname, int step, T *&vardata, bool flipx, bool flipy)
Definition: Read_netcdf.cu:724
void readnczb(int nx, int ny, std::string ncfile, float *&zb)
Definition: Read_netcdf.cu:1137
int nc_get_var_T(int ncid, int varid, float *&zb)
Definition: Read_netcdf.cu:24
int readnctime(std::string filename, double *&time)
Definition: Read_netcdf.cu:389
int readvarinfo(std::string filename, std::string Varname, size_t *&ddimU)
Definition: Read_netcdf.cu:347
int nc_get_var1_T(int ncid, int varid, const size_t *startp, float *zsa)
Definition: Read_netcdf.cu:65
void read2Dnc(int nx, int ny, char ncfile[], float *&hh)
Definition: Read_netcdf.cu:1125
int nx
Definition: Tutorial_Cart.c:6
char ncfile[]
Definition: Tutorial_Cart.c:10
Definition: Param.h:10
Definition: Forcing.h:28