# Steps for data checker
## 1. File format
Free text: grib1, grib2, netcdf3, netcdf4, csv, txt, zip, shape files...
```
$ python checker.py --test file_format --input <folder or file>
```
**Result** is a list of strings belonging to "grib, grib2, netcdf3, netcdf3 64 bit offset, ..."<br>
___
## 2. Standards for the dataset type (e.g. CDS common data model, CF convention,..)
Free text: cf conventions, cmor/cmip5, reanalysis grib standard, seasonal grib, seasonal netcdf (C3S512),  seasonal grib standard <br><br>
Not the **Result** of a checker but write what standard each dataset type follows
___
## 3. Compliance of files with standards for the dataset type (e.g. CDS common data model, CF convention,..)
Free text: result of the checker
```
$ python checker.py --test standard_compliance --type <grib, CF, ...> --input <folder or file>
```
**Result** is a free text saying yes or no and why
___
## 4. Spatial and temporal completeness of dataset
Free text (describe concisely if there are any areas or time intervals where dataset does not cover, i.e. gaps or jumps in spatial and temporal coverage of dataset) and/or link to graphs/tables/CDS documents showing spatio-temporal coverage gaps or completeness of dataset
```
$ checker.py --test spatial_completeness --grid <r256x128, 1grado> --input <folder or file>
$ checker.py --test temporal_completeness --temporal_range <1979-01-01/2019-05-01> --input <folder or file>
```
**Result** is: yes or no. If no: gap or error at this date<br><br>
**grib:** cdo showtimestamp of all files and compare with list of dates generated with python datetime<br><br>
**spatial:** cdo griddes and compare with reference.
___
## 5 .Temporal and Spatial consistency
Free text (describe concisely if product values and their spatial and temporal variability are in a physically reasonable range or outliers are present) and/or link to graphs/tables/CDS documents showing consistency of dataset<br><br>
```
$ checker.py --test spatial_consistency --space_interval <1 degree> --input <folder or file>
$ checker.py --test temporal_consistency --time_interval <6hourly, daily, monthly> --input <folder or file>
```
**Result:** free text saying yes or no and why (data is supposed to be 6hourly and is actually monthly)<br><br>
**spatial:** parse griddes<br>
**temporal:** netcdf: use nctime (nctxck) for netcdf cmip5, for grib compare list of dates with what is read with generated with datetime
## 6. Valid ranges
Free text describing if the values of the data is within predefined ranges<br><br>
```
$ checker.py --test valid_ranges --var t2m --input <folder or file>
```
**Result** is free text yes or no, name variable, expected range, real range
