Changeset 14033
- Timestamp:
- 2020-12-03T11:30:33+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/module_example
r13472 r14033 49 49 50 50 !! * Substitutions 51 ! for DO macro 52 # include "do_loop_substitute.h90" 53 !for other substitutions 51 54 # include "exampl_substitute.h90" 52 55 !!---------------------------------------------------------------------- … … 95 98 REAL(wp) :: zmlmin, zbbrho ! temporary scalars (DOCTOR : start with z) 96 99 REAL(wp) :: zfact1, zfact2 ! do not use continuation lines in declaration 97 REAL(wp), DIMENSION(jpi,jpj) :: zwrk_2d ! 2D workspace 100 REAL(wp), DIMENSION(A2D(nn_hls)) :: zwrk_2d ! 2D workspace 101 REAL(wp), DIMENSION(A2D(nn_hls),jpk) :: zwrk_3d ! 3D workspace 98 102 !!-------------------------------------------------------------------- 99 103 ! 100 IF( kt == nit000 ) CALL exa_mpl_init ! Initialization (first time-step only) 104 IF( ntile == 0 .OR. ntile == 1 ) THEN ! Do only on the first tile 105 IF( kt == nit000 ) CALL exa_mpl_init ! Initialization (first time-step only) 101 106 102 zmlmin = 1.e-8 ! Local constant initialization 103 zbbrho = .5 * ebb / rho0 104 zfact1 = -.5 * rdt * efave 105 zfact2 = 1.5 * rdt * ediss 106 107 zmlmin = 1.e-8 ! Local constant initialization 108 zbbrho = .5 * ebb / rho0 109 zfact1 = -.5 * rdt * efave 110 zfact2 = 1.5 * rdt * ediss 111 ENDIF 112 107 113 SELECT CASE ( npdl ) ! short description of the action 108 114 ! 109 115 CASE ( 0 ) ! describe case 1 110 DO jk = 2, jpkm1 111 DO jj = 2, jpjm1 112 DO ji = fs_2, fs_jpim1 ! vector opt. 113 avm(ji,jj,jk) = .... 114 END DO 115 END DO 116 END DO 116 DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpkm1 ) 117 avm(ji,jj,jk) = .... 118 END_3D 117 119 ! 118 120 CASE ( 1 ) ! describe case 2 119 DO jk = 2, jpkm1 120 DO jj = 2, jpjm1 121 DO ji = fs_2, fs_jpim1 ! vector opt. 122 avm(ji,jj,jk) = ... 123 END DO 124 END DO 125 END DO 121 DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpkm1 ) 122 avm(ji,jj,jk) = .... 123 END_3D 126 124 ! 127 125 END SELECT 128 126 ! 129 CALL lbc_lnk( 'module_example', avm, 'T', 1. ) ! Lateral boundary conditions (unchanged sign) 127 CALL lbc_lnk( 'module_example', avm, 'T', 1., ncsten=true ) ! Lateral boundary conditions (unchanged sign) 128 ! ! ncsten=false for 5-points stencil communication 129 ! ! ncsten=true (default) for 9-points stencil communication 130 130 ! 131 131 END SUBROUTINE exa_mpl
Note: See TracChangeset
for help on using the changeset viewer.