Open Gauravfouzdar opened 5 days ago
this is not helful as it shift both time
"from mil.army.usace.hec.vortex.math import Shifter from mil.army.usace.hec.vortex.io import DataReader
from java.time import Duration
inDSS = r'C:\in.dss' outDSS = r'C:\out.dss'
shiftby = Duration.ofMinutes(30)
sourceGrids = DataReader.getVariables(inDSS)
write_opts = { 'partA': 'A_part', 'partC': 'PRECIPITATION', 'dataType': 'PER-CUM', 'units': 'MM' }
shifty = Shifter.Builder()\ .pathToFile(inDSS)\ .grids(sourceGrids)\ .destination(outDSS)\ .shift(shiftby)\ .writeOptions(write_opts)\ .build()
shifty.shift()"
Shift start:
Shifter shifter = Shifter.builder()
.shift(Duration.ofHours(-6))
.methods(Set.of(TimeShiftMethod.START))
.pathToFile(in)
.grids(variables)
.destination(out)
.build();
Shift end:
Shifter shifter = Shifter.builder()
.shift(Duration.ofHours(-6))
.methods(Set.of(TimeShiftMethod.END))
.pathToFile(in)
.grids(variables)
.destination(out)
.build();
Shift start and end:
Shifter shifter = Shifter.builder()
.shift(Duration.ofHours(-6))
.methods(Set.of(TimeShiftMethod.START, TimeShiftMethod.END))
.pathToFile(in)
.grids(variables)
.destination(out)
.build();
or
Shifter shifter = Shifter.builder()
.shift(Duration.ofHours(-6))
.pathToFile(in)
.grids(variables)
.destination(out)
.build();
in this part, if i have to change projection to UTM 44N , how to do that "geo_options = {{ 'pathToShp': clip_shp, 'targetCellSize': '2000', 'targetWkt': WktFactory.shg(),###### 'resamplingMethod': 'Bilinear' }}
'targetWkt': WktFactory.create("UTM44N");
Example of a time shifter python file like this for the latest version where it will have start time and end time ?