eccodes/definitions/grib2/template.3.scanning_mode.def

46 lines
1.8 KiB
Modula-2
Raw Normal View History

2017-01-03 11:03:48 +00:00
# Copyright 2005-2017 ECMWF.
2013-03-25 12:04:10 +00:00
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
flags[1] scanningMode 'grib2/tables/[tablesVersion]/3.4.table' : edition_specific,no_copy ;
2014-03-19 16:13:54 +00:00
# Note our flagbit numbers go from 7 to 0, while WMO convention is from 1 to 8
flagbit iScansNegatively(scanningMode,7) : dump; # WMO bit 1
flagbit jScansPositively(scanningMode,6) : dump; # WMO bit 2
2013-03-25 12:04:10 +00:00
flagbit jPointsAreConsecutive(scanningMode,5) : dump;
flagbit alternativeRowScanning(scanningMode,4) = 0 : edition_specific,dump;
if (jPointsAreConsecutive) {
alias numberOfRows=Ni;
2013-07-23 17:06:45 +00:00
alias numberOfColumns=Nj;
2013-03-25 12:04:10 +00:00
} else {
alias numberOfRows=Nj;
alias numberOfColumns=Ni;
}
alias geography.iScansNegatively=iScansNegatively;
alias geography.jScansPositively=jScansPositively;
alias geography.jPointsAreConsecutive=jPointsAreConsecutive;
transient iScansPositively = !iScansNegatively : constraint;
flagbit scanningMode5(scanningMode,3) = 0: read_only;
flagbit scanningMode6(scanningMode,2) = 0: read_only;
flagbit scanningMode7(scanningMode,1) = 0: read_only;
flagbit scanningMode8(scanningMode,0) = 0: read_only;
meta swapScanningX change_scanning_direction( values,Ni,Nj,
iScansNegatively,jScansPositively,
xFirst,xLast,x) : edition_specific,hidden,no_copy;
alias swapScanningLon = swapScanningX;
meta swapScanningY change_scanning_direction( values,Ni,Nj,
iScansNegatively,jScansPositively,
yFirst,yLast,y) : edition_specific,hidden,no_copy;
alias swapScanningLat = swapScanningY;