2023-11-22 10:51:00 +00:00
|
|
|
constant isGridded = true;
|
2023-08-03 15:54:49 +00:00
|
|
|
|
2023-08-16 11:59:02 +00:00
|
|
|
# Scanning mode
|
2013-03-25 12:04:10 +00:00
|
|
|
flags[1] scanningMode 'grib1/8.table' : edition_specific,no_copy;
|
|
|
|
|
|
|
|
# Not flagbit numbers 7 to 0, while wmo is 1 to 8
|
|
|
|
flagbit iScansNegatively(scanningMode,7) : dump;
|
|
|
|
flagbit jScansPositively(scanningMode,6) : dump;
|
|
|
|
flagbit jPointsAreConsecutive(scanningMode,5) : dump;
|
|
|
|
constant alternativeRowScanning=0 : dump;
|
2022-12-06 22:02:07 +00:00
|
|
|
|
2013-03-25 12:04:10 +00:00
|
|
|
transient iScansPositively = !iScansNegatively : constraint;
|
2022-12-06 22:02:07 +00:00
|
|
|
transient jScansNegatively = !jScansPositively : constraint;
|
2013-03-25 12:04:10 +00:00
|
|
|
|
|
|
|
alias geography.iScansNegatively=iScansNegatively;
|
|
|
|
alias geography.jScansPositively=jScansPositively;
|
|
|
|
alias geography.jPointsAreConsecutive=jPointsAreConsecutive;
|
|
|
|
|
|
|
|
flagbit scanningMode4(scanningMode,4) = 0: read_only;
|
|
|
|
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;
|
|
|
|
|
2022-03-29 20:20:23 +00:00
|
|
|
transient swapScanningAlternativeRows = 0; # Not available in grib1
|
|
|
|
|
2013-03-25 12:04:10 +00:00
|
|
|
if (jPointsAreConsecutive) {
|
2021-12-20 17:28:26 +00:00
|
|
|
alias numberOfRows=Ni;
|
|
|
|
alias numberOfColumns=Nj;
|
2013-03-25 12:04:10 +00:00
|
|
|
} else {
|
2021-12-20 17:28:26 +00:00
|
|
|
alias numberOfRows=Nj;
|
|
|
|
alias numberOfColumns=Ni;
|
2013-03-25 12:04:10 +00:00
|
|
|
}
|