Changeset 4289 for TOOLS/CPLRESTART/FillOceRestart.py
- Timestamp:
- 02/22/19 14:16:18 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/CPLRESTART/FillOceRestart.py
r4249 r4289 50 50 -o <file> | --output=<file> : output file (default : build a name form input file) 51 51 -r | --replace : replace input file by new file with filled variables 52 -v <varlist> | --variable=<variables> : list of variable to fill (defau tlt: all variable in file)52 -v <varlist> | --variable=<variables> : list of variable to fill (default: all variable in file) 53 53 -x | --exclude : fills all variable in files, except those given in -v|--variable 54 54 -n <perio> | --perio=<perio> : periodicity type (default: try to guess) … … 92 92 sys.exit(1) 93 93 else : 94 if Debug : print ("Out file set to "+OuFile)95 94 OuFile = myval ; 95 if Debug : print ("Out file set to " + OuFile) 96 96 elif myopt in [ '-r', '--replace' ] : 97 97 if OuFile != None : … … 111 111 ListExclude = ListVarName 112 112 ListVarName = None 113 113 114 114 if OuFile == None : 115 print ( 'Definition OuFile' ) 115 116 OuFile = InFile.replace ( ".nc", "_filled.nc" ) 116 print ("Creates output file name: " +OuFile)117 print ("Creates output file name: " + OuFile) 117 118 118 119 # Copy the input file if needed … … 131 132 print ("Grid dimensions: ("+str(jpoj)+", "+str(jpoi)+")") 132 133 if 'ORCA2' in InFile : 134 nperio=4 133 135 print ("ORCA 2 grid found from file name: nperio may vary for this configuration") 134 print ("Choosen nperio= 4")136 print ("Choosen nperio=" + str(nperio) ) 135 137 elif 'ORCA1' in InFile : 136 if 'eORCA1' in InFile : 137 print ("eORCA 1 grid found from file name, nperio=6") 138 if 'eORCA1' in InFile : 139 nperio=6 140 print ("eORCA 1 grid found from file name, nperio=" + str(nperio)) 138 141 else : 139 print ("ORCA 1 grid found from file name, nperio=6") 142 nperio=6 143 print ("ORCA 1 grid found from file name, nperio=" + str(nperio)) 140 144 elif (jpoj, jpoi) == (149, 182) : 145 nperio = 4 141 146 print ("ORCA 2 grid found from dimension: nperio may vary for this configuration") 142 print ("Choosen nperio=4") 143 nperio = 4 147 print ("Choosen nperio=" + str(nperio)) 144 148 elif (jpoj, jpoi) == (332, 292) : 145 149 nperio = 6 146 print ("ORCA1 grid found from dimensions, nperio =6")150 print ("ORCA1 grid found from dimensions, nperio" + str(nperio) ) 147 151 elif (jpoj, jpoi) == (332, 362) : 148 152 nperio = 6 149 print ("eORCA1 grid found from dimensions, nperio =6")153 print ("eORCA1 grid found from dimensions, nperio" + str(nperio) ) 150 154 elif (jpoj, jpoi) == (1021, 1442) : 151 nperio = 4152 print ("ORCA025 grid found from dimensions, nperio =6")155 nperio = 6 156 print ("ORCA025 grid found from dimensions, nperio" + str(nperio) ) 153 157 elif (jpoj, jpoi) == (1207, 1442) : 154 nperio = 4155 print ("eORCA025 grid found from dimensions, nperio= 6")158 nperio = 6 159 print ("eORCA025 grid found from dimensions, nperio=" + str(nperio) ) 156 160 157 161 if nperio == None :
Note: See TracChangeset
for help on using the changeset viewer.