New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 2590 for branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DIA/diawri_dimg.h90 – NEMO

Ignore:
Timestamp:
2011-02-18T13:49:27+01:00 (13 years ago)
Author:
trackstand2
Message:

Merge branch 'dynamic_memory' into master-svn-dyn

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DIA/diawri_dimg.h90

    r2528 r2590  
    7979#endif 
    8080 
    81     REAL(wp), SAVE, DIMENSION (jpi,jpj,jpk) ::  um , vm   ! used to compute mean u, v fields 
    82     REAL(wp), SAVE, DIMENSION (jpi,jpj,jpk) ::  wm        ! used to compute mean w fields 
    83     REAL(wp), SAVE, DIMENSION (jpi,jpj,jpk) ::  avtm      ! used to compute mean kz fields 
    84     REAL(wp), SAVE, DIMENSION (jpi,jpj,jpk) ::  tm , sm   ! used to compute mean t, s fields 
    85     REAL(wp), SAVE, DIMENSION (jpi,jpj,jpk) ::  fsel      ! used to compute mean 2d fields 
     81    REAL(wp), ALLOCATABLE, SAVE, DIMENSION (:,:,:) ::  um , vm   ! used to compute mean u, v fields 
     82    REAL(wp), ALLOCATABLE, SAVE, DIMENSION (:,:,:) ::  wm        ! used to compute mean w fields 
     83    REAL(wp), ALLOCATABLE, SAVE, DIMENSION (:,:,:) ::  avtm      ! used to compute mean kz fields 
     84    REAL(wp), ALLOCATABLE, SAVE, DIMENSION (:,:,:) ::  tm , sm   ! used to compute mean t, s fields 
     85    REAL(wp), ALLOCATABLE, SAVE, DIMENSION (:,:,:) ::  fsel      ! used to compute mean 2d fields 
    8686    REAL(wp) :: zdtj 
    8787    ! 
     
    9595    !  --------------- 
    9696    ! 
     97    IF(.not.ALLOCATED(um))THEN 
     98       ALLOCATE(um(jpi,jpj,jpk), vm(jpi,jpj,jpk), & 
     99                wm(jpi,jpj,jpk),                  & 
     100                avtm(jpi,jpj,jpk),                & 
     101                tm(jpi,jpj,jpk), sm(jpi,jpj,jpk), & 
     102                fsel(jpi,jpj,jpk),                & 
     103                Stat=jk) 
     104       IF(jk /= 0)THEN 
     105          WRITE(*,*) 'ERROR: allocate failed in dia_wri (diawri_dimg.h90)' 
     106          CALL mppabort() 
     107       END IF 
     108    END IF 
     109 
    97110    inbsel = 17 
    98111 
Note: See TracChangeset for help on using the changeset viewer.