Was Crocodile stronger at Marineford? Or was he holding back in Alabasta?

 During the Alabasta arc, Crocodile displayed a level of power that was initially considered overwhelming by the Straw Hat Pirates. He possessed the Logia-type Devil Fruit called the Suna Suna no Mi (Sand-Sand Fruit), which granted him the ability to control and transform into sand. He had a reputation as a Shichibukai and controlled the desert kingdom of Alabasta from the shadows. His strength was showcased through his battles with Luffy and others. At Marineford, Crocodile was present as part of the war that took place at Marine Headquarters. While he did participate in the battle, he didn't display the same level of dominance as some other powerful characters present. This has led fans to speculate that he might not have been as strong as initially portrayed in Alabasta. It's important to note that power scaling and character abilities can be subject to interpretation and development by the author. Oda often keeps details deliberately open-ended to keep the story intriguing.

How effective are ship sonars against submarines?

 Ship sonars are generally very effective at detecting and tracking submarines. Sonar, which stands for "sound navigation and ranging," is a technology that uses sound waves to detect and locate objects underwater. Ship sonars use underwater speakers to transmit sound waves, which bounce off objects and return to the ship as echoes. By analyzing these echoes, ship sonars can determine the location, size, and shape of underwater objects, including submarines.

Ship sonars are typically used in conjunction with other sensors, such as radar and electro-optical sensors, to provide a comprehensive picture of the underwater environment. Ship sonars are also often integrated into broader naval systems, such as anti-submarine warfare (ASW) systems, which use a variety of sensors and weapons to detect, track, and engage submarines.

Overall, ship sonars are an important tool in the arsenal of naval forces and are generally very effective at detecting and tracking submarines. However, the effectiveness of ship sonars can be affected by a variety of factors, including the capabilities of the sonar system, the characteristics of the underwater environment, and the tactics and countermeasures employed by the submarine.