; or (B) by the unmanned aircraft system test ranges designated under section 44803 of title 49, United States Code; (2) the safe, secure, or efficient operation of the national airspace system or maintenance of public safety; (3) the safe integration of advanced aviation technologies into the national airspace system, including activities carried out under the Alliance for System Safety of UAS through Research Excellence Center of Excellence of the FAA; (4) in coordination with other relevant Federal agencies, determining security threats of covered unmanned aircraft systems; and (5) intelligence, electronic warfare, and information warfare operations. (c) Waivers The Secretary may waive any restrictions under subsection (a) on a case-by-case basis by notifying the appropriate committees of Congress in writing, not later than 15 days after waiving such restrictions, that the procurement or other activity is in the public interest. (d) Replacement of certain unmanned aircraft systems (1) In general The Secretary shall take such actions as are necessary to replace any covered unmanned aircraft system that is owned or operated by the Department of Transportation as of the date of enactment of this Act with an unmanned aircraft system manufactured in the United States or an allied country (as such term is defined in section 2350f(d)(1) of title 10, United States Code) if the capabilities of such covered unmanned aircraft system are consequential to the work of the Department or the mission of the Department. (2) Funding There is authorized to be appropriated to the Secretary $5,000,000 to carry out this subsection. (e) Effective dates (1) Operations The prohibitions under paragraphs (1) and (3) of subsection (a) shall be in effect on the date of enactment of this Act. (2) Grants The prohibitions under paragraphs (1) and (2) of subsection (a) shall— (A) not apply to grants awarded before the date of enactment of this Act