SCALE-RM
|
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <mpi.h>
Go to the source code of this file.
Classes | |
struct | datainfo_t |
Macros | |
#define | File_HSHORT 32 |
#define | File_HMID 128 |
#define | File_HLONG 1024 |
#define | File_REAL4 0 |
#define | File_REAL8 1 |
#define | File_INTEGER2 2 |
#define | File_INTEGER4 3 |
#define | File_INTEGER8 4 |
#define | File_FREAD 0 |
#define | File_FWRITE 1 |
#define | File_FAPPEND 2 |
#define | ERROR_CODE -1 |
#define | SUCCESS_CODE 0 |
#define | ALREADY_CLOSED_CODE 1 |
#define | ALREADY_EXISTED_CODE 2 |
#define | MAX_RANK 10 |
Functions | |
typedef | float (real32_t) |
typedef | double (real64_t) |
int32_t | file_open (int32_t *fid, char *fname, int32_t mode, MPI_Comm comm) |
int32_t | file_set_option (int32_t fid, char *filetype, char *key, char *val) |
int32_t | file_get_datainfo (datainfo_t *dinfo, int32_t fid, char *varname, int32_t step, int32_t suppress) |
int32_t | file_read_data (void *var, datainfo_t *dinfo, int32_t precision) |
int32_t | file_read_data_par (void *var, datainfo_t *dinfo, MPI_Offset ntypes, MPI_Datatype dtype, MPI_Offset *start, MPI_Offset *count) |
int32_t | file_get_global_attribute_text (int32_t fid, char *key, char *value, int32_t len) |
int32_t | file_get_global_attribute_int (int32_t fid, char *key, int32_t *value, size_t len) |
int32_t | file_get_global_attribute_float (int32_t fid, char *key, float *value, size_t len) |
int32_t | file_get_global_attribute_double (int32_t fid, char *key, double *value, size_t len) |
int32_t | file_set_global_attribute_text (int32_t fid, char *key, char *value) |
int32_t | file_set_global_attribute_int (int32_t fid, char *key, int32_t *value, size_t len) |
int32_t | file_set_global_attribute_float (int32_t fid, char *key, float *value, size_t len) |
int32_t | file_set_global_attribute_double (int32_t fid, char *key, double *value, size_t len) |
int32_t | file_set_tunits (int32_t fid, char *time_units) |
int32_t | file_set_tattr (int32_t fid, char *vname, char *key, char *val) |
int32_t | file_put_axis (int32_t fid, char *name, char *desc, char *units, char *dim_name, int32_t dtype, void *val, int32_t size, int32_t precision) |
int32_t | file_def_axis (int32_t fid, char *name, char *desc, char *units, char *dim_name, int32_t dtype, int32_t dim_size) |
int32_t | file_write_axis (int32_t fid, char *name, void *val, int32_t precision, MPI_Offset *start, MPI_Offset *count) |
int32_t | file_put_associated_coordinates (int32_t fid, char *name, char *desc, char *units, char **dim_names, int32_t ndims, int32_t dtype, void *val, int32_t precision) |
int32_t | file_def_associated_coordinates (int32_t fid, char *name, char *desc, char *units, char **dim_names, int32_t ndims, int32_t dtype) |
int32_t | file_write_associated_coordinates (int32_t fid, char *name, void *val, int32_t precision, MPI_Offset *start, MPI_Offset *count) |
int32_t | file_add_variable (int32_t *vid, int32_t fid, char *varname, char *desc, char *units, char **dims, int32_t ndims, int32_t dtype, real64_t tint, int32_t tavg) |
int32_t | file_write_data (int32_t fid, int32_t vid, void *var, real64_t t_start, real64_t t_end, int32_t precision, MPI_Offset *start, MPI_Offset *count) |
int32_t | file_enddef (int32_t fid) |
int32_t | file_attach_buffer (int32_t fid, int32_t buf_amount) |
int32_t | file_detach_buffer (int32_t fid) |
int32_t | file_flush (int32_t fid) |
int32_t | file_close (int32_t fid) |
#define File_HSHORT 32 |
Definition at line 12 of file gtool_file.h.
Referenced by file_set_option_(), and file_set_tattr_().
#define File_HMID 128 |
Definition at line 13 of file gtool_file.h.
Referenced by file_set_option_(), and file_set_tunits_().
#define File_HLONG 1024 |
Definition at line 14 of file gtool_file.h.
Referenced by file_set_tattr_().
#define File_REAL4 0 |
Definition at line 17 of file gtool_file.h.
#define File_REAL8 1 |
Definition at line 18 of file gtool_file.h.
#define File_INTEGER2 2 |
Definition at line 19 of file gtool_file.h.
#define File_INTEGER4 3 |
Definition at line 20 of file gtool_file.h.
#define File_INTEGER8 4 |
Definition at line 21 of file gtool_file.h.
#define File_FREAD 0 |
Definition at line 24 of file gtool_file.h.
#define File_FWRITE 1 |
Definition at line 25 of file gtool_file.h.
#define File_FAPPEND 2 |
Definition at line 26 of file gtool_file.h.
#define ERROR_CODE -1 |
Definition at line 29 of file gtool_file.h.
#define SUCCESS_CODE 0 |
Definition at line 30 of file gtool_file.h.
Referenced by file_set_option().
#define ALREADY_CLOSED_CODE 1 |
Definition at line 31 of file gtool_file.h.
#define ALREADY_EXISTED_CODE 2 |
Definition at line 32 of file gtool_file.h.
#define MAX_RANK 10 |
Definition at line 35 of file gtool_file.h.
typedef float | ( | real32_t | ) |
Referenced by scale_atmos_phy_ae_kajino13::aerosol_nucleation(), scale_atmos_phy_ae_kajino13::atmos_phy_ae_kajino13_setup(), and scale_atmos_phy_rd_mm5sw::swpara().
typedef double | ( | real64_t | ) |
int32_t file_open | ( | int32_t * | fid, |
char * | fname, | ||
int32_t | mode, | ||
MPI_Comm | comm | ||
) |
Definition at line 132 of file gtool_netcdf.c.
Referenced by gtool_file::filemakefname().
int32_t file_set_option | ( | int32_t | fid, |
char * | filetype, | ||
char * | key, | ||
char * | val | ||
) |
Definition at line 202 of file gtool_netcdf.c.
References SUCCESS_CODE.
Referenced by gtool_file::filesetoption().
int32_t file_get_datainfo | ( | datainfo_t * | dinfo, |
int32_t | fid, | ||
char * | varname, | ||
int32_t | step, | ||
int32_t | suppress | ||
) |
Definition at line 218 of file gtool_netcdf.c.
Referenced by gtool_file::filegetshape(), gtool_file::filereadvar1drealdp(), gtool_file::filereadvar2drealdp(), gtool_file::filereadvar2drealsp(), gtool_file::filereadvar3drealdp(), gtool_file::filereadvar3drealsp(), gtool_file::filereadvar4drealdp(), and gtool_file::filereadvar4drealsp().
int32_t file_read_data | ( | void * | var, |
datainfo_t * | dinfo, | ||
int32_t | precision | ||
) |
Definition at line 390 of file gtool_netcdf.c.
Referenced by gtool_file::filegetshape(), gtool_file::filereadvar1drealdp(), gtool_file::filereadvar2drealdp(), gtool_file::filereadvar2drealsp(), gtool_file::filereadvar3drealdp(), gtool_file::filereadvar3drealsp(), gtool_file::filereadvar4drealdp(), and gtool_file::filereadvar4drealsp().
int32_t file_read_data_par | ( | void * | var, |
datainfo_t * | dinfo, | ||
MPI_Offset | ntypes, | ||
MPI_Datatype | dtype, | ||
MPI_Offset * | start, | ||
MPI_Offset * | count | ||
) |
Definition at line 439 of file gtool_netcdf.c.
Referenced by gtool_file::filegetshape(), gtool_file::filereadvar1drealdp(), gtool_file::filereadvar2drealdp(), gtool_file::filereadvar2drealsp(), gtool_file::filereadvar3drealdp(), gtool_file::filereadvar3drealsp(), gtool_file::filereadvar4drealdp(), and gtool_file::filereadvar4drealsp().
int32_t file_get_global_attribute_text | ( | int32_t | fid, |
char * | key, | ||
char * | value, | ||
int32_t | len | ||
) |
Definition at line 466 of file gtool_netcdf.c.
Referenced by gtool_file::filegetglobalattributetext().
int32_t file_get_global_attribute_int | ( | int32_t | fid, |
char * | key, | ||
int32_t * | value, | ||
size_t | len | ||
) |
int32_t file_get_global_attribute_float | ( | int32_t | fid, |
char * | key, | ||
float * | value, | ||
size_t | len | ||
) |
Definition at line 504 of file gtool_netcdf.c.
Referenced by gtool_file::filegetglobalattributetext().
int32_t file_get_global_attribute_double | ( | int32_t | fid, |
char * | key, | ||
double * | value, | ||
size_t | len | ||
) |
Definition at line 522 of file gtool_netcdf.c.
Referenced by gtool_file::filegetglobalattributetext().
int32_t file_set_global_attribute_text | ( | int32_t | fid, |
char * | key, | ||
char * | value | ||
) |
Definition at line 540 of file gtool_netcdf.c.
Referenced by gtool_file::filegetglobalattributetext().
int32_t file_set_global_attribute_int | ( | int32_t | fid, |
char * | key, | ||
int32_t * | value, | ||
size_t | len | ||
) |
int32_t file_set_global_attribute_float | ( | int32_t | fid, |
char * | key, | ||
float * | value, | ||
size_t | len | ||
) |
Definition at line 593 of file gtool_netcdf.c.
Referenced by gtool_file::filegetglobalattributetext().
int32_t file_set_global_attribute_double | ( | int32_t | fid, |
char * | key, | ||
double * | value, | ||
size_t | len | ||
) |
Definition at line 620 of file gtool_netcdf.c.
Referenced by gtool_file::filegetglobalattributetext().
int32_t file_set_tunits | ( | int32_t | fid, |
char * | time_units | ||
) |
Definition at line 647 of file gtool_netcdf.c.
Referenced by gtool_file::filecreate().
int32_t file_set_tattr | ( | int32_t | fid, |
char * | vname, | ||
char * | key, | ||
char * | val | ||
) |
Definition at line 655 of file gtool_netcdf.c.
Referenced by gtool_file::filesettattr().
int32_t file_put_axis | ( | int32_t | fid, |
char * | name, | ||
char * | desc, | ||
char * | units, | ||
char * | dim_name, | ||
int32_t | dtype, | ||
void * | val, | ||
int32_t | size, | ||
int32_t | precision | ||
) |
Definition at line 694 of file gtool_netcdf.c.
Referenced by gtool_file::fileopen().
int32_t file_def_axis | ( | int32_t | fid, |
char * | name, | ||
char * | desc, | ||
char * | units, | ||
char * | dim_name, | ||
int32_t | dtype, | ||
int32_t | dim_size | ||
) |
Definition at line 748 of file gtool_netcdf.c.
Referenced by gtool_file::filedefaxis().
int32_t file_write_axis | ( | int32_t | fid, |
char * | name, | ||
void * | val, | ||
int32_t | precision, | ||
MPI_Offset * | start, | ||
MPI_Offset * | count | ||
) |
Definition at line 797 of file gtool_netcdf.c.
Referenced by gtool_file::filedefaxis().
int32_t file_put_associated_coordinates | ( | int32_t | fid, |
char * | name, | ||
char * | desc, | ||
char * | units, | ||
char ** | dim_names, | ||
int32_t | ndims, | ||
int32_t | dtype, | ||
void * | val, | ||
int32_t | precision | ||
) |
Definition at line 842 of file gtool_netcdf.c.
Referenced by gtool_file::filedefaxis().
int32_t file_def_associated_coordinates | ( | int32_t | fid, |
char * | name, | ||
char * | desc, | ||
char * | units, | ||
char ** | dim_names, | ||
int32_t | ndims, | ||
int32_t | dtype | ||
) |
Definition at line 900 of file gtool_netcdf.c.
Referenced by gtool_file::filedefassociatedcoordinates().
int32_t file_write_associated_coordinates | ( | int32_t | fid, |
char * | name, | ||
void * | val, | ||
int32_t | precision, | ||
MPI_Offset * | start, | ||
MPI_Offset * | count | ||
) |
Definition at line 956 of file gtool_netcdf.c.
Referenced by gtool_file::filedefassociatedcoordinates().
int32_t file_add_variable | ( | int32_t * | vid, |
int32_t | fid, | ||
char * | varname, | ||
char * | desc, | ||
char * | units, | ||
char ** | dims, | ||
int32_t | ndims, | ||
int32_t | dtype, | ||
real64_t | tint, | ||
int32_t | tavg | ||
) |
Definition at line 1001 of file gtool_netcdf.c.
Referenced by gtool_file::filedefassociatedcoordinates(), and gtool_file::filedefinevariable().
int32_t file_write_data | ( | int32_t | fid, |
int32_t | vid, | ||
void * | var, | ||
real64_t | t_start, | ||
real64_t | t_end, | ||
int32_t | precision, | ||
MPI_Offset * | start, | ||
MPI_Offset * | count | ||
) |
Definition at line 1323 of file gtool_netcdf.c.
Referenced by gtool_file::filewrite1drealsp().
int32_t file_enddef | ( | int32_t | fid | ) |
Definition at line 1260 of file gtool_netcdf.c.
Referenced by file_enddef_(), and gtool_file::fileenddef().
int32_t file_attach_buffer | ( | int32_t | fid, |
int32_t | buf_amount | ||
) |
Definition at line 1280 of file gtool_netcdf.c.
Referenced by file_attach_buffer_(), and gtool_file::fileattachbuffer().
int32_t file_detach_buffer | ( | int32_t | fid | ) |
Definition at line 1295 of file gtool_netcdf.c.
Referenced by file_detach_buffer_(), and gtool_file::filedetachbuffer().
int32_t file_flush | ( | int32_t | fid | ) |
Definition at line 1308 of file gtool_netcdf.c.
Referenced by file_flush_(), and gtool_file::fileflush().
int32_t file_close | ( | int32_t | fid | ) |
Definition at line 1426 of file gtool_netcdf.c.
Referenced by file_close_(), and gtool_file::fileclose().