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

Ignore:
Timestamp:
2017-08-01T16:12:29+02:00 (7 years ago)
Author:
timgraham
Message:

GMED ticket 335:

  • Merge dev_r5518_GO6_package_inc_asm into package branch to make everything easier for data assimilation
  • No effect on configs without data assimilation
File:
1 edited

Legend:

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

    r6486 r8400  
    4444   USE wrk_nemo        ! Memory Allocation 
    4545   USE timing          ! Timing 
     46   USE biaspar         ! bias correction variables 
    4647 
    4748   IMPLICIT NONE 
     
    8485      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    8586      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdu, ztrdv 
     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 
    8690      !!---------------------------------------------------------------------- 
    8791      ! 
     
    9296         ztrdu(:,:,:) = ua(:,:,:) 
    9397         ztrdv(:,:,:) = va(:,:,:) 
     98      ENDIF 
     99      ! 
     100      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 
     107         z_rhd_st(:,:,:) = rhd(:,:,:)     ! store orig density  
     108         rhd(:,:,:)      = rhd_pc(:,:,:)  ! use pressure corrected density 
     109         z_gru_st(:,:)   = gru(:,:) 
     110         gru(:,:)        = gru_pc(:,:) 
     111         z_grv_st(:,:)   = grv(:,:) 
     112         grv(:,:)        = grv_pc(:,:) 
     113 
    94114      ENDIF 
    95115      ! 
     
    112132      IF(ln_ctl)   CALL prt_ctl( tab3d_1=ua, clinfo1=' hpg  - Ua: ', mask1=umask,   & 
    113133         &                       tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
     134      ! 
     135      IF ( ln_bias .AND. ln_bias_pc_app )  THEN 
     136         rhd(:,:,:) = z_rhd_st(:,:,:)     ! restore original density 
     137         gru(:,:)   = z_gru_st(:,:) 
     138         grv(:,:)   = z_grv_st(:,:) 
     139 
     140         !Deallocate tempory variables 
     141         DEALLOCATE( z_rhd_st,     & 
     142            &        z_gru_st,     & 
     143            &        z_grv_st      ) 
     144      ENDIF 
    114145      ! 
    115146      IF( nn_timing == 1 )  CALL timing_stop('dyn_hpg') 
Note: See TracChangeset for help on using the changeset viewer.