self.write_rc(self['jobrcfilename'])#LU rc z dodatkowymi nazwami folderow itd. normalnie zapisany da.rc z false, ap otem przemieniony da_runtime. ile w tym sensu..... file_structure niby taka sama.(a na pewno byla w poprzendim...)ale czy to sie do czegos przydaje_
logging.debug("Next cycle start date is %s"%self['time.start'])
# Copy randomseed.pickle file to exec dir
source=os.path.join(self['dir.restart.current'],'randomseed.pickle')#LU wydaje mi sie ze tutaj nie trzeba podawac nazwy pliku w folderze docelowym, jesli sie obczai ze to folder to sie kopiuje.
# Create the name of the rc-file that will hold this new input, and write it
fname=os.path.join(self['dir.exec'],'da_runtime.rc')# current exec dir holds next rc file
#fname = os.path.join(self['dir.exec'], 'da_runtime.rc') # current exec dir holds next rc file
fname=os.path.join(self['dir.restart'],'da_runtime_%s.rc'%newDaCycle['time.start'].strftime('%Y%m%d'))#advanced time
rc.write(fname,newDaCycle)
logging.debug('Wrote new da_runtime.rc (%s) to exec dir'%fname)
# The rest is info needed for a system restart, so it modifies the current DaCycle object (self)
self['da.restart.fname']=fname# needed for next job template
self.RestartFileList.append(fname)# current restart list holds next rc file name
logging.debug('Added da_runtime.rc to the RestartFileList for later collection')
#self.RestartFileList.append(fname) # current restart list holds next rc file name #LU not that needed since it is already written to the restart dir...
#logging.debug('Added da_runtime.rc to the RestartFileList for later collection')
StateVector.read_from_file(saved_sv)# by default will read "opt"(imized) variables, and then propagate #LU najlatwiej - jesli jest to da.restart.tstamp
# Now propagate the ensemble by one cycle to prepare for the current cycle
StateVector.propagate(DaCycle)
# Finally, also write the StateVector to a file so that we can always access the a-priori information
#LU jaki to ma sens: taki ze zawsze mamy flask_output.nc. tylko ze on jest chyba nadpisywany za kazdym cyklem? no coz.. chyba byla na ten temat dyskusja, i wyszlo ze for debugging. niech i tak zostanie.