mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-17 16:50:18 +08:00
now remember whether coords att has been read for a var
This commit is contained in:
parent
6e3d284fcc
commit
7249350c3f
@ -178,4 +178,7 @@ int nc4_hdf5_find_grp_var_att(int ncid, int varid, const char *name, int attnum,
|
||||
int nc4_hdf5_find_grp_h5_var(int ncid, int varid, NC_FILE_INFO_T **h5,
|
||||
NC_GRP_INFO_T **grp, NC_VAR_INFO_T **var);
|
||||
|
||||
/* Perform lazy read of the rest of the metadata for a var. */
|
||||
int nc4_get_var_meta(NC_VAR_INFO_T *var);
|
||||
|
||||
#endif /* _HDF5INTERNAL_ */
|
||||
|
@ -155,6 +155,7 @@ typedef struct NC_VAR_INFO
|
||||
struct NC_TYPE_INFO *type_info;
|
||||
int atts_not_read; /* If true, the atts have not yet been read. */
|
||||
nc_bool_t meta_read; /* True if this vars metadata has been completely read. */
|
||||
nc_bool_t coords_read; /* True if this var has hidden coordinates att, and it has been read. */
|
||||
NCindex *att; /* NCindex<NC_ATT_INFO_T*> */
|
||||
nc_bool_t no_fill; /* True if no fill value is defined for var */
|
||||
void *fill_value;
|
||||
|
@ -300,6 +300,9 @@ read_coord_dimids(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var)
|
||||
for (d = 0; d < var->ndims; d++)
|
||||
nc4_find_dim(grp, var->dimids[d], &var->dim[d], NULL);
|
||||
|
||||
/* Remember that we have read the coordinates hidden attribute. */
|
||||
var->coords_read = NC_TRUE;
|
||||
|
||||
exit:
|
||||
if (spaceid >= 0 && H5Sclose(spaceid) < 0)
|
||||
BAIL2(NC_EHDFERR);
|
||||
|
Loading…
Reference in New Issue
Block a user