= KERNEL-02_DaveStorkey_RK3Preparation The PI is responsible to closely follow the progress of the action, and especially to contact NEMO project manager if the delay on preview (or review) are longer than the 2 weeks expected. == Help The action has to be detailed briefly in the 'Summary' for later inclusion in other pages. To do so, '''edit 'Summary' section as a common wiki page and set links for the development ticket and branch'''. '''Out of this, the rest of the page ('Abstract'|'Preview'|'Tests'|'Review') can be edited on-line inside the form fields''' considering the following color code given hereafter: [[span(PI(S), style=background-color:lightgrey)]], [[span(Previewer(s), style=background-color:lightblue)]] and [[span(Reviewer(s), style=background-color:lightgreen)]].\\ Record your modifications for the section you have edited by clicking on the corresponding button at the end of the section with 'Save ...' button. Just above, the log record will be updated. The informations inside the form fields and this wiki page itself are stored in 2 separate databases. As a consequence, there is absolutely no risk to make any modification in the page itself as long as you don't rename the page or modify the source code of `{{{#!TracForm ... }}}` processors. == Summary #summary ||= '''Action''' =|| KERNEL-02_DaveStorkey_RK3Preparation || ||= '''PI(S)''' =|| Dave Storkey || {{{#!th '''Digest''' }}} {{{#!td Reorganisation of code to prepare for implementation of RK3 timestepping: 1. Prognostic fields to be passed to tendency routines as arguments. 2. Tracers to be consistency updated as extensive (volume-weighted) quantities throughout the code. }}} |- ||= '''Dependencies''' =|| || ||= '''Target''' =|| || ||= '''Trac Ticket''' =|| #0000 || ||= '''SVN branch''' =|| [source:/branches/$YEAR/dev_r{REV}_{SCOPE}-{NUM}_{PIS}-{KEYWORDS}] || ||= '''Previewer(s)''' =|| Gurvan Madec || ||= '''Reviewer(s)''' =|| Gurvan Madec || ||= '''Link''' =|| [[ExtractUrl(.)]] || {{{#!comment DON'T REMOVE THIS VOID HEADING OR IT WILL BREAK THE INCLUDE FEATURE BETWEEN WIKI PAGES }}} == == {{{#!comment DON'T REMOVE THIS VOID HEADING OR IT WILL BREAK THE INCLUDE FEATURE BETWEEN WIKI PAGES }}} {{{#!Fold title=Abstract tag=h2 [=#abstract] This section should be completed before starting to develop the code, in order to find agreement on the method beforehand. {{{#!TracForm #!subcontext abstract #!submit_label 'Save Abstract' #!keep_history yes === Description [tf.textarea:description -id=piform -class=taform 'Describe the goal of development, and the methodology.\n\nAdd reference documents or publications if relevant.' 0 20] === Implementation [tf.textarea:implementation -id=piform -class=taform 'Describe flow chart of the changes in the code.\n\nList the .F90 files and modules to be changed.\n\nDetailed list of new variables (including namelists) to be defined. Give for each the chosen name (following coding rules) and definition.' 0 20] === Reference manual and web pages updates [tf.textarea:manual -id=piform -class=taform 'Using part 1 and 2, define the summary of changes to be done in the NEMO reference manual (tex files), and in the content of web pages.' 0 20] '''''Updated on [tf.form_updated_on:] by [tf.form_updater:]''''' }}} Once the PI has completed this section, he should send a mail to the previewer(s) asking them to preview the work within two weeks. }}} {{{#!Fold title=Preview tag=h2 [=#preview] Part of the reorganisation for RK3 requires the refactoring of arrays such as un, ub into a single, 4 dimensional array with a time-level dimension. It is expected that much of the work required here can be automated to the extent that it is feasible to re-apply these changes after the annual merge. Below is a working example of how this might be achieved. Perl is used to carry out the pattern matching and substitution because of its ability to match patterns extending over several lines. A random subset of source files are used in this example and several to illustrate the successes and caveats for the method. '''Step 1''' Perl is used in a 'edit in place' mode so the original files will be overwritten. Step 1 is therefore to create copies of the test files: {{{ #!/bin/bash mkdir TEST_FILES cp FLO/flo_oce.F90 FLO/floats.F90 SBC/sbcfwb.F90 DYN/dynadv_ubs.F90 DYN/dynkeg.F90 DYN/dynvor.F90 DYN/dynadv_cen2.F90 TEST_FILES cp FLO/flo_oce.F90 FLO/floats.F90 SBC/sbcfwb.F90 DYN/dynadv_ubs.F90 DYN/dynkeg.F90 DYN/dynvor.F90 DYN/dynadv_cen2.F90 TEST_FILES_ORG }}} '''The refactoring script''' {{{ #!/bin/bash # INVARS=( ub vb wb un vn wn ) OUTVARS=( uu vv ww uu vv ww ) TLEVS=( jtb jtb jtb jtn jtn jtn ) # rm patch.list for f in TEST_FILES/*.F90 do echo "{{{#!diff" >> patch.list echo "Index: "$f >> patch.list echo "==============================" >> patch.list n=0 for n in `seq 0 1 $(( ${#INVARS[*]} - 1 ))` do perl -0777 -pi -e 's:([\s+-\/\*\%])'${INVARS[$n]}'\s*\(([^)]*)\):\1'${OUTVARS[$n]}'\(\2,'${TLEVS[$n]}'\):g' $f done diff -u TEST_FILES_ORG/`basename $f` $f >> patch.list echo "}}}" >> patch.list done }}} '''The results (patch.list):''' {{{#!diff Index: TEST_FILES/dynadv_cen2.F90 ================================================== --- TEST_FILES_ORG/dynadv_cen2.F90 2019-02-08 10:51:12.000000000 +0000 +++ TEST_FILES/dynadv_cen2.F90 2019-02-08 12:53:14.000000000 +0000 @@ -66,14 +66,14 @@ ! !== Horizontal advection ==! ! DO jk = 1, jpkm1 ! horizontal transport - zfu(:,:,jk) = 0.25_wp * e2u(:,:) * e3u_n(:,:,jk) * un(:,:,jk) - zfv(:,:,jk) = 0.25_wp * e1v(:,:) * e3v_n(:,:,jk) * vn(:,:,jk) + zfu(:,:,jk) = 0.25_wp * e2u(:,:) * e3u_n(:,:,jk) * uu(:,:,jk,jtn) + zfv(:,:,jk) = 0.25_wp * e1v(:,:) * e3v_n(:,:,jk) * vv(:,:,jk,jtn) DO jj = 1, jpjm1 ! horizontal momentum fluxes (at T- and F-point) DO ji = 1, fs_jpim1 ! vector opt. - zfu_t(ji+1,jj ,jk) = ( zfu(ji,jj,jk) + zfu(ji+1,jj,jk) ) * ( un(ji,jj,jk) + un(ji+1,jj ,jk) ) - zfv_f(ji ,jj ,jk) = ( zfv(ji,jj,jk) + zfv(ji+1,jj,jk) ) * ( un(ji,jj,jk) + un(ji ,jj+1,jk) ) - zfu_f(ji ,jj ,jk) = ( zfu(ji,jj,jk) + zfu(ji,jj+1,jk) ) * ( vn(ji,jj,jk) + vn(ji+1,jj ,jk) ) - zfv_t(ji ,jj+1,jk) = ( zfv(ji,jj,jk) + zfv(ji,jj+1,jk) ) * ( vn(ji,jj,jk) + vn(ji ,jj+1,jk) ) + zfu_t(ji+1,jj ,jk) = ( zfu(ji,jj,jk) + zfu(ji+1,jj,jk) ) * ( uu(ji,jj,jk,jtn) + uu(ji+1,jj ,jk,jtn) ) + zfv_f(ji ,jj ,jk) = ( zfv(ji,jj,jk) + zfv(ji+1,jj,jk) ) * ( uu(ji,jj,jk,jtn) + uu(ji ,jj+1,jk,jtn) ) + zfu_f(ji ,jj ,jk) = ( zfu(ji,jj,jk) + zfu(ji,jj+1,jk) ) * ( vv(ji,jj,jk,jtn) + vv(ji+1,jj ,jk,jtn) ) + zfv_t(ji ,jj+1,jk) = ( zfv(ji,jj,jk) + zfv(ji,jj+1,jk) ) * ( vv(ji,jj,jk,jtn) + vv(ji ,jj+1,jk,jtn) ) END DO END DO DO jj = 2, jpjm1 ! divergence of horizontal momentum fluxes @@ -105,21 +105,21 @@ IF( ln_linssh ) THEN ! linear free surface: advection through the surface DO jj = 2, jpjm1 DO ji = fs_2, fs_jpim1 - zfu_uw(ji,jj,1) = 0.5_wp * ( e1e2t(ji,jj) * wn(ji,jj,1) + e1e2t(ji+1,jj) * wn(ji+1,jj,1) ) * un(ji,jj,1) - zfv_vw(ji,jj,1) = 0.5_wp * ( e1e2t(ji,jj) * wn(ji,jj,1) + e1e2t(ji,jj+1) * wn(ji,jj+1,1) ) * vn(ji,jj,1) + zfu_uw(ji,jj,1) = 0.5_wp * ( e1e2t(ji,jj) * ww(ji,jj,1,jtn) + e1e2t(ji+1,jj) * ww(ji+1,jj,1,jtn) ) * uu(ji,jj,1,jtn) + zfv_vw(ji,jj,1) = 0.5_wp * ( e1e2t(ji,jj) * ww(ji,jj,1,jtn) + e1e2t(ji,jj+1) * ww(ji,jj+1,1,jtn) ) * vv(ji,jj,1,jtn) END DO END DO ENDIF DO jk = 2, jpkm1 ! interior advective fluxes DO jj = 2, jpj ! 1/4 * Vertical transport DO ji = 2, jpi - zfw(ji,jj,jk) = 0.25_wp * e1e2t(ji,jj) * wn(ji,jj,jk) + zfw(ji,jj,jk) = 0.25_wp * e1e2t(ji,jj) * ww(ji,jj,jk,jtn) END DO END DO DO jj = 2, jpjm1 DO ji = fs_2, fs_jpim1 ! vector opt. - zfu_uw(ji,jj,jk) = ( zfw(ji,jj,jk) + zfw(ji+1,jj ,jk) ) * ( un(ji,jj,jk) + un(ji,jj,jk-1) ) - zfv_vw(ji,jj,jk) = ( zfw(ji,jj,jk) + zfw(ji ,jj+1,jk) ) * ( vn(ji,jj,jk) + vn(ji,jj,jk-1) ) + zfu_uw(ji,jj,jk) = ( zfw(ji,jj,jk) + zfw(ji+1,jj ,jk) ) * ( uu(ji,jj,jk,jtn) + uu(ji,jj,jk-1,jtn) ) + zfv_vw(ji,jj,jk) = ( zfw(ji,jj,jk) + zfw(ji ,jj+1,jk) ) * ( vv(ji,jj,jk,jtn) + vv(ji,jj,jk-1,jtn) ) END DO END DO END DO }}} {{{#!diff Index: TEST_FILES/dynadv_ubs.F90 ============================== --- TEST_FILES_ORG/dynadv_ubs.F90 2019-02-08 10:51:12.000000000 +0000 +++ TEST_FILES/dynadv_ubs.F90 2019-02-08 12:53:14.000000000 +0000 @@ -101,17 +101,17 @@ DO jk = 1, jpkm1 ! Laplacian of the velocity ! ! ! =========================== ! ! ! horizontal volume fluxes - zfu(:,:,jk) = e2u(:,:) * e3u_n(:,:,jk) * un(:,:,jk) - zfv(:,:,jk) = e1v(:,:) * e3v_n(:,:,jk) * vn(:,:,jk) + zfu(:,:,jk) = e2u(:,:) * e3u_n(:,:,jk) * uu(:,:,jk,jtn) + zfv(:,:,jk) = e1v(:,:) * e3v_n(:,:,jk) * vv(:,:,jk,jtn) ! DO jj = 2, jpjm1 ! laplacian DO ji = fs_2, fs_jpim1 ! vector opt. - zlu_uu(ji,jj,jk,1) = ( ub (ji+1,jj ,jk) - 2.*ub (ji,jj,jk) + ub (ji-1,jj ,jk) ) * umask(ji,jj,jk) - zlv_vv(ji,jj,jk,1) = ( vb (ji ,jj+1,jk) - 2.*vb (ji,jj,jk) + vb (ji ,jj-1,jk) ) * vmask(ji,jj,jk) - zlu_uv(ji,jj,jk,1) = ( ub (ji ,jj+1,jk) - ub (ji ,jj ,jk) ) * fmask(ji ,jj ,jk) & - & - ( ub (ji ,jj ,jk) - ub (ji ,jj-1,jk) ) * fmask(ji ,jj-1,jk) - zlv_vu(ji,jj,jk,1) = ( vb (ji+1,jj ,jk) - vb (ji ,jj ,jk) ) * fmask(ji ,jj ,jk) & - & - ( vb (ji ,jj ,jk) - vb (ji-1,jj ,jk) ) * fmask(ji-1,jj ,jk) + zlu_uu(ji,jj,jk,1) = ( uu(ji+1,jj ,jk,jtb) - 2.*uu(ji,jj,jk,jtb) + uu(ji-1,jj ,jk,jtb) ) * umask(ji,jj,jk) + zlv_vv(ji,jj,jk,1) = ( vv(ji ,jj+1,jk,jtb) - 2.*vv(ji,jj,jk,jtb) + vv(ji ,jj-1,jk,jtb) ) * vmask(ji,jj,jk) + zlu_uv(ji,jj,jk,1) = ( uu(ji ,jj+1,jk,jtb) - uu(ji ,jj ,jk,jtb) ) * fmask(ji ,jj ,jk) & + & - ( uu(ji ,jj ,jk,jtb) - uu(ji ,jj-1,jk,jtb) ) * fmask(ji ,jj-1,jk) + zlv_vu(ji,jj,jk,1) = ( vv(ji+1,jj ,jk,jtb) - vv(ji ,jj ,jk,jtb) ) * fmask(ji ,jj ,jk) & + & - ( vv(ji ,jj ,jk,jtb) - vv(ji-1,jj ,jk,jtb) ) * fmask(ji-1,jj ,jk) ! zlu_uu(ji,jj,jk,2) = ( zfu(ji+1,jj ,jk) - 2.*zfu(ji,jj,jk) + zfu(ji-1,jj ,jk) ) * umask(ji,jj,jk) zlv_vv(ji,jj,jk,2) = ( zfv(ji ,jj+1,jk) - 2.*zfv(ji,jj,jk) + zfv(ji ,jj-1,jk) ) * vmask(ji,jj,jk) @@ -131,13 +131,13 @@ ! ! Horizontal advection ! DO jk = 1, jpkm1 ! ====================== ! ! ! horizontal volume fluxes - zfu(:,:,jk) = 0.25_wp * e2u(:,:) * e3u_n(:,:,jk) * un(:,:,jk) - zfv(:,:,jk) = 0.25_wp * e1v(:,:) * e3v_n(:,:,jk) * vn(:,:,jk) + zfu(:,:,jk) = 0.25_wp * e2u(:,:) * e3u_n(:,:,jk) * uu(:,:,jk,jtn) + zfv(:,:,jk) = 0.25_wp * e1v(:,:) * e3v_n(:,:,jk) * vv(:,:,jk,jtn) ! DO jj = 1, jpjm1 ! horizontal momentum fluxes at T- and F-point DO ji = 1, fs_jpim1 ! vector opt. - zui = ( un(ji,jj,jk) + un(ji+1,jj ,jk) ) - zvj = ( vn(ji,jj,jk) + vn(ji ,jj+1,jk) ) + zui = ( uu(ji,jj,jk,jtn) + uu(ji+1,jj ,jk,jtn) ) + zvj = ( vv(ji,jj,jk,jtn) + vv(ji ,jj+1,jk,jtn) ) ! IF( zui > 0 ) THEN ; zl_u = zlu_uu(ji ,jj,jk,1) ELSE ; zl_u = zlu_uu(ji+1,jj,jk,1) @@ -163,9 +163,9 @@ ENDIF ! zfv_f(ji ,jj ,jk) = ( zfvi - gamma2 * ( zlv_vu(ji,jj,jk,2) + zlv_vu(ji+1,jj ,jk,2) ) ) & - & * ( un(ji,jj,jk) + un(ji ,jj+1,jk) - gamma1 * zl_u ) + & * ( uu(ji,jj,jk,jtn) + uu(ji ,jj+1,jk,jtn) - gamma1 * zl_u ) zfu_f(ji ,jj ,jk) = ( zfuj - gamma2 * ( zlu_uv(ji,jj,jk,2) + zlu_uv(ji ,jj+1,jk,2) ) ) & - & * ( vn(ji,jj,jk) + vn(ji+1,jj ,jk) - gamma1 * zl_v ) + & * ( vv(ji,jj,jk,jtn) + vv(ji+1,jj ,jk,jtn) - gamma1 * zl_v ) END DO END DO DO jj = 2, jpjm1 ! divergence of horizontal momentum fluxes @@ -198,21 +198,21 @@ IF( ln_linssh ) THEN ! constant volume : advection through the surface DO jj = 2, jpjm1 DO ji = fs_2, fs_jpim1 - zfu_uw(ji,jj,1) = 0.5_wp * ( e1e2t(ji,jj) * wn(ji,jj,1) + e1e2t(ji+1,jj) * wn(ji+1,jj,1) ) * un(ji,jj,1) - zfv_vw(ji,jj,1) = 0.5_wp * ( e1e2t(ji,jj) * wn(ji,jj,1) + e1e2t(ji,jj+1) * wn(ji,jj+1,1) ) * vn(ji,jj,1) + zfu_uw(ji,jj,1) = 0.5_wp * ( e1e2t(ji,jj) * ww(ji,jj,1,jtn) + e1e2t(ji+1,jj) * ww(ji+1,jj,1,jtn) ) * uu(ji,jj,1,jtn) + zfv_vw(ji,jj,1) = 0.5_wp * ( e1e2t(ji,jj) * ww(ji,jj,1,jtn) + e1e2t(ji,jj+1) * ww(ji,jj+1,1,jtn) ) * vv(ji,jj,1,jtn) END DO END DO ENDIF DO jk = 2, jpkm1 ! interior fluxes DO jj = 2, jpj DO ji = 2, jpi - zfw(ji,jj,jk) = 0.25_wp * e1e2t(ji,jj) * wn(ji,jj,jk) + zfw(ji,jj,jk) = 0.25_wp * e1e2t(ji,jj) * ww(ji,jj,jk,jtn) END DO END DO DO jj = 2, jpjm1 DO ji = fs_2, fs_jpim1 ! vector opt. - zfu_uw(ji,jj,jk) = ( zfw(ji,jj,jk)+ zfw(ji+1,jj,jk) ) * ( un(ji,jj,jk) + un(ji,jj,jk-1) ) - zfv_vw(ji,jj,jk) = ( zfw(ji,jj,jk)+ zfw(ji,jj+1,jk) ) * ( vn(ji,jj,jk) + vn(ji,jj,jk-1) ) + zfu_uw(ji,jj,jk) = ( zfw(ji,jj,jk)+ zfw(ji+1,jj,jk) ) * ( uu(ji,jj,jk,jtn) + uu(ji,jj,jk-1,jtn) ) + zfv_vw(ji,jj,jk) = ( zfw(ji,jj,jk)+ zfw(ji,jj+1,jk) ) * ( vv(ji,jj,jk,jtn) + vv(ji,jj,jk-1,jtn) ) END DO END DO END DO }}} {{{#!diff Index: TEST_FILES/dynkeg.F90 ============================== --- TEST_FILES_ORG/dynkeg.F90 2019-02-08 10:51:12.000000000 +0000 +++ TEST_FILES/dynkeg.F90 2019-02-08 12:53:14.000000000 +0000 @@ -56,8 +56,8 @@ !! zhke = 1/2 [ mi-1( un^2 ) + mj-1( vn^2 ) ] !! * kscheme = nkeg_HW : Hollingsworth correction following !! Arakawa (2001). The now horizontal kinetic energy is given by: - !! zhke = 1/6 [ mi-1( 2 * un^2 + ((un(j+1)+un(j-1))/2)^2 ) - !! + mj-1( 2 * vn^2 + ((vn(i+1)+vn(i-1))/2)^2 ) ] + !! zhke = 1/6 [ mi-1( 2 * un^2 + ((un(j+1)+uu(j-1,jtn))/2)^2 ) + !! + mj-1( 2 * vn^2 + ((vn(i+1)+vv(i-1,jtn))/2)^2 ) ] !! !! Take its horizontal gradient and add it to the general momentum !! trend (ua,va). @@ -108,7 +108,7 @@ ii = idx_bdy(ib_bdy)%nbi(jb,igrd) ij = idx_bdy(ib_bdy)%nbj(jb,igrd) ifu = NINT( idx_bdy(ib_bdy)%flagu(jb,igrd) ) - un(ii-ifu,ij,jk) = un(ii,ij,jk) * umask(ii,ij,jk) + uu(ii-ifu,ij,jk,jtn) = uu(ii,ij,jk,jtn) * umask(ii,ij,jk) END DO END DO ! @@ -118,7 +118,7 @@ ii = idx_bdy(ib_bdy)%nbi(jb,igrd) ij = idx_bdy(ib_bdy)%nbj(jb,igrd) ifv = NINT( idx_bdy(ib_bdy)%flagv(jb,igrd) ) - vn(ii,ij-ifv,jk) = vn(ii,ij,jk) * vmask(ii,ij,jk) + vv(ii,ij-ifv,jk,jtn) = vv(ii,ij,jk,jtn) * vmask(ii,ij,jk) END DO END DO ENDIF @@ -131,10 +131,10 @@ DO jk = 1, jpkm1 DO jj = 2, jpj DO ji = fs_2, jpi ! vector opt. - zu = un(ji-1,jj ,jk) * un(ji-1,jj ,jk) & - & + un(ji ,jj ,jk) * un(ji ,jj ,jk) - zv = vn(ji ,jj-1,jk) * vn(ji ,jj-1,jk) & - & + vn(ji ,jj ,jk) * vn(ji ,jj ,jk) + zu = uu(ji-1,jj ,jk,jtn) * uu(ji-1,jj ,jk,jtn) & + & + uu(ji ,jj ,jk,jtn) * uu(ji ,jj ,jk,jtn) + zv = vv(ji ,jj-1,jk,jtn) * vv(ji ,jj-1,jk,jtn) & + & + vv(ji ,jj ,jk,jtn) * vv(ji ,jj ,jk,jtn) zhke(ji,jj,jk) = 0.25_wp * ( zv + zu ) END DO END DO @@ -144,15 +144,15 @@ DO jk = 1, jpkm1 DO jj = 2, jpjm1 DO ji = fs_2, jpim1 ! vector opt. - zu = 8._wp * ( un(ji-1,jj ,jk) * un(ji-1,jj ,jk) & - & + un(ji ,jj ,jk) * un(ji ,jj ,jk) ) & - & + ( un(ji-1,jj-1,jk) + un(ji-1,jj+1,jk) ) * ( un(ji-1,jj-1,jk) + un(ji-1,jj+1,jk) ) & - & + ( un(ji ,jj-1,jk) + un(ji ,jj+1,jk) ) * ( un(ji ,jj-1,jk) + un(ji ,jj+1,jk) ) + zu = 8._wp * ( uu(ji-1,jj ,jk,jtn) * uu(ji-1,jj ,jk,jtn) & + & + uu(ji ,jj ,jk,jtn) * uu(ji ,jj ,jk,jtn) ) & + & + ( uu(ji-1,jj-1,jk,jtn) + uu(ji-1,jj+1,jk,jtn) ) * ( uu(ji-1,jj-1,jk,jtn) + uu(ji-1,jj+1,jk,jtn) ) & + & + ( uu(ji ,jj-1,jk,jtn) + uu(ji ,jj+1,jk,jtn) ) * ( uu(ji ,jj-1,jk,jtn) + uu(ji ,jj+1,jk,jtn) ) ! - zv = 8._wp * ( vn(ji ,jj-1,jk) * vn(ji ,jj-1,jk) & - & + vn(ji ,jj ,jk) * vn(ji ,jj ,jk) ) & - & + ( vn(ji-1,jj-1,jk) + vn(ji+1,jj-1,jk) ) * ( vn(ji-1,jj-1,jk) + vn(ji+1,jj-1,jk) ) & - & + ( vn(ji-1,jj ,jk) + vn(ji+1,jj ,jk) ) * ( vn(ji-1,jj ,jk) + vn(ji+1,jj ,jk) ) + zv = 8._wp * ( vv(ji ,jj-1,jk,jtn) * vv(ji ,jj-1,jk,jtn) & + & + vv(ji ,jj ,jk,jtn) * vv(ji ,jj ,jk,jtn) ) & + & + ( vv(ji-1,jj-1,jk,jtn) + vv(ji+1,jj-1,jk,jtn) ) * ( vv(ji-1,jj-1,jk,jtn) + vv(ji+1,jj-1,jk,jtn) ) & + & + ( vv(ji-1,jj ,jk,jtn) + vv(ji+1,jj ,jk,jtn) ) * ( vv(ji-1,jj ,jk,jtn) + vv(ji+1,jj ,jk,jtn) ) zhke(ji,jj,jk) = r1_48 * ( zv + zu ) END DO END DO @@ -163,8 +163,8 @@ IF (ln_bdy) THEN ! restore velocity masks at points outside boundary - un(:,:,:) = un(:,:,:) * umask(:,:,:) - vn(:,:,:) = vn(:,:,:) * vmask(:,:,:) + uu(:,:,:,jtn) = uu(:,:,:,jtn) * umask(:,:,:) + vv(:,:,:,jtn) = vv(:,:,:,jtn) * vmask(:,:,:) ENDIF ! }}} {{{#!diff Index: TEST_FILES/dynvor.F90 ============================== }}} {{{#!diff Index: TEST_FILES/flo_oce.F90 ============================== --- TEST_FILES_ORG/flo_oce.F90 2019-02-08 10:51:12.000000000 +0000 +++ TEST_FILES/flo_oce.F90 2019-02-08 12:53:14.000000000 +0000 @@ -59,7 +59,7 @@ !!---------------------------------------------------------------------- !! *** FUNCTION flo_oce_alloc *** !!---------------------------------------------------------------------- - ALLOCATE( wb(jpi,jpj,jpk) , nfloat(jpnfl) , nisobfl(jpnfl) , ngrpfl(jpnfl) , & + ALLOCATE( ww(jpi,jpj,jpk,jtb) , nfloat(jpnfl) , nisobfl(jpnfl) , ngrpfl(jpnfl) , & & flxx(jpnfl) , flyy(jpnfl) , flzz(jpnfl) , & & tpifl(jpnfl) , tpjfl(jpnfl) , tpkfl(jpnfl) , STAT=flo_oce_alloc ) ! }}} {{{#!diff Index: TEST_FILES/floats.F90 ============================== --- TEST_FILES_ORG/floats.F90 2019-02-08 10:51:12.000000000 +0000 +++ TEST_FILES/floats.F90 2019-02-08 12:53:14.000000000 +0000 @@ -64,7 +64,7 @@ ! CALL flo_rst( kt ) ! trajectories restart ! - wb(:,:,:) = wn(:,:,:) ! Save the old vertical velocity field + ww(:,:,:,jtb) = ww(:,:,:,jtn) ! Save the old vertical velocity field ! IF( ln_timing ) CALL timing_stop('flo_stp') ! @@ -131,7 +131,7 @@ ! CALL flo_dom ! compute/read initial position of floats ! - wb(:,:,:) = wn(:,:,:) ! set wb for computation of floats trajectories at the first time step + ww(:,:,:,jtb) = ww(:,:,:,jtn) ! set wb for computation of floats trajectories at the first time step ! END SUBROUTINE flo_init }}} {{{#!diff Index: TEST_FILES/sbcfwb.F90 ============================== }}} Since the preview step must be completed before the PI starts the coding, the previewer(s) answers are expected to be completed within the two weeks after the PI has sent his request. \\ For each question, an iterative process should take place between PI and previewer(s) in order to reach a "YES" answer for each of the following questions. {{{#!TracForm #!subcontext preview_ #!submit_label 'Save Preview' ||= Questions =||= Answer =||= Comment =|| || Does the previewer agree with the proposed methodology? || [tf.select:2.1 -id=preform '' Yes No NR] || [tf.textarea:2.1c -id=preform 'Add a comment?' 50 10] || || Does the previewer agree with the proposed flowchart and list of routines to be changed? || [tf.select:2.2 -id=preform '' Yes No NR] || [tf.textarea:2.2c -id=preform 'Add a comment?' 50 10] || || Does the previewer agree with the proposed new list of variables, including agreement with coding rules? || [tf.select:2.3 -id=preform '' Yes No NR] || [tf.textarea:2.3c -id=preform 'Add a comment?' 50 10] || || Does the previewer agree with the proposed summary of updates in reference manual? || [tf.select:2.4 -id=preform '' Yes No NR] || [tf.textarea:2.4c -id=preform 'Add a comment?' 50 10] || || ... ... ... || [tf.select:2.X -id=preform '' Yes No NR] || [tf.textarea:2.Xc -id=preform 'Add a comment?' 50 10] || '''''Updated on [tf.form_updated_on:] by [tf.form_updater:]''''' }}} Once all "YES" have been reached, the PI can start the development into his development branch. }}} {{{#!Fold title=Tests tag=h2 [=#tests] Once the development is done, the PI should complete this section below and ask the reviewers to start their review in the lower section. {{{#!TracForm #!subcontext tests #!submit_label 'Save Tests' ||= Questions =||= Answer =||= Comment =|| || Can this change be shown to produce expected impact? (if option activated)? || [tf.select:3.1 -id=piform '' Yes No NR] || [tf.textarea:3.1c -id=piform 'Add a comment?' 50 10] || || Can this change be shown to have a null impact? (if option not activated) || [tf.select:3.2 -id=piform '' Yes No NR] || [tf.textarea:3.2c -id=piform 'Add a comment?' 50 10] || || Detailed results of restartability and reproducibility when the option is activated. Please indicate the configuration used for this test || [tf.select:3.3 -id=piform '' Yes No NR] || [tf.textarea:3.3c -id=piform 'Add a comment?' 50 10] || || Detailed results of SETTE tests (restartability and reproducibility for each of the reference configuration) || [tf.select:3.4 -id=piform '' Yes No NR] || [tf.textarea:3.4c -id=piform 'Add a comment?' 50 10] || || Results of the required bit comparability tests been run: Are there no differences when activating the development? || [tf.select:3.5 -id=piform '' Yes No NR] || [tf.textarea:3.5c -id=piform 'Add a comment?' 50 10] || || If some differences appear, is reason for the change valid/understood? || [tf.select:3.6 -id=piform '' Yes No NR] || [tf.textarea:3.6c -id=piform 'Add a comment?' 50 10] || || If some differences appear, is the !ticket describing in detail the impact this change will have on model configurations? || [tf.select:3.7 -id=piform '' Yes No NR] || [tf.textarea:3.7c -id=piform 'Add a comment?' 50 10] || || Is this change expected to preserve all diagnostics? || [tf.select:3.8 -id=piform '' Yes No NR] || [tf.textarea:3.8c -id=piform 'Add a comment?' 50 10] || || If no, is reason for the change valid/understood? || [tf.select:3.9 -id=piform '' Yes No NR] || [tf.textarea:3.9c -id=piform 'Add a comment?' 50 10] || || Are there significant changes in run time/memory? || [tf.select:3.10 -id=piform '' Yes No NR] || [tf.textarea:3.10c -id=piform 'Add a comment?' 50 10] || || ... ... ... || [tf.select:3.XX -id=piform '' Yes No NR] || [tf.textarea:3.XXc -id=piform 'Add a comment?' 50 10] || '''''Updated on [tf.form_updated_on:] by [tf.form_updater:]''''' }}} }}} {{{#!Fold title=Review tag=h2 [=#review] A successful review is needed to schedule the merge of this development into the future NEMO release during next Merge Party (usually in November). {{{#!TracForm #!subcontext review #!submit_label 'Save Review' === Code changes and documentation ||= Question =||= Answer =||= Comment =|| || Is the proposed methodology now implemented? || [tf.select:3.11 -id=revform '' Yes No NR] || [tf.textarea:3.11c -id=revform 'Add a comment?' 50 10] || || Are the code changes in agreement with the flowchart defined at Preview step? || [tf.select:3.12 -id=revform '' Yes No NR] || [tf.textarea:3.12c -id=revform 'Add a comment?' 50 10] || || Are the code changes in agreement with list of routines and variables as proposed at Preview step? \\If not, are the discrepancies acceptable? || [tf.select:3.13 -id=revform '' Yes No NR] || [tf.textarea:3.13c -id=revform 'Add a comment?' 50 10] || || Is the in-line documentation accurate and sufficient? || [tf.select:3.14 -id=revform '' Yes No NR] || [tf.textarea:3.14c -id=revform 'Add a comment?' 50 10] || || Do the code changes comply with NEMO coding standards? || [tf.select:3.15 -id=revform '' Yes No NR] || [tf.textarea:3.15c -id=revform 'Add a comment?' 50 10] || || Is the !ticket of development documented with sufficient details for others to understand the impact of the change? || [tf.select:3.16 -id=revform '' Yes No NR] || [tf.textarea:3.16c -id=revform 'Add a comment?' 50 10] || || Are the reference manual tex files now updated following the proposed summary in preview section? || [tf.select:3.17 -id=revform '' Yes No NR] || [tf.textarea:3.17c -id=revform 'Add a comment?' 50 10] || || Is there a need for some documentation on the web pages (in addition to in-line and reference manual)? \\If yes, please describe and ask PI. A yes answer must include all documentation available. || [tf.select:3.18 -id=revform '' Yes No NR] || [tf.textarea:3.18c -id=revform 'Add a comment?' 50 10] || || ... ... ... || [tf.select:3.XX -id=revform '' Yes No NR] || [tf.textarea:3.XXc -id=revform 'Add a comment?' 50 10] || ==== Review Summary Is the review fully successful? [tf.select:status -id=revform '' Yes No] [tf.textarea:comment -id=revform 'If not, please indicate what is still missing.' 50 10] '''''Updated on [tf.form_updated_on:] by [tf.form_updater:]''''' }}} Once review is successful, the development must be scheduled for merge during next Merge Party Meeting. }}}