The codes here train and validate artificial neural network models with fire weather index variables and modelled hydrology variables by a process-based model "ecosys" as features in providing seasonal fire forecast over Riau, Sumatra, Indonesia. The codes form part of the Towards a Fire Early Warning System for Indonesia (TOFEWSI) project, which is funded through the UK’s National Environment Research Council – Newton Fund on behalf of UK Research & Innovation as well as through the Indonesia Endowment Fund for Education and the Indonesian Science Fund.