Changeset 5212


Ignore:
Timestamp:
2015-04-15T13:14:00+02:00 (6 years ago)
Author:
hliu
Message:

A serious mistake in dynhpg: hpg_prj, which should also be corrected in v3.6 main trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r4826_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90

    r5014 r5212  
    794794      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zdept, zrhh 
    795795      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zhpi, zu, zv, fsp, xsp, asp, bsp, csp, dsp 
     796      REAL(wp), POINTER, DIMENSION(:,:)   ::   sshu_n, sshv_n 
    796797      REAL(wp), POINTER, DIMENSION(:,:)   ::  zcpx, zcpy    !W/D pressure filter 
    797798      !!---------------------------------------------------------------------- 
     
    800801      CALL wrk_alloc( jpi,jpj,jpk, zhpi, zu, zv, fsp, xsp, asp, bsp, csp, dsp ) 
    801802      CALL wrk_alloc( jpi,jpj,jpk, zdept, zrhh ) 
     803      CALL wrk_alloc( jpi,jpj, sshu_n, sshv_n ) 
    802804      IF(ln_wd) CALL wrk_alloc( jpi,jpj, zcpx, zcpy ) 
    803805      ! 
     
    910912 
    911913      ! Z coordinate of U(ji,jj,1:jpkm1) and V(ji,jj,1:jpkm1) 
     914 
     915      ! The following modification "sshu_n -> sshn" is a big mistake, this 
     916      ! should never happen here, remember to correct this in NEMO v3.6 
     917      ! trunk.  H.L. 
     918 
     919      !prepare sshu_n and sshv_n 
     920      DO jj = 1, jpjm1 
     921        DO ji = 1, jpim1 
     922          sshu_n(ji,jj) = (e12u(ji,jj) * sshn(ji,jj) + e12u(ji+1, jj) * sshn(ji+1,jj)) * & 
     923                        & r1_e12u(ji,jj) * umask(ji,jj,1) * 0.5_wp  
     924          sshv_n(ji,jj) = (e12v(ji,jj) * sshn(ji,jj) + e12v(ji+1, jj) * sshn(ji,jj+1)) * & 
     925                        & r1_e12v(ji,jj) * vmask(ji,jj,1) * 0.5_wp  
     926        END DO 
     927      END DO 
     928 
     929      CALL lbc_lnk (sshu_n, 'U', 1) 
     930      CALL lbc_lnk (sshv_n, 'V', 1) 
     931 
    912932      DO jj = 2, jpjm1 
    913933        DO ji = 2, jpim1 
    914           zu(ji,jj,1) = - ( fse3u(ji,jj,1) - sshn(ji,jj) * znad)    ! probable bug: changed from sshu_n for ztilde compilation 
    915           zv(ji,jj,1) = - ( fse3v(ji,jj,1) - sshn(ji,jj) * znad)    ! probable bug: changed from sshv_n for ztilde compilation 
     934          !zu(ji,jj,1) = - ( fse3u(ji,jj,1) - sshn(ji,jj) * znad)    ! probable bug: changed from sshu_n for ztilde compilation 
     935          !zv(ji,jj,1) = - ( fse3v(ji,jj,1) - sshn(ji,jj) * znad)    ! probable bug: changed from sshv_n for ztilde compilation 
     936 
     937          zu(ji,jj,1) = - ( fse3u(ji,jj,1) - sshu_n(ji,jj) * znad)  
     938          zv(ji,jj,1) = - ( fse3v(ji,jj,1) - sshv_n(ji,jj) * znad) 
    916939        END DO 
    917940      END DO 
     
    10821105      CALL wrk_dealloc( jpi,jpj,jpk, zhpi, zu, zv, fsp, xsp, asp, bsp, csp, dsp ) 
    10831106      CALL wrk_dealloc( jpi,jpj,jpk, zdept, zrhh ) 
     1107      CALL wrk_dealloc( jpi,jpj, sshu_n, sshv_n ) 
    10841108      IF(ln_wd) CALL wrk_dealloc( jpi,jpj, zcpx, zcpy ) 
    10851109      ! 
Note: See TracChangeset for help on using the changeset viewer.