- Timestamp:
- 2019-04-15T13:00:50+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_GO6_fix_diaar5/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90
r10863 r10870 81 81 ! 82 82 REAL(wp), POINTER, DIMENSION(:,:) :: zarea_ssh , zbotpres ! 2D workspace 83 REAL(wp), POINTER, DIMENSION(:,:) :: pe! 2D workspace83 REAL(wp), POINTER, DIMENSION(:,:) :: zpe ! 2D workspace 84 84 REAL(wp), POINTER, DIMENSION(:,:,:) :: zrhd , zrhop ! 3D workspace 85 85 REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztsn ! 4D workspace … … 91 91 IF( kt == nit000 ) CALL dia_ar5_init 92 92 93 CALL wrk_alloc( jpi , jpj , zarea_ssh , zbotpres, pe)93 CALL wrk_alloc( jpi , jpj , zarea_ssh , zbotpres, zpe) 94 94 CALL wrk_alloc( jpi , jpj , jpk , zrhd , zrhop ) 95 95 CALL wrk_alloc( jpi , jpj , jpk , jpts , ztsn ) … … 207 207 ! Exclude points where rn2 is negative as convection kicks in here and 208 208 ! work is not being done against stratification 209 pe(:,:) = 0._wp 210 IF( lk_zdfddm ) THEN 211 DO ji=1,jpi 212 DO jj=1,jpj 213 DO jk=2,jpk 214 zrw = ( fsdepw(ji,jj,jk ) - fsdept(ji,jj,jk) ) & 215 & / ( fsdept(ji,jj,jk-1) - fsdept(ji,jj,jk) ) 216 ! 217 zaw = rab_n(ji,jj,jk,jp_tem) * (1. - zrw) + rab_n(ji,jj,jk-1,jp_tem)* zrw 218 zbw = rab_n(ji,jj,jk,jp_sal) * (1. - zrw) + rab_n(ji,jj,jk-1,jp_sal)* zrw 219 ! 220 pe(ji, jj) = pe(ji, jj) - MIN(0._wp, rn2(ji,jj,jk)) * & 221 & grav * (avt(ji,jj,jk) * zaw * (tsn(ji,jj,jk-1,jp_tem) - tsn(ji,jj,jk,jp_tem) ) & 222 & - fsavs(ji,jj,jk) * zbw * (tsn(ji,jj,jk-1,jp_sal) - tsn(ji,jj,jk,jp_sal) ) ) 209 zpe(:,:) = 0._wp 210 IF( ln_zdfddm ) THEN 211 DO jk = 2, jpk 212 DO jj = 1, jpj 213 DO ji = 1, jpi 214 IF( rn2(ji,jj,jk) > 0._wp ) THEN 215 216 zrw = ( fsdepw(ji,jj,jk ) - fsdept(ji,jj,jk) ) & 217 & / ( fsdept(ji,jj,jk-1) - fsdept(ji,jj,jk) ) 218 ! 219 zaw = rab_n(ji,jj,jk,jp_tem) * (1. - zrw) + rab_n(ji,jj,jk-1,jp_tem)* zrw 220 zbw = rab_n(ji,jj,jk,jp_sal) * (1. - zrw) + rab_n(ji,jj,jk-1,jp_sal)* zrw 221 ! 222 223 zpe(ji, jj) = zpe(ji, jj) & 224 - grav * ( avt(ji,jj,jk) * zaw * (tsn(ji,jj,jk-1,jp_tem) - tsn(ji,jj,jk,jp_tem) ) & 225 - avs(ji,jj,jk) * zbw * (tsn(ji,jj,jk-1,jp_sal) - tsn(ji,jj,jk,jp_sal) ) ) 223 226 224 227 ENDDO … … 226 229 ENDDO 227 230 ELSE 228 DO j i=1,jpi229 DO j j=1,jpj230 DO j k=1,jpk231 pe(ji,jj) = pe(ji,jj) + avt(ji, jj, jk) * MIN(0._wp,rn2(ji, jj, jk)) * rau0 * fse3w(ji, jj, jk)231 DO jk=1,jpk 232 DO ji=1,jpi 233 DO jj=1,jpj 234 zpe(ji,jj) = zpe(ji,jj) + avt(ji, jj, jk) * MIN(0._wp,rn2(ji, jj, jk)) * rau0 * e3w_n(ji, jj, jk) 232 235 ENDDO 233 236 ENDDO 234 237 ENDDO 235 238 ENDIF 236 CALL iom_put( 'tnpeo', pe ) 239 CALL lbc_lnk(zpe, 'T', 1._wp) 240 CALL iom_put( 'tnpeo', zpe ) 237 241 ENDIF 238 242 ! 239 CALL wrk_dealloc( jpi , jpj , zarea_ssh , zbotpres, pe )243 CALL wrk_dealloc( jpi , jpj , zarea_ssh , zbotpres, zpe ) 240 244 CALL wrk_dealloc( jpi , jpj , jpk , zrhd , zrhop ) 241 245 CALL wrk_dealloc( jpi , jpj , jpk , jpts , ztsn )
Note: See TracChangeset
for help on using the changeset viewer.