This development avoids the warning coming from CDO: Warning (find_time_vars): Time variable >time< not found!
The method is to add time metadata in the temporary netCDF file, so when cdo -s ...
runs, cdo can find time metadata in the file. The value of time metadata is random since CDORemap() doesn't support time regridding for now, so the value is not important.
There are still some warnings not being solved, e.g., Warning (cdfScanVarAttr): NetCDF: Variable not found - lat_bnds
or Warning (cdfScanVarAttr): NetCDF: Variable not found - bounds_nav_lat
. It is because those files have certain metadata that has specific items detected by CDO, but there are no corresponding variables in the file. Take the following data as an example. The longitude variable has $bounds
then cdo searches for the lon_bnds
variable in the temporary netCDF file.
# longitude attributes
num [1:512(1d)] 0 0.703 1.406 2.109 2.812 ...
- attr(*, "variables")=List of 1
..$ lon:List of 7
.. ..$ ndims : num 1
.. ..$ size : int 512
.. ..$ units : chr "degrees_east"
.. ..$ bounds : chr "lon_bnds"
.. ..$ axis : chr "X"
.. ..$ long_name : chr "Longitude"
.. ..$ standard_name: chr "longitude"
- attr(*, "tzone")= chr "UTC"
Since these warnings don't affect the functionality and I don't have a full picture (e.g., which variables will be detected by CDO; what variation does the netCDF files have; etc.), we keep these warnings remaining for now.
It solves the issue in startR startR#133 (closed)