E3SM-Project / E3SM-Project/scorpio
checking if a variable is a record variable when using PnetCDF option
Open
enhancement
- Dominant language
- C++
- Stars
- 22
- Forks
- 20
- Avg merge
- 12d 19m
- Merged PRs (30d)
- 1
Description
For PnetCDF, checking whether a variable is a record variable can just check the
first dimension, because CDF-1,2,5 formats allow only the first dimension to be
unlimited.
https://github.com/E3SM-Project/scorpio/blob/ac679a546c2345e1b94e0fbb54d06115b91e792c/src/clib/pio_nc.c#L1353-L1365
The above code block can be simplified to the following.
```c
int *p = (dimidsp) ? dimidsp : tmp_dimidsp;
file->varlist[varid].rec_var = (ndims > 0 && p[0] == NC_UNLIMITED) ? 1 : 0;
````
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.