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 8190 for branches/UKMO/dev_r5518_GO6_package_inc_asm/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90 – NEMO

Ignore:
Timestamp:
2017-06-19T17:43:22+02:00 (7 years ago)
Author:
jwhile
Message:

Update due to Tim's review

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package_inc_asm/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90

    r8036 r8190  
    8585      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    8686      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdu, ztrdv 
    87       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   z_rhd_st  ! tmp density storage for pressure corr  
    88       REAL(wp), DIMENSION(jpi,jpj)     ::   z_gru_st  ! tmp ua trends storage for pressure corr 
    89       REAL(wp), DIMENSION(jpi,jpj)     ::   z_grv_st  ! tmp va trends storage for pressure corr 
     87      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:)   ::   z_rhd_st  ! tmp density storage for pressure corr 
     88      REAL(wp), ALLOCATABLE, DIMENSION(:,:)     ::   z_gru_st  ! tmp ua trends storage for pressure corr 
     89      REAL(wp), ALLOCATABLE, DIMENSION(:,:)     ::   z_grv_st  ! tmp va trends storage for pressure corr 
    9090      !!---------------------------------------------------------------------- 
    9191      ! 
     
    9999      ! 
    100100      IF ( ln_bias .AND. ln_bias_pc_app ) THEN 
     101 
     102         !Allocate space for tempory variables 
     103         ALLOCATE( z_rhd_st(jpi,jpj,jpk), & 
     104            &      z_gru_st(jpi,jpj),     & 
     105            &      z_grv_st(jpi,jpj)      ) 
     106 
    101107         z_rhd_st(:,:,:) = rhd(:,:,:)     ! store orig density  
    102108         rhd(:,:,:)      = rhd_pc(:,:,:)  ! use pressure corrected density 
     
    105111         z_grv_st(:,:)   = grv(:,:) 
    106112         grv(:,:)        = grv_pc(:,:) 
     113 
    107114      ENDIF 
    108115      ! 
     
    130137         gru(:,:)   = z_gru_st(:,:) 
    131138         grv(:,:)   = z_grv_st(:,:) 
     139 
     140         !Deallocate tempory variables 
     141         DEALLOCATE( z_rhd_st(jpi,jpj,jpk), & 
     142            &        z_gru_st(jpi,jpj),     & 
     143            &        z_grv_st(jpi,jpj)      ) 
    132144      ENDIF 
    133145      ! 
Note: See TracChangeset for help on using the changeset viewer.