The state director of ecology, when state funds shall be available therefor, shall have authority on behalf of the state to enter into contracts with the United States or any agency thereof and/or with any such flood control district, county, or counties so acting jointly, for flood control purposes for any such flood control district, county, or counties so acting jointly, the amount of the state's participation in any such contract to be such sum as may be appropriated therefor, or, in event of unallocated state appropriations for flood control purposes, in such necessary sum as to any such contract as he or she shall determine.