Changeset 4449

Ignore:
Timestamp:
2014-02-04T13:16:11+01:00 (7 years ago)
Message:

Slight opt for z-first in dyn_vor

File:
1 edited

Unmodified
Added
Removed
• branches/2011/DEV_r2739_STFC_dCSE/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90

 r4448 SELECT CASE( kvor )      ! vorticity considered CASE ( 1 )                                                ! planetary vorticity (Coriolis) DO jk = 1, jpkm1 zwz(:,:,jk) = ff(:,:)      * ze3f(:,:,jk) DO jj = 1, jpj, 1 DO ji = 1, jpi, 1 DO jk = 1, jpkm1 zwz(ji,jj,jk) = ff(ji,jj)      * ze3f(ji,jj,jk) END DO END DO END DO CASE ( 2 )                                                ! relative  vorticity DO jk = 1, jpkm1 zwz(:,:,jk) = rotn(:,:,jk) * ze3f(:,:,jk) DO jj = 1, jpj, 1 DO ji = 1, jpi, 1 DO jk = 1, jpkm1 zwz(ji,jj,jk) = rotn(ji,jj,jk) * ze3f(ji,jj,jk) END DO END DO END DO CASE ( 3 )                                                ! metric term CALL lbc_lnk( zwz, 'F', 1. ) CASE ( 4 )                                                ! total (relative + planetary vorticity) DO jk = 1, jpkm1 zwz(:,:,jk) = ( rotn(:,:,jk) + ff(:,:) ) * ze3f(:,:,jk) DO jj = 1, jpj, 1 DO ji = 1, jpi, 1 DO jk = 1, jpkm1 zwz(ji,jj,jk) = ( rotn(ji,jj,jk) + ff(ji,jj) ) * ze3f(ji,jj,jk) END DO END DO END DO CASE ( 5 )                                                ! total (coriolis + metric) ! Compute and add the vorticity term trend ! ---------------------------------------- jj = 2 ztne(1,:,:) = 0   ;   ztnw(1,:,:) = 0   ;   ztse(1,:,:) = 0   ;   ztsw(1,:,:) = 0 DO ji = 2, jpi DO jk = 1, jpkm1 ztne(ji,jj,jk) = zwz(ji-1,jj  ,jk) + zwz(ji  ,jj  ,jk) + zwz(ji  ,jj-1,jk) ztnw(ji,jj,jk) = zwz(ji-1,jj-1,jk) + zwz(ji-1,jj  ,jk) + zwz(ji  ,jj  ,jk) ztse(ji,jj,jk) = zwz(ji  ,jj  ,jk) + zwz(ji  ,jj-1,jk) + zwz(ji-1,jj-1,jk) ztsw(ji,jj,jk) = zwz(ji  ,jj-1,jk) + zwz(ji-1,jj-1,jk) + zwz(ji-1,jj  ,jk) END DO DO jj = 1,jpj,1 DO jk = 1,jpk,1 ztne(1,jj,jk) = 0.0_wp ; ztnw(1,jj,jk) = 0.0_wp ztse(1,jj,jk) = 0.0_wp ; ztsw(1,jj,jk) = 0.0_wp END DO END DO DO jj = 3, jpj DO ji = fs_2, jpi   ! vector opt. ok because we start at jj = 3 DO jj = 2, jpj DO ji = 2, jpi DO jk = 1, jpkm1 ztne(ji,jj,jk) = zwz(ji-1,jj  ,jk) + zwz(ji  ,jj  ,jk) + zwz(ji  ,jj-1,jk) ztnw(ji+1,jj,jk) * zwy(ji+1,jj  ,jk)   & &     + ztse(ji,jj  ,jk) * zwy(ji  ,jj-1,jk) + ztsw(ji+1,jj,jk) * zwy(ji+1,jj-1,jk) ) zva = - zfac12 / e2v(ji,jj) * (  ztsw(ji,jj+1,jk) * zwx(ji-1,jj+1,jk) + & ztse(ji,jj+1,jk) * zwx(ji  ,jj+1,jk)   & &     + ztnw(ji,jj  ,jk) * zwx(ji-1,jj  ,jk) + ztne(ji,jj  ,jk) * zwx(ji  ,jj  ,jk) ) pua(ji,jj,jk) = pua(ji,jj,jk) + zua pva(ji,jj,jk) = pva(ji,jj,jk) + zva
Note: See TracChangeset for help on using the changeset viewer.