I have tried, but get a RuntimeError. Specifically, I am trying this in the python window of ArcGIS pro:
current_project = arcpy.mp.ArcGISProject('CURRENT')
map = current_project.listMaps()
It gives me a RuntimeError. But if I use that same path in the GUI (Map -> Add Data -> Data From Path), it works fine.
Is the python method addDataFromPath not the same thing? Should it work? I've been semi-successful at adding a grib file to a map from the python window using arcpy.MakeRasterLayer_management, but that way seems to lose the time information, which I get if I just drag and drop the file into ArcGIS.