SCALE-RM
|
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
Go to the source code of this file.
Classes | |
struct | datainfo_t |
Macros | |
#define | File_HSHORT 16 |
#define | File_HMID 64 |
#define | File_HLONG 256 |
#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) |
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_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) |
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) |
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) |
int32_t | file_write_var (int32_t vid, void *var, real64_t t_start, real64_t t_end, int32_t precision) |
int32_t | file_enddef (int32_t fid) |
int32_t | file_close (int32_t fid) |
#define File_HSHORT 16 |
Definition at line 11 of file gtool_file.h.
Referenced by file_set_option_(), file_set_tattr_(), file_write_associated_coordinates_(), and file_write_axis_().
#define File_HMID 64 |
Definition at line 12 of file gtool_file.h.
Referenced by file_set_option_(), and file_set_tunits_().
#define File_HLONG 256 |
Definition at line 13 of file gtool_file.h.
Referenced by file_set_tattr_().
#define File_REAL4 0 |
Definition at line 16 of file gtool_file.h.
#define File_REAL8 1 |
Definition at line 17 of file gtool_file.h.
#define File_INTEGER2 2 |
Definition at line 18 of file gtool_file.h.
#define File_INTEGER4 3 |
Definition at line 19 of file gtool_file.h.
#define File_INTEGER8 4 |
Definition at line 20 of file gtool_file.h.
#define File_FREAD 0 |
Definition at line 23 of file gtool_file.h.
#define File_FWRITE 1 |
Definition at line 24 of file gtool_file.h.
#define File_FAPPEND 2 |
Definition at line 25 of file gtool_file.h.
#define ERROR_CODE -1 |
Definition at line 28 of file gtool_file.h.
Referenced by file_set_option().
#define SUCCESS_CODE 0 |
Definition at line 29 of file gtool_file.h.
Referenced by file_enddef(), file_set_option(), file_set_tattr(), and file_set_tunits().
#define ALREADY_CLOSED_CODE 1 |
Definition at line 30 of file gtool_file.h.
Referenced by file_close(), file_enddef(), file_set_option(), file_set_tattr(), file_write_associated_coordinates(), file_write_axis(), file_write_data(), and file_write_var().
#define ALREADY_EXISTED_CODE 2 |
Definition at line 31 of file gtool_file.h.
Referenced by file_set_tattr().
#define MAX_RANK 10 |
Definition at line 34 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 | ||
) |
Definition at line 97 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 146 of file gtool_netcdf.c.
References ALREADY_CLOSED_CODE, fileinfo_t::deflate_level, ERROR_CODE, and 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 162 of file gtool_netcdf.c.
Referenced by gtool_file::filegetalldatainfo(), gtool_file::filegetdatainfo(), and gtool_file::filegetshape().
int32_t file_read_data | ( | void * | var, |
datainfo_t * | dinfo, | ||
int32_t | precision | ||
) |
Definition at line 245 of file gtool_netcdf.c.
Referenced by gtool_file::filegetalldatainfo().
int32_t file_get_global_attribute_text | ( | int32_t | fid, |
char * | key, | ||
char * | value, | ||
int32_t | len | ||
) |
Definition at line 294 of file gtool_netcdf.c.
Referenced by gtool_file::filecreate().
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 332 of file gtool_netcdf.c.
Referenced by gtool_file::filecreate().
int32_t file_get_global_attribute_double | ( | int32_t | fid, |
char * | key, | ||
double * | value, | ||
size_t | len | ||
) |
Definition at line 350 of file gtool_netcdf.c.
Referenced by gtool_file::filecreate().
int32_t file_set_global_attribute_text | ( | int32_t | fid, |
char * | key, | ||
char * | value | ||
) |
Definition at line 368 of file gtool_netcdf.c.
Referenced by gtool_file::filecreate().
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 411 of file gtool_netcdf.c.
Referenced by gtool_file::filecreate().
int32_t file_set_global_attribute_double | ( | int32_t | fid, |
char * | key, | ||
double * | value, | ||
size_t | len | ||
) |
Definition at line 433 of file gtool_netcdf.c.
Referenced by gtool_file::filecreate().
int32_t file_set_tunits | ( | int32_t | fid, |
char * | time_units | ||
) |
Definition at line 455 of file gtool_netcdf.c.
References SUCCESS_CODE.
Referenced by gtool_file::filecreate().
int32_t file_set_tattr | ( | int32_t | fid, |
char * | vname, | ||
char * | key, | ||
char * | val | ||
) |
Definition at line 463 of file gtool_netcdf.c.
References ALREADY_CLOSED_CODE, ALREADY_EXISTED_CODE, CHECK_ERROR, fileinfo_t::ncid, and SUCCESS_CODE.
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 492 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 546 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 | ||
) |
Definition at line 581 of file gtool_netcdf.c.
References ALREADY_CLOSED_CODE, CHECK_ERROR, and fileinfo_t::ncid.
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 615 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 673 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 | ||
) |
Definition at line 712 of file gtool_netcdf.c.
References ALREADY_CLOSED_CODE, CHECK_ERROR, and fileinfo_t::ncid.
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 746 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 | ||
) |
Definition at line 948 of file gtool_netcdf.c.
References ALREADY_CLOSED_CODE, CHECK_ERROR, tdim_t::count, varinfo_t::count, varinfo_t::ncid, varinfo_t::start, tdim_t::t, varinfo_t::t, TEPS, and varinfo_t::varid.
Referenced by file_write_data_(), and gtool_file::filegetalldatainfo().
int32_t file_write_var | ( | int32_t | vid, |
void * | var, | ||
real64_t | t_start, | ||
real64_t | t_end, | ||
int32_t | precision | ||
) |
Definition at line 1042 of file gtool_netcdf.c.
References ALREADY_CLOSED_CODE, CHECK_ERROR, tdim_t::count, varinfo_t::count, varinfo_t::ncid, varinfo_t::start, tdim_t::t, varinfo_t::t, TEPS, and varinfo_t::varid.
Referenced by file_write_var_(), and gtool_file::filegetalldatainfo().
int32_t file_enddef | ( | int32_t | fid | ) |
Definition at line 1025 of file gtool_netcdf.c.
References ALREADY_CLOSED_CODE, CHECK_ERROR, fileinfo_t::ncid, and SUCCESS_CODE.
Referenced by file_enddef_(), and gtool_file::fileenddef().
int32_t file_close | ( | int32_t | fid | ) |
Definition at line 1109 of file gtool_netcdf.c.
References ALREADY_CLOSED_CODE, and fileinfo_t::ncid.
Referenced by file_close_(), and gtool_file::fileclose().