def check_crs(self, dataset):
grid_mapping = util.get_crs_variable(dataset)<EOL>if grid_mapping is None:<EOL><INDENT>return Result(<EOL>BaseCheck.MEDIUM,<EOL>False,<EOL>'<STR_LIT>',<EOL>['<STR_LIT>']<EOL>)<EOL><DEDENT>crs_variable = dataset.variables[grid_mapping]<EOL>test_ctx = TestCtx(BaseCheck.MEDIUM, '<STR_LIT>'.format(crs_variable.name))<EOL>test_ctx.assert_true(crs_variable is not None, '<STR_LIT>')<EOL>epsg_code = getattr(crs_variable, '<STR_LIT>', '<STR_LIT>')<EOL>semi_major_axis = getattr(crs_variable, '<STR_LIT>', None)<EOL>inverse_flattening = getattr(crs_variable, '<STR_LIT>', None)<EOL>test_ctx.assert_true(epsg_code != '<STR_LIT>',<EOL>'<STR_LIT>'.format(epsg_code))<EOL>test_ctx.assert_true(semi_major_axis is not None,<EOL>'<STR_LIT>'.format(epsg_code))<EOL>test_ctx.assert_true(inverse_flattening is not None,<EOL>'<STR_LIT>'.format(epsg_code))<EOL>return test_ctx.to_result()<EOL>
int crs; //.......................................................... RECOMMENDED - A container variable storing information about the grid_mapping. All the attributes within a grid_mapping variable are described in http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.6/cf-conventions.html#appendix-grid-mappings. For all the measurements based on WSG84, the default coordinate system used for GPS measurements, the values shown here should be used.
        crs:grid_mapping_name = "latitude_longitude"; //............. RECOMMENDED
        crs:epsg_code = "EPSG:4326" ; //............................. RECOMMENDED - European Petroleum Survey Group code for the grid mapping name.
        crs:semi_major_axis = 6378137.0 ; //......................... RECOMMENDED
        crs:inverse_flattening = 298.257223563 ; //.................. RECOMMENDED