Changeset 8386
- Timestamp:
- 2017-07-27T14:22:16+02:00 (7 years ago)
- Location:
- branches/UKMO/dev_r5518_fix_NaNs/NEMOGCM/NEMO
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_fix_NaNs/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r8280 r8386 2137 2137 REAL(wp) :: zumax, zvmax 2138 2138 REAL(wp), POINTER, DIMENSION(:,:) :: zfr_l, ztmp1, ztmp2, zotx1, zoty1, zotz1, zitx1, zity1, zitz1 2139 REAL(wp), POINTER, DIMENSION(:,:) :: zotx1_in, zoty1_in 2139 2140 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztmp3, ztmp4 2140 2141 !!---------------------------------------------------------------------- … … 2143 2144 ! 2144 2145 CALL wrk_alloc( jpi,jpj, zfr_l, ztmp1, ztmp2, zotx1, zoty1, zotz1, zitx1, zity1, zitz1 ) 2146 CALL wrk_alloc( jpi,jpj, zotx1_in, zoty1_in) 2145 2147 CALL wrk_alloc( jpi,jpj,jpl, ztmp3, ztmp4 ) 2146 2148 … … 2411 2413 zotx1(:,:) = un(:,:,1) 2412 2414 zoty1(:,:) = vn(:,:,1) 2413 ELSE 2415 ELSE 2414 2416 SELECT CASE( TRIM( sn_snd_crt%cldes ) ) 2415 2417 CASE( 'oce only' ) ! C-grid ==> T … … 2547 2549 ENDDO 2548 2550 ENDDO 2549 2551 2550 2552 ! Ensure any N fold and wrap columns are updated 2551 2553 CALL lbc_lnk(ztmp1, 'V', -1.0) 2552 2554 CALL lbc_lnk(ztmp2, 'U', -1.0) 2553 2555 2554 2556 ikchoix = -1 2555 CALL repcmo (zotx1,ztmp2,ztmp1,zoty1,zotx1,zoty1,ikchoix) 2557 ! We need copies of zotx1 and zoty2 in order to avoid problems 2558 ! caused by INTENTs used in the following subroutine. 2559 zotx1_in(:,:) = zotx1(:,:) 2560 zoty1_in(:,:) = zoty1(:,:) 2561 CALL repcmo (zotx1_in,ztmp2,ztmp1,zoty1_in,zotx1,zoty1,ikchoix) 2556 2562 ENDIF 2557 2563 ENDIF … … 2622 2628 ! 2623 2629 CALL wrk_dealloc( jpi,jpj, zfr_l, ztmp1, ztmp2, zotx1, zoty1, zotz1, zitx1, zity1, zitz1 ) 2630 CALL wrk_dealloc( jpi,jpj, zotx1_in, zoty1_in ) 2624 2631 CALL wrk_dealloc( jpi,jpj,jpl, ztmp3, ztmp4 ) 2625 2632 ! -
branches/UKMO/dev_r5518_fix_NaNs/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
r8377 r8386 752 752 IF( lwp ) WRITE(numout,*) 'STAT- ', names 753 753 ! 754 zvol(:,:) = e1e2t(:,:) * fse3t_a(:,:,1) * tmask(:,:,1) 754 ! RSRH The following should use fse3t_n not fse3t_a which 755 ! will be undefined at the start of a run! Just because it 756 ! doesn't crash on certain platforms doesn't make it universally 757 ! safe or portable! 758 zvol(:,:) = e1e2t(:,:) * fse3t_n(:,:,1) * tmask(:,:,1) 755 759 ztraf = glob_sum( dgtr(:,:) * zvol(:,:) ) 756 760 !! areasf = glob_sum(e1e2t(:,:) * tmask(:,:,1) ) … … 764 768 765 769 text_zmean = "N/A" 766 ! Avoid divide by zero when this routine is called from parts of the code 767 ! which may not have necessary time level variables to calculate areasf. 770 ! Avoid divide by zero. areasf must be positive. 768 771 IF (areasf > 0.0) THEN 769 772 zmean = ztraf / areasf
Note: See TracChangeset
for help on using the changeset viewer.