Changes between Version 11 and Version 12 of 2011WP/2011Stream2/Dynamic Memory


Ignore:
Timestamp:
2011-01-19T14:33:39+01:00 (10 years ago)
Author:
trackstand
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • 2011WP/2011Stream2/Dynamic Memory

    v11 v12  
    507507I can appreciate that an almost global change like this will be difficult for users who have locally modified versions. Ideally the source-code revision-control system would facilitate applying the changes to a locally-modified version/branch - one that isn't in the official repository. Unfortunately I don't think subversion has this functionality (although I'd be very pleased to learn otherwise). Certainly I'll do my best to avoid unnecessary cosmetic changes. However, while I can imagine that scripting the change of module arrays from static to dynamic might be possible, I don't think the same can be said of the work-space arrays and they account for a lot of the code changes. 
    508508 
     509In fact, I'm discovering that some routines have an awful lot of workspace arrays. 
     510e.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}} 
     544I make that 21 2D workspace arrays! Should the global workspace module contain that 
     545many or should we make some of these into module-wide arrays? 
     546 
    509547---- 
    510548