| 509 | In fact, I'm discovering that some routines have an awful lot of workspace arrays. |
| 510 | e.g.: |
| 511 | |
| 512 | {{{ |
| 513 | SUBROUTINE dyn_spg_ts( kt ) |
| 514 | !!---------------------------------------------------------------------- |
| 515 | !! *** routine dyn_spg_ts *** |
| 516 | !! |
| 517 | !! ** Purpose : Compute the now trend due to the surface pressure |
| 518 | ... |
| 519 | !! References : Griffies et al., (2003): A technical guide to MOM4. NOAA/GFDL |
| 520 | !!--------------------------------------------------------------------- |
| 521 | INTEGER, INTENT(in) :: kt ! ocean time-step index |
| 522 | !! |
| 523 | INTEGER :: ji, jj, jk, jn ! dummy loop indices |
| 524 | INTEGER :: icycle ! temporary scalar |
| 525 | |
| 526 | REAL(wp) :: zraur, zcoef, z2dt_e, z2dt_b ! temporary scalars |
| 527 | ... |
| 528 | !! |
| 529 | REAL(wp), DIMENSION(jpi,jpj) :: zhdiv, zsshb_e |
| 530 | !! |
| 531 | REAL(wp), DIMENSION(jpi,jpj) :: zbfru , zbfrv ! 2D workspace |
| 532 | !! |
| 533 | REAL(wp), DIMENSION(jpi,jpj) :: zsshun_e, zsshvn_e ! 2D workspace |
| 534 | !! |
| 535 | REAL(wp), DIMENSION(jpi,jpj) :: zcu, zwx, zua, zun ! 2D workspace |
| 536 | REAL(wp), DIMENSION(jpi,jpj) :: zcv, zwy, zva, zvn ! - - |
| 537 | REAL(wp), DIMENSION(jpi,jpj) :: zun_e, zub_e, zu_sum ! 2D workspace |
| 538 | REAL(wp), DIMENSION(jpi,jpj) :: zvn_e, zvb_e, zv_sum ! - - |
| 539 | REAL(wp), DIMENSION(jpi,jpj) :: zssh_sum ! - - |
| 540 | !!---------------------------------------------------------------------- |
| 541 | |
| 542 | IF( kt == nit000 ) THEN !* initialisation |
| 543 | }} |
| 544 | I make that 21 2D workspace arrays! Should the global workspace module contain that |
| 545 | many or should we make some of these into module-wide arrays? |
| 546 | |