SCALE-RM
|
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <mpi.h>
#include "scale_file_const.h"
Go to the source code of this file.
Classes | |
struct | datainfo_t |
Functions | |
typedef | float (real32_t) |
typedef | double (real64_t) |
int32_t | file_open_c (int32_t *fid, const char *fname, const int32_t mode, const MPI_Comm comm) |
int32_t | file_get_dim_length_c (const int32_t fid, const char *dimname, int32_t *len) |
int32_t | file_set_option_c (const int32_t fid, const char *filetype, const char *key, const char *val) |
int32_t | file_get_nvars_c (const int32_t fid, int32_t *nvars) |
int32_t | file_get_varname_c (const int32_t fid, const int32_t vid, char *name, const int32_t len) |
int32_t | file_get_datainfo_c (datainfo_t *dinfo, const int32_t fid, const char *varname, const int32_t step, const int32_t suppress) |
int32_t | file_get_step_size_c (const int32_t fid, const char *varname, int32_t *len) |
int32_t | file_read_data_c (void *var, const datainfo_t *dinfo, const int32_t precision, const MPI_Offset ntypes, const MPI_Datatype dtype, const int32_t *start, const int32_t *count) |
int32_t | file_get_attribute_text_c (const int32_t fid, const char *vname, const char *key, const int32_t suppress, char *value, const int32_t len) |
int32_t | file_get_attribute_int_c (const int32_t fid, const char *vname, const char *key, const int32_t suppress, int32_t *value, const size_t len) |
int32_t | file_get_attribute_float_c (const int32_t fid, const char *vname, const char *key, const int32_t suppress, float *value, const size_t len) |
int32_t | file_get_attribute_double_c (const int32_t fid, const char *vname, const char *key, const int32_t suppress, double *value, const size_t len) |
int32_t | file_set_attribute_text_c (const int32_t fid, const char *vname, const char *key, const char *value) |
int32_t | file_set_attribute_int_c (const int32_t fid, const char *vname, const char *key, const int32_t *value, const size_t len) |
int32_t | file_set_attribute_float_c (const int32_t fid, const char *vname, const char *key, const float *value, const size_t len) |
int32_t | file_set_attribute_double_c (const int32_t fid, const char *vname, const char *key, const double *value, const size_t len) |
int32_t | file_add_associatedvariable_c (const int32_t fid, const char *vname) |
int32_t | file_set_tunits_c (const int32_t fid, const char *time_units, const char *calendar) |
int32_t | file_put_axis_c (const int32_t fid, const char *name, const char *desc, const char *units, const char *dim_name, const int32_t dtype, const void *val, const int32_t size, const int32_t precision) |
int32_t | file_def_axis_c (const int32_t fid, const char *name, const char *desc, const char *units, const char *dim_name, const int32_t dtype, const int32_t dim_size, const int32_t bounds) |
int32_t | file_write_axis_c (const int32_t fid, const char *name, const void *val, const int32_t precision, const MPI_Offset *start, const MPI_Offset *count) |
int32_t | file_put_associatedcoordinate_c (const int32_t fid, const char *name, const char *desc, const char *units, const char **dim_names, const int32_t ndims, const int32_t dtype, const void *val, const int32_t precision) |
int32_t | file_def_associatedcoordinate_c (const int32_t fid, const char *name, const char *desc, const char *units, const char **dim_names, const int32_t ndims, const int32_t dtype) |
int32_t | file_write_associatedcoordinate_c (const int32_t fid, const char *name, const void *val, const int32_t precision, const MPI_Offset *start, const MPI_Offset *count) |
int32_t | file_add_variable_c (const int32_t fid, const char *varname, const char *desc, const char *units, const char *stdname, const char **dims, const int32_t ndims, const int32_t dtype, const real64_t tint, const int32_t tavg, int32_t *vid) |
int32_t | file_write_data_c (const int32_t fid, const int32_t vid, const void *var, const real64_t t_start, const real64_t t_end, const int32_t precision, const int32_t ndims, const int32_t *start, const int32_t *count) |
int32_t | file_enddef_c (const int32_t fid) |
int32_t | file_attach_buffer_c (const int32_t fid, const int64_t buf_amount) |
int32_t | file_detach_buffer_c (const int32_t fid) |
int32_t | file_flush_c (const int32_t fid) |
int32_t | file_close_c (const int32_t fid) |
typedef float | ( | real32_t | ) |
Referenced by scale_atmos_phy_ae_kajino13::atmos_phy_ae_kajino13_negative_fixer(), 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_c | ( | int32_t * | fid, |
const char * | fname, | ||
const int32_t | mode, | ||
const MPI_Comm | comm | ||
) |
Definition at line 170 of file scale_file_netcdf.c.
Referenced by scale_file::file_get_aggregate().
int32_t file_get_dim_length_c | ( | const int32_t | fid, |
const char * | dimname, | ||
int32_t * | len | ||
) |
Definition at line 256 of file scale_file_netcdf.c.
References ALREADY_CLOSED_CODE, CHECK_ERROR, CHECK_PNC_ERROR, fileinfo_t::ncid, ncmpi_inq_dimid, and SUCCESS_CODE.
Referenced by scale_file::file_get_dimlength().
int32_t file_set_option_c | ( | const int32_t | fid, |
const char * | filetype, | ||
const char * | key, | ||
const char * | val | ||
) |
Definition at line 280 of file scale_file_netcdf.c.
References ALREADY_CLOSED_CODE, fileinfo_t::deflate_level, ERROR_CODE, and SUCCESS_CODE.
Referenced by scale_file::file_set_option().
int32_t file_get_nvars_c | ( | const int32_t | fid, |
int32_t * | nvars | ||
) |
Definition at line 296 of file scale_file_netcdf.c.
References ALREADY_CLOSED_CODE, CHECK_ERROR, CHECK_PNC_ERROR, fileinfo_t::ncid, and SUCCESS_CODE.
Referenced by scale_file::file_create().
int32_t file_get_varname_c | ( | const int32_t | fid, |
const int32_t | vid, | ||
char * | name, | ||
const int32_t | len | ||
) |
Definition at line 313 of file scale_file_netcdf.c.
Referenced by scale_file::file_create().
int32_t file_get_datainfo_c | ( | datainfo_t * | dinfo, |
const int32_t | fid, | ||
const char * | varname, | ||
const int32_t | step, | ||
const int32_t | suppress | ||
) |
Definition at line 338 of file scale_file_netcdf.c.
Referenced by scale_file::file_def_variable(), and scale_file::file_get_stepsize().
int32_t file_get_step_size_c | ( | const int32_t | fid, |
const char * | varname, | ||
int32_t * | len | ||
) |
Definition at line 633 of file scale_file_netcdf.c.
References ALREADY_CLOSED_CODE, CHECK_ERROR, CHECK_PNC_ERROR, scale_file::i, fileinfo_t::ncid, ncmpi_inq_varid, RANK_MAX, and SUCCESS_CODE.
Referenced by scale_file::file_get_stepsize().
int32_t file_read_data_c | ( | void * | var, |
const datainfo_t * | dinfo, | ||
const int32_t | precision, | ||
const MPI_Offset | ntypes, | ||
const MPI_Datatype | dtype, | ||
const int32_t * | start, | ||
const int32_t * | count | ||
) |
Definition at line 687 of file scale_file_netcdf.c.
Referenced by scale_file::file_get_stepsize().
int32_t file_get_attribute_text_c | ( | const int32_t | fid, |
const char * | vname, | ||
const char * | key, | ||
const int32_t | suppress, | ||
char * | value, | ||
const int32_t | len | ||
) |
Definition at line 834 of file scale_file_netcdf.c.
Referenced by scale_file::file_def_variable().
int32_t file_get_attribute_int_c | ( | const int32_t | fid, |
const char * | vname, | ||
const char * | key, | ||
const int32_t | suppress, | ||
int32_t * | value, | ||
const size_t | len | ||
) |
int32_t file_get_attribute_float_c | ( | const int32_t | fid, |
const char * | vname, | ||
const char * | key, | ||
const int32_t | suppress, | ||
float * | value, | ||
const size_t | len | ||
) |
Definition at line 924 of file scale_file_netcdf.c.
Referenced by scale_file::file_def_variable().
int32_t file_get_attribute_double_c | ( | const int32_t | fid, |
const char * | vname, | ||
const char * | key, | ||
const int32_t | suppress, | ||
double * | value, | ||
const size_t | len | ||
) |
Definition at line 967 of file scale_file_netcdf.c.
Referenced by scale_file::file_def_variable().
int32_t file_set_attribute_text_c | ( | const int32_t | fid, |
const char * | vname, | ||
const char * | key, | ||
const char * | value | ||
) |
Definition at line 1010 of file scale_file_netcdf.c.
References ALREADY_CLOSED_CODE, ALREADY_EXISTED_CODE, CHECK_ERROR, CHECK_PNC_ERROR, fileinfo_t::ncid, ncmpi_inq_attid, and ncmpi_inq_varid.
Referenced by scale_file::file_def_variable().
int32_t file_set_attribute_int_c | ( | const int32_t | fid, |
const char * | vname, | ||
const char * | key, | ||
const int32_t * | value, | ||
const size_t | len | ||
) |
Definition at line 1051 of file scale_file_netcdf.c.
Referenced by scale_file::file_def_variable().
int32_t file_set_attribute_float_c | ( | const int32_t | fid, |
const char * | vname, | ||
const char * | key, | ||
const float * | value, | ||
const size_t | len | ||
) |
Definition at line 1094 of file scale_file_netcdf.c.
Referenced by scale_file::file_def_variable().
int32_t file_set_attribute_double_c | ( | const int32_t | fid, |
const char * | vname, | ||
const char * | key, | ||
const double * | value, | ||
const size_t | len | ||
) |
Definition at line 1136 of file scale_file_netcdf.c.
Referenced by scale_file::file_def_variable().
int32_t file_add_associatedvariable_c | ( | const int32_t | fid, |
const char * | vname | ||
) |
Definition at line 1174 of file scale_file_netcdf.c.
References ALREADY_CLOSED_CODE, ALREADY_EXISTED_CODE, and fileinfo_t::ncid.
Referenced by scale_file::file_add_associatedvariable().
int32_t file_set_tunits_c | ( | const int32_t | fid, |
const char * | time_units, | ||
const char * | calendar | ||
) |
Definition at line 1197 of file scale_file_netcdf.c.
Referenced by scale_file::file_create().
int32_t file_put_axis_c | ( | const int32_t | fid, |
const char * | name, | ||
const char * | desc, | ||
const char * | units, | ||
const char * | dim_name, | ||
const int32_t | dtype, | ||
const void * | val, | ||
const int32_t | size, | ||
const int32_t | precision | ||
) |
Definition at line 1207 of file scale_file_netcdf.c.
Referenced by scale_file::file_get_dimlength().
int32_t file_def_axis_c | ( | const int32_t | fid, |
const char * | name, | ||
const char * | desc, | ||
const char * | units, | ||
const char * | dim_name, | ||
const int32_t | dtype, | ||
const int32_t | dim_size, | ||
const int32_t | bounds | ||
) |
Definition at line 1256 of file scale_file_netcdf.c.
Referenced by scale_file::file_def_axis().
int32_t file_write_axis_c | ( | const int32_t | fid, |
const char * | name, | ||
const void * | val, | ||
const int32_t | precision, | ||
const MPI_Offset * | start, | ||
const MPI_Offset * | count | ||
) |
Definition at line 1321 of file scale_file_netcdf.c.
Referenced by scale_file::file_def_axis().
int32_t file_put_associatedcoordinate_c | ( | const int32_t | fid, |
const char * | name, | ||
const char * | desc, | ||
const char * | units, | ||
const char ** | dim_names, | ||
const int32_t | ndims, | ||
const int32_t | dtype, | ||
const void * | val, | ||
const int32_t | precision | ||
) |
Definition at line 1363 of file scale_file_netcdf.c.
Referenced by scale_file::file_def_axis().
int32_t file_def_associatedcoordinate_c | ( | const int32_t | fid, |
const char * | name, | ||
const char * | desc, | ||
const char * | units, | ||
const char ** | dim_names, | ||
const int32_t | ndims, | ||
const int32_t | dtype | ||
) |
Definition at line 1416 of file scale_file_netcdf.c.
Referenced by scale_file::file_def_associatedcoordinate().
int32_t file_write_associatedcoordinate_c | ( | const int32_t | fid, |
const char * | name, | ||
const void * | val, | ||
const int32_t | precision, | ||
const MPI_Offset * | start, | ||
const MPI_Offset * | count | ||
) |
Definition at line 1466 of file scale_file_netcdf.c.
Referenced by scale_file::file_def_associatedcoordinate().
int32_t file_add_variable_c | ( | const int32_t | fid, |
const char * | varname, | ||
const char * | desc, | ||
const char * | units, | ||
const char * | stdname, | ||
const char ** | dims, | ||
const int32_t | ndims, | ||
const int32_t | dtype, | ||
const real64_t | tint, | ||
const int32_t | tavg, | ||
int32_t * | vid | ||
) |
Definition at line 1508 of file scale_file_netcdf.c.
Referenced by scale_file::file_def_associatedcoordinate(), and scale_file::file_def_variable().
int32_t file_write_data_c | ( | const int32_t | fid, |
const int32_t | vid, | ||
const void * | var, | ||
const real64_t | t_start, | ||
const real64_t | t_end, | ||
const int32_t | precision, | ||
const int32_t | ndims, | ||
const int32_t * | start, | ||
const int32_t * | count | ||
) |
Definition at line 1829 of file scale_file_netcdf.c.
Referenced by scale_file::file_get_stepsize().
int32_t file_enddef_c | ( | const int32_t | fid | ) |
Definition at line 1776 of file scale_file_netcdf.c.
References ALREADY_CLOSED_CODE, and fileinfo_t::ncid.
Referenced by scale_file::file_enddef().
int32_t file_attach_buffer_c | ( | const int32_t | fid, |
const int64_t | buf_amount | ||
) |
Definition at line 1787 of file scale_file_netcdf.c.
References ALREADY_CLOSED_CODE, CHECK_PNC_ERROR, fileinfo_t::ncid, and SUCCESS_CODE.
Referenced by scale_file::file_attach_buffer().
int32_t file_detach_buffer_c | ( | const int32_t | fid | ) |
Definition at line 1801 of file scale_file_netcdf.c.
References ALREADY_CLOSED_CODE, CHECK_PNC_ERROR, fileinfo_t::ncid, and SUCCESS_CODE.
Referenced by scale_file::file_detach_buffer().
int32_t file_flush_c | ( | const int32_t | fid | ) |
Definition at line 1814 of file scale_file_netcdf.c.
References ALREADY_CLOSED_CODE, CHECK_ERROR, CHECK_PNC_ERROR, fileinfo_t::ncid, and SUCCESS_CODE.
Referenced by scale_file::file_flush().
int32_t file_close_c | ( | const int32_t | fid | ) |
Definition at line 1953 of file scale_file_netcdf.c.
References ALREADY_CLOSED_CODE, scale_file::i, and fileinfo_t::ncid.
Referenced by scale_file::file_close().