Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

scrollbar

We start by creating a line geometry using the cell centers.

Code Block
languagepy
titleSet intial confitions
 lineGeometrycoordinates = mf.CreateLineGeometry([cell.Center.X, cell.Center.Y] for cell in fmModel.Grid.Cells)
Code Block
languagepy
titleSet intial confitions
initialConditions = wps.GetTidalPredictForTime(startTime, lineGeometry, EPSGCode)



fmModel.InitialWaterLevels.SetValues(initialConditions)

 

 
Code Block
languagepy
titleSet dtMax and dtInitial
# set model max and initial timestep size
timeStep = timedelta(hours=1)

SetModelProperty(fmModel, KnownProperties.DtMax, str(timeStep.total_seconds()))
SetModelProperty(fmModel, KnownProperties.DtInit, str(timeStep.total_seconds()))
Code Block
languagepy
titleSet model times
# set model times
SetModelTimes(fmModel, startTime, endTime, time(6,0,0))

 

scrollbar