Source code for pycif.plugins.models.TM5.ini_periods
import datetime
import numpy as np
import pandas as pd
from ....utils.dates import date_range
from ....utils.netcdf import readnc
[docs]
def ini_periods(self, **kwargs):
datei = self.datei
datef = self.datef
# List of sub-simulation windows
# Only one for TM5
self.subsimu_dates = [datei, datef]
# simulation time steps (used to extract concentrations
# To test every hours
self.tstep_dates = {datei: date_range(datei, datef, period="1h")}
self.tstep_all = np.array(self.tstep_dates[datei][:])
# when inputs are needed; 12H frequency for test
#
# JvP 20210527: the 12H frequency for input to the TM5 model is too high,
# the fluxes are only required on a basis. So try to change the frequency
# to "1MS", where MS = month start frequency according to the pandas
# documentation
#
# self.input_dates = {datei: pd.date_range(datei, datef, freq="12h")}
self.input_dates = {datei: date_range(datei, datef, period="1MS")}