# now get the forcings that wflow expects
# The bmi is such that you can get the input variables and the output variables. However, the
# input variable list also contains the in/out variables. So to
# get the input only we subtract the two lists.
invars = LA_model.get_input_var_names()
outvars = LA_model.get_output_var_names()
inputmstacks = list(set(invars) - set(outvars))


# In[]: Investigate start time, end time and time step of both models

print "WFlow:"
LA_dt = LA_model.get_time_step()

# LA_start = LA_model.get_start_time()
timeutc = adapter.getStartTimefromRuninfo("inmaps/runinfo.xml")
print timeutc
LA_start = calendar.timegm(timeutc.timetuple())
timeutc = adapter.getEndTimefromRuninfo("inmaps/runinfo.xml")
LA_end = calendar.timegm(timeutc.timetuple())
# LA_end = LA_model.get_end_time()
print LA_dt
print timeutc
print LA_start
print LA_end

print "RTC-Tools"
RTC_dt = RTC_model.get_time_step()
RTC_start = RTC_model.get_start_time()
RTC_end = RTC_model.get_end_time()
Exemple #2
0
    

   
    global pointer
    dw_CreateDwRun(dwdir)


    config = ConfigParser.SafeConfigParser()
    config.optionxform = str
    config.read(caseId + "/" + configfile)
    
    timestepsecs = int(configget(config,"model","timestepsecs",str(timestepsecs)))
    
    if fewsrun: 
        timeSteps =  wflow_adapt.getTimeStepsfromRuninfo(runinfoFile,timestepsecs)
        T0 =  wflow_adapt.getStartTimefromRuninfo(runinfoFile)
        print timeSteps
    
    #: we need one delwaq calculation timesteps less than hydrology
    # timeSteps = timeSteps # need one more hydrological timestep as dw timestep
    firstTimeStep = 0
        
        
    logger = pcrut.setlogger(dwdir + "/debug/wflow_delwaq.log","wflow_delwaq") 
    #caseid = "default_hbv"
    logger.info("T0 of run: " + str(T0))
    boundids = len(sourcesMap)  # extra number of exchnages for all bounds

    #Number of exchnages is elements minus number of outflows!!  
    
    # Get subcatchment data
Exemple #3
0
        if o == '-O': T0 = datetime.strptime(a, '%Y-%m-%d %H:%M:%S')

    global pointer
    dw_CreateDwRun(dwdir)

    config = ConfigParser.SafeConfigParser()
    config.optionxform = str
    config.read(caseId + "/" + configfile)

    timestepsecs = int(
        configget(config, "model", "timestepsecs", str(timestepsecs)))

    if fewsrun:
        timeSteps = wflow_adapt.getTimeStepsfromRuninfo(
            runinfoFile, timestepsecs)
        T0 = wflow_adapt.getStartTimefromRuninfo(runinfoFile)
        print timeSteps

    #: we need one delwaq calculation timesteps less than hydrology
    # timeSteps = timeSteps # need one more hydrological timestep as dw timestep
    firstTimeStep = 0

    logger = pcrut.setlogger(dwdir + "/debug/wflow_delwaq.log", "wflow_delwaq")
    #caseid = "default_hbv"
    logger.info("T0 of run: " + str(T0))
    boundids = len(sourcesMap)  # extra number of exchnages for all bounds

    #Number of exchnages is elements minus number of outflows!!

    # Get subcatchment data
    logger.info("Reading basemaps")
Exemple #4
0
# now get the forcings that wflow expects
# The bmi is such that you can get the input variables and the output variables. However, the
# input variable list also contains the in/out variables. So to
# get the input only we subtract the two lists.
invars = LA_model.get_input_var_names()
outvars = LA_model.get_output_var_names()
inputmstacks = list(set(invars) - set(outvars))


# In[]: Investigate start time, end time and time step of both models

print("WFlow:")
LA_dt = LA_model.get_time_step()

# LA_start = LA_model.get_start_time()
timeutc = adapter.getStartTimefromRuninfo("inmaps/runinfo.xml")
print(timeutc)
LA_start = calendar.timegm(timeutc.timetuple())
timeutc = adapter.getEndTimefromRuninfo("inmaps/runinfo.xml")
LA_end = calendar.timegm(timeutc.timetuple())
# LA_end = LA_model.get_end_time()
print(LA_dt)
print(timeutc)
print(LA_start)
print(LA_end)

print("RTC-Tools")
RTC_dt = RTC_model.get_time_step()
RTC_start = RTC_model.get_start_time()
RTC_end = RTC_model.get_end_time()