Nagasaki wasn't even a target just weeks before its destruction. The two cities were chosen more or less arbitrarily.
yes, the torpedo factories are a valid target. How large were those, how many square meters of the final destruction was a military target? A city with families and children is not a valid target. If Truman gave a warning to the civilians beforehand most of them could have been saved and they could have still destroyed the factories ...
According to the geneva conventions it is a war crime (not arguing about how reasonable the conventions are etc.).
They showed this intent by indiscriminately slaughtering civilians and military personnel.
Personally, I'm okay with it, mostly because the alternative was invasion, which would have caused a million American casualties and wiped Japan off the face of the map. That would have been unpleasant.
By the way if you want a semi-scholarly but not entirely dry treatment of the moral problem of Truman's bombs I can recommend the book "Prompt and Utter Destruction".
Given that the atomic bomb was secret, "prompt and utter destruction" is only a warning in retrospect. There is no way that you can read the Potsdam declaration and think, "oh, they are going to start dropping atomic bombs on cities soon," if you don't know what an atomic bomb is or that they exist.
I wonder how important "warning" really is though if it is this vague. Imagine country A is at war with country B. Country A issues an announcement: "if country B does not do what we want, we will set off a bomb in one of country B's major cities." If they follow through with it, does this sort of warning absolve them of responsibility? Does the presence or absence of this kind of vague warning have any effect either way on the ethical calculus regarding the targeting of civilians?
It seems to me that if it is ethical then it is ethical without the warning, and if it is not ethical then it is not ethical with the warning. Which makes the warning question a red herring.
The firebombing of Tokyo (one of many examples - many Japanese cities suffered mass destruction in conventional bombings) was just as, if not more, horrific than Hiroshima or Nagasaki. Why would the residents care whether they were being firebombed or nuclear bombed?
Also, it's probably not clear cut if it is a war crime. War is a horrible grizzly thing and very little is off limits in terms of offensive action.
The ends can't always justify the means - that rationale can easily be twisted to allow anything.
The US wanted to use nuclear weapons in the Vietnam War as well. Had this happened, the use of nuclear weapons in combat would probably have been normalized, and the Cold War would probably not have remained cold for very long.
As far as the atomic bombs on Hiroshima and Nagasaki are concerned, I'm not going to second guess what the American or Japanese forces considered to be in their best interests. In hindsight, we know more than they knew back then about the larger political picture and the effects of radioactive fallout.
Given the possibility of years of grueling island-hopping invasion against an enemy as ardently defiant as Japan, I can see the brutal calculus that simply breaking Japan's will and forcing its surrender quickly through a demonstration of overwhelming destructive power would save more lives in the long run.
But even that doesn't make it good that the US dropped the atomic bombs. It was possibly just an evil act which may have prevented a greater evil.