Flexible production of green hydrogen and ammonia from variable solar and wind energy: Case study of Chile and Argentina