[MITgcm-devel] sea ice clean up this week
Martin Losch
Martin.Losch at awi.de
Wed Feb 8 11:02:00 EST 2012
Hi Gael,
you are right about additional variables, but for scalars that shouldn't be a problem. Often it is necessary to introduce extra fields (similar to adjoint), and then it's a matter of resources. Our vector computer has oodles of RAM, so I usually don't mind the extra arrays.
if's will slow down the code (also non-vector code), so that it's better to move them out of a do-loop where possible. I don't think that additional if's in a loop that already has one, are as problematic, so having the turbulent ocean flux loop in mind, the previous formulation with MCPHEE_* and GRADIENT_* was better from a performance point of view, because it did not contain any if's. But I think that the current code block is not really a problem (in my quick test seaice_growth did not seem significantly slower.
Martin
More information about the MITgcm-devel
mailing list