Skip to content

Commit

Permalink
Merge pull request #22 from sfinkens/cf-compliance
Browse files Browse the repository at this point in the history
Make netCDF files CF-1.8 compliant
  • Loading branch information
sfinkens authored Aug 13, 2020
2 parents 9dae8bb + 127beac commit 9deca13
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion etc/pygac-fdr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ global_attrs:
processing_level: 1C
processing_mode: R
disposition_mode: O
Conventions: CF-1.9 ACDD-1.3
Conventions: CF-1.8 ACDD-1.3
keywords_vocabulary: GCMD Science Keywords, Version 9.1
standard_name_vocabulary: CF Standard Name Table v73
licence: EUMETSAT data policy https://www.eumetsat.int/website/home/AboutUs/WhoWeAre/LegalFramework/DataPolicy/index.html
Expand Down
5 changes: 3 additions & 2 deletions pygac_fdr/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ class QualityFlags(IntEnum):
'long_name': 'Global quality flag',
'comment': 'If this flag is everything else than "ok", it is recommended not '
'to use the file.',
'flag_values': [flag.value for flag in QualityFlags.__members__.values()],
'flag_meanings': [name.lower() for name in QualityFlags.__members__.keys()],
'flag_values': np.array([flag.value for flag in QualityFlags.__members__.values()],
dtype=np.uint8),
'flag_meanings': ' '.join([name.lower() for name in QualityFlags.__members__.keys()]),
'dtype': np.uint8,
'fill_value': None}
]
Expand Down
3 changes: 2 additions & 1 deletion pygac_fdr/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@
'qual_flags': {'dtype': 'int16',
'_FillValue': FILL_VALUE_INT16,
'zlib': True,
'complevel': 4}
'complevel': 4},
'num_flags': {'dtype': '<S50'}
} # refers to renamed datasets
METOP_PRE_LAUNCH_NUMBERS = {'a': 2, 'b': 1, 'c': 3}

Expand Down

0 comments on commit 9deca13

Please sign in to comment.