1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251
|
Description: Support for Python3
Author: Alastair McKinstry <mckinstry@debian.org>
Last-Updated: 2019-04-23
Forwarded: no
Index: magics++-4.8.0/tools/magicsCompatibilityChecker
===================================================================
--- magics++-4.8.0.orig/tools/magicsCompatibilityChecker
+++ magics++-4.8.0/tools/magicsCompatibilityChecker
@@ -35,146 +35,146 @@ def grep(f):
if "PSETC" in l:
if "AXIS_POSITION" in l:
if "POSITIONAL" in l:
- print "line ",lno,"> INFO: default value POSITIONAL is replace with AUTOMATIC"
- print ""
+ print ("line ",lno,"> INFO: default value POSITIONAL is replace with AUTOMATIC")
+ print ("")
elif "AXIS_TICK_POSITIONING" in l:
- print "line ",lno,"> INFO: Parameter AXIS_TICK_POSITIONING was undocumented feature of MAGICS6"
- print ""
+ print ("line ",lno,"> INFO: Parameter AXIS_TICK_POSITIONING was undocumented feature of MAGICS6")
+ print ("")
elif "SUBPAGE_MAP_PROJECTION" in l:
if "NONE" in l:
- print "line ",lno,"> WARNING: You need to set SUBPAGE_MAP_PROJECTION to CARTESIAN for graph plotting."
- print ""
+ print ("line ",lno,"> WARNING: You need to set SUBPAGE_MAP_PROJECTION to CARTESIAN for graph plotting.")
+ print ("")
elif "PS_DEVICE" in l:
- print "line ",lno,"> INFO: Please replace setting of PS_DEVICE by setting 'output_format' to 'ps'"
- print ""
+ print ("line ",lno,"> INFO: Please replace setting of PS_DEVICE by setting 'output_format' to 'ps'")
+ print ("")
elif "PS_FILE_NAME" in l:
- print "line ",lno,"> INFO: Please change PS_FILE_NAME to OUTPUT_NAME or OUTPUT_FULLNAME"
- print ""
+ print ("line ",lno,"> INFO: Please change PS_FILE_NAME to OUTPUT_NAME or OUTPUT_FULLNAME")
+ print ("")
elif "PS_METRIC" in l:
- print "line ",lno,"> INFO: Parameter PS_METRIC is not used anymore"
- print ""
+ print ("line ",lno,"> INFO: Parameter PS_METRIC is not used anymore")
+ print ("")
elif "TEXT_QUALITY" in l:
- print "line ",lno,"> INFO: Please set instead of TEXT_QUALITY the new parameters TEXT_FONT and TEXT_FONT_STYLE"
- print ""
+ print ("line ",lno,"> INFO: Please set instead of TEXT_QUALITY the new parameters TEXT_FONT and TEXT_FONT_STYLE")
+ print ("")
elif "PAGE_ID_LINE_QUALITY" in l:
- print "line ",lno,"> INFO: Please set instead of PAGE_ID_LINE_QUALITY the new parameters PAGE_ID_LINE_FONT and PAGE_ID_LINE_FONT_STYLE"
- print ""
+ print ("line ",lno,"> INFO: Please set instead of PAGE_ID_LINE_QUALITY the new parameters PAGE_ID_LINE_FONT and PAGE_ID_LINE_FONT_STYLE")
+ print ("")
elif "CONTOUR_LABEL_QUALITY" in l:
- print "line ",lno,"> INFO: Please set instead of CONTOUR_LABEL_QUALITY the new parameters CONTOUR_LABEL_FONT and CONTOUR_LABEL_FONT_STYLE"
- print ""
+ print ("line ",lno,"> INFO: Please set instead of CONTOUR_LABEL_QUALITY the new parameters CONTOUR_LABEL_FONT and CONTOUR_LABEL_FONT_STYLE")
+ print ("")
elif "TEXT_JUSTIFICATION" in l:
if "TYPESET" in l:
- print "line ",lno,"> ERROR: value TYPESET is not allowed anymore for TEXT_JUSTIFICATION"
- print ""
+ print ("line ",lno,"> ERROR: value TYPESET is not allowed anymore for TEXT_JUSTIFICATION")
+ print ("")
elif "GRAPH_SYMBOL" in l:
if "SYMBOLS_ONLY" in l:
- print "line ",lno,"> ERROR: value SYMBOLS_ONLY is not allowed anymore - please set GRAPH_SYMBOL to ON and"
- print "line ",lno,"> ERROR: set GRAPH_LINE_THICKNESS to 0"
- print ""
+ print ("line ",lno,"> ERROR: value SYMBOLS_ONLY is not allowed anymore - please set GRAPH_SYMBOL to ON and")
+ print ("line ",lno,"> ERROR: set GRAPH_LINE_THICKNESS to 0")
+ print ("")
elif "CONTOUR_METHOD" in l and "CONICON" in l:
- print "line ",lno,"> INFO: Setting CONICON has no effect anymore. Default contouring used."
- print ""
+ print ("line ",lno,"> INFO: Setting CONICON has no effect anymore. Default contouring used.")
+ print ("")
elif "CONTOUR_LINE_PLOTTING" in l:
- print "line ",lno,"> ERROR: Setting CONTOUR_LINE_PLOTTING has no effect anymore."
- print "line ",lno,"> This is also true for all parameters starting CONTOUR_ABOVE_ and CONTOUR_BELOW_."
- print "line ",lno,"> Please split your contouring or ask Graphics."
- print ""
+ print ("line ",lno,"> ERROR: Setting CONTOUR_LINE_PLOTTING has no effect anymore.")
+ print ("line ",lno,"> This is also true for all parameters starting CONTOUR_ABOVE_ and CONTOUR_BELOW_.")
+ print ("line ",lno,"> Please split your contouring or ask Graphics.")
+ print ("")
elif "GRIB_MODE" in l:
- print "line ",lno,"> INFO: Please remove GRIB_MODE! It has no effect anymore!"
- print ""
+ print ("line ",lno,"> INFO: Please remove GRIB_MODE! It has no effect anymore!")
+ print ("")
elif "GRIB_INPUT_TYPE" in l:
if "ARRAY" in l:
- print "line ",lno,"> ERROR: Please remove GRIB_INPUT_TYPE! GRIB is now only read from files!"
- print "line ",lno,"> ERROR: The input through 'ARRAY' is NOT supported anymore!"
- print "line ",lno,"> ERROR: ",s
+ print ("line ",lno,"> ERROR: Please remove GRIB_INPUT_TYPE! GRIB is now only read from files!")
+ print ("line ",lno,"> ERROR: The input through 'ARRAY' is NOT supported anymore!")
+ print ("line ",lno,"> ERROR: ",s)
else:
- print "line ",lno,"> INFO: You can remove GRIB_INPUT_TYPE! This parameter is ignored - GRIB is now only read from files!"
- print "line ",lno,"> INFO: ",s
+ print ("line ",lno,"> INFO: You can remove GRIB_INPUT_TYPE! This parameter is ignored - GRIB is now only read from files!")
+ print ("line ",lno,"> INFO: ",s)
elif "GRIB_ACTION" in l:
- print "line ",lno,"> ERROR: Please remove GRIB_ACTION!"
+ print ("line ",lno,"> ERROR: Please remove GRIB_ACTION!")
grib_decoding+=1
errors+=1
print ""
elif "GRIB_SUBAREA_EXT" in l:
- print "line ",lno,"> INFO: Please remove GRIB_SUBAREA_EXTRACTION. It has NO effect anymore."
- print ""
+ print ("line ",lno,"> INFO: Please remove GRIB_SUBAREA_EXTRACTION. It has NO effect anymore.")
+ print ("")
elif "GRIB_TABLE2_ADD" in l:
- print "line ",lno,"> INFO: Please remove GRIB_TABLE2_ADDRESS_MODE. It has NO effect anymore."
- print ""
+ print ("line ",lno,"> INFO: Please remove GRIB_TABLE2_ADDRESS_MODE. It has NO effect anymore.")
+ print ("")
elif "WIND_ARROW_LEGEND" in l:
- print "line ",lno,"> INFO: Please note WIND_ARROW_LEGEND is deprecated and LEGEND should be set instead."
- print ""
+ print ("line ",lno,"> INFO: Please note WIND_ARROW_LEGEND is deprecated and LEGEND should be set instead.")
+ print ("")
if "PSETR" in l:
if "GRIB_SPECTRAL_RESOLUTION" in l:
- print "line ",lno,"> ERROR: Please remove GRIB_SPECTRAL_RESOLUTION. Magics++ does NOT handle spectral fields!!!"
+ print ("line ",lno,"> ERROR: Please remove GRIB_SPECTRAL_RESOLUTION. Magics++ does NOT handle spectral fields!!!")
grib_decoding+=1
errors+=1
- print ""
+ print ("")
elif "TEXT_REFERENCE_CHARACTER_HEIGHT" in l:
- print "line ",lno,"> INFO: Please set instead of TEXT_REFERENCE_CHARACTER_HEIGHT the new parameters TEXT_FONT_SIZE"
- print ""
+ print ("line ",lno,"> INFO: Please set instead of TEXT_REFERENCE_CHARACTER_HEIGHT the new parameters TEXT_FONT_SIZE")
+ print ("")
elif "AXIS_BASE_DATE" in l:
- print "line ",lno,"> INFO: The parameter AXIS_BASE_DATE was an undocumendted feature of MAGICS6."
- print "line ",lno,"> INFO: Please make sure that you set your date axis explicit and define dates as strings."
- print ""
+ print ("line ",lno,"> INFO: The parameter AXIS_BASE_DATE was an undocumendted feature of MAGICS6.")
+ print ("line ",lno,"> INFO: Please make sure that you set your date axis explicit and define dates as strings.")
+ print ("")
if "PSETI" in l:
if "GRAPH_SMOOTHING_FACTOR" in l:
- print "line ",lno,"> INFO: Please remove GRAPH_SMOOTHING_FACTOR. It was decided Magics should NOT smooth graphs."
- print ""
+ print ("line ",lno,"> INFO: Please remove GRAPH_SMOOTHING_FACTOR. It was decided Magics should NOT smooth graphs.")
+ print ("")
if "PSET1I" in l:
if "GRIB_PRODUCT_BLOCK" in l or "GRIB_GRID_BLOCK" in l or "GRIB_OUTPUT_IMAGE" in l:
- print "line ",lno,"> ERROR: Please remove lines with GRIB_PRODUCT_BLOCK, GRIB_GRID_BLOCK or GRIB_OUTPUT_IMAGE"
+ print ("line ",lno,"> ERROR: Please remove lines with GRIB_PRODUCT_BLOCK, GRIB_GRID_BLOCK or GRIB_OUTPUT_IMAGE")
grib_decoding+=1
errors+=1
- print ""
+ print ("")
if "PSET1R" in l:
if "GRIB_OUTPUT_FIELD" in l:
- print "line ",lno,"> ERROR: Magics++ does NOT support the saving of Grib arrays - please use GRIB_API"
- print "line ",lno,"> Please remove lines with GRIB_OUTPUT_FIELD or GRIB_OUTPUT_FIELD_2"
+ print ("line ",lno,"> ERROR: Magics++ does NOT support the saving of Grib arrays - please use GRIB_API")
+ print ("line ",lno,"> Please remove lines with GRIB_OUTPUT_FIELD or GRIB_OUTPUT_FIELD_2")
grib_decoding+=1
errors+=1
- print ""
+ print ("")
elif "PPIE" in l:
- print "line ",lno,"> ERROR: A possible use of Pie charts? << NOT supported in Magics++"
- print "line ",lno,"> ERROR: ",s
- print ""
+ print ("line ",lno,"> ERROR: A possible use of Pie charts? << NOT supported in Magics++")
+ print ("line ",lno,"> ERROR: ",s)
+ print ("")
errors+=1
elif "PACT" in l:
- print "line ",lno,"> ERROR: A possible use of specification groups? << NOT supported in Magics++"
- print "line ",lno,"> ERROR: ",s
- print ""
+ print ("line ",lno,"> ERROR: A possible use of specification groups? << NOT supported in Magics++")
+ print ("line ",lno,"> ERROR: ",s)
+ print ("")
errors+=1
elif "PAPROJ" in l:
- print "line ",lno,"> ERROR: Internal function of MAGICS6 - undocumented feature << NOT supported in Magics++"
- print "line ",lno,"> ERROR: ",s
- print ""
+ print ("line ",lno,"> ERROR: Internal function of MAGICS6 - undocumented feature << NOT supported in Magics++")
+ print ("line ",lno,"> ERROR: ",s)
+ print ("")
errors+=1
if grib_decoding > 0:
- print "ERROR: The program used MAGICS 6 to decode GRIB files. This is NOT supported in Magics++!"
- print " Please use Grib_API directly for this!\n"
+ print ("ERROR: The program used MAGICS 6 to decode GRIB files. This is NOT supported in Magics++!")
+ print (" Please use Grib_API directly for this!\n")
if errors > 0:
- print "ERROR: Your program will in the current form NOT run with Magics++!"
- print " Please contact MetVis (magics@ecmwf.int) for more help."
- print " Please copy the output of this script to your email.\n"
+ print ("ERROR: Your program will in the current form NOT run with Magics++!")
+ print (" Please contact MetVis (magics@ecmwf.int) for more help.")
+ print (" Please copy the output of this script to your email.\n")
def main(argv):
if len(sys.argv) <= 1:
- print "You need to give more options ... "
+ print ("You need to give more options ... ")
return 1
f = open(sys.argv[1])
- print "****************************************\nNOTE: This script is given as a guiding help, but\ndoes not guarantee to find all migration issues!\n"
- print "Checking ",sys.argv[1]," ...\n****************************************"
+ print ("****************************************\nNOTE: This script is given as a guiding help, but\ndoes not guarantee to find all migration issues!\n")
+ print ("Checking ",sys.argv[1]," ...\n****************************************")
return grep(f)
f.close()
Index: magics++-4.8.0/tools/mapgen_clip
===================================================================
--- magics++-4.8.0.orig/tools/mapgen_clip
+++ magics++-4.8.0/tools/mapgen_clip
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2007 European Centre for Medium-Range Weather Forecasts (ECMWF)
#
@@ -20,8 +20,8 @@
import sys
if len(sys.argv) < 6:
- print "Not enough parameters!"
- print "mapgen_clip in.mapgen out.mapgen lon_min lon_max lat_min lat_max"
+ print ("Not enough parameters!")
+ print ("mapgen_clip in.mapgen out.mapgen lon_min lon_max lat_min lat_max")
sys.exit()
lon_min = float(sys.argv[3])
|