A dynamical systems framework for crop models: Toward optimal fertilization and irrigation strategies under climatic variability