def updateStateFiles(self, data, alat, alon, agid):
        _, vegparam, snowbands = self.models[0].paramFromDB()
        veg = state.readVegetation("{0}/{1}".format(rpath.data, vegparam))
        bands, _ = state.readSnowbands("{0}/{1}".format(rpath.data, snowbands))
        for e, statefile in enumerate(self.statefiles):
            states, nlayer, nnodes, dateline = state.readStateFile(statefile)
            for var in data:
                x = state.readVariable(self.models[e], states, alat[var], alon[
                                       var], veg, bands, nlayer, var)

                states = state.updateVariable(self.models[e], states, x, data[var][:, e], alat[
                                              var], alon[var], agid, veg, bands, nlayer, var)
            state.writeStateFile(statefile, states, "{0}\n{1} {2}".format(
                dateline.strip(), nlayer, nnodes))
Test index page with login at /infrastructure/service_record/add/
dataset/ETHPy150Open nasa/RHEAS/src/ensemble.py/Ensemble.updateStateFiles--crossover with--dataset/ETHPy150Open treeio/treeio/treeio/infrastructure/tests.py/InfrastructureViewsTest.test_infr_service_record_add