= WAVE|INGV-1 Clementi: Wave-current interaction processes implementation according to the WAVE WG needs 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.[[BR]] == Help {{{#!html The action has to be detailed briefly in the 'Summary' sub-page (ordinary wiki page) for later inclusion in other pages. Out of this, the rest of the page can be edited on-line inside the form fields considering the following color code given hereafter.
Record your modifications for the section you have edited by clicking on the corresponding button at the end of the section (). Just above, the timestamp of the record will be updated. }}} {{{#!div class="important" Apart from the case of 'Summary' section (inclusion of sub-page), 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. }}} {{{#!div style="margin-left:25px" {{{#!th Role }}} {{{#!th Link(s) }}} |- {{{#!td style="background:lightgrey" PI(S) }}} {{{#!td style="background:lightgrey" {{{#!td width="100px" style="background:lightgrey; border:none" 1. [#summary Summary] }}} {{{#!td width="100px" style="border:none" 2. [#abstract Abstract] }}} {{{#!td width="100px" style="border:none" 4. [#tests Tests] }}} }}} |- {{{#!td style="background:lightblue" Previewer(s) }}} {{{#!td style="background:lightblue" 3. [#preview Preview] }}} |- {{{#!td style="background:lightgreen" Reviewer(s) }}} {{{#!td style="background:lightgreen" 5. [#review Review] }}} }}} == Summary [=#summary] {{{#!div class="important" '''Link for editing the summary''':[[ExtractUrl(./Summary)]] }}} {{{#!div style="background:lightgrey" [[Include(./Summary)]] }}} == Abstract [=#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 'The objective of this development is the implementation of wave-current interaction processes according to the WAVE WG outcomes (see Wave-coupling WG wiki page ​https://forge.ipsl.jussieu.fr/nemo/wiki/WorkingGroups/Wave_Coupling ).\nIn particular the following processes are included:\n*New Vertical Stokes Drift computation according to Breivik et al., 2014: “Approximate Stokes Drift Profiles in Deep Water”.\n*Vertical Turbulence: implement the Qiao (2010) formulation (works with all the vertical closure schemes).\n*Modification of the surface vertical velocity accounting for the Stokes Drift.\n*Computation of the Stokes-Coriolis Force.\n*Inclusion of the Stokes drift components in the tracer advection term.\n*Generalization of the surface boundary condition for momentum accounting for the wave effects.' 0 20] === Implementation === [tf.textarea:implementation -id=piform -class=taform 'Modifications in namelist namsbc:\nln_wave: Acticvates coupling with waves\nln_cdgw: Neutral drag coefficient read from wave model\nln_sdw: Computation of 3D stokes drift\nln_tauoc: Activates ocean stress modified by external wave induced stress\nln_stcor: Activates Stokes Coriolis term\n\nModifications in namelist namzdf:\nln_zdfqiao: Activates enhanced wave vertical mixing Qiao (2010)\n\nModifications in nabsbc_wave ! External fields from wave model\nsn_cdg\nsn_usd\nsn_vsd\nsn_swh\nsn_wmp\nsn_wnum\nsn_tauoc\n\nFlow chart of the changes in the code:\n1) Main differences are in sbcwave.F90:\n* Reads all the wave parameters needed for the coupling from an external wave model (Zonal and Meridional Surface Stokes Drift, Mean Wavenumeber, Significant Wave Height, Mean Wave Period, Neutral Drag Coefficient, Normalized stress into the ocean)\n* Computes the 3D and Vertical components of the Stokes Drift according to Breivik et al., 2014 (upgrade with respect to monochromatic approximation)\n\n2) sshwzv.F90 : Modification of the Surface vertical velocity accounting for the Stokes Drift\n\nIF ( ln_wave .AND. ln_sdw ) THEN\n! Compute d(ssh)/dx and d(ssh)/dy\n! Compute the surface vertical velocity accounting for the Stokes Drift\n!---------------------------------\nDO jj = 2 , jpjm1\nDO ji = 2 , jpim1\ndsshnu = ( ssha(ji+1,jj) - ssha(ji,jj) ) / e1u(ji,jj)\ndsshnv = ( ssha(ji,jj+1) - ssha(ji,jj) ) / e2v(ji,jj)\nwn(ji,jj,1) = wn(ji,jj,1) +( usd3dt(ji,jj,1) * dsshnu &\n& + vsd3dt(ji,jj,1) * dsshnv &\n& - ( wsd3d (ji,jj,1) )) * tmask(ji,jj,1)\nENDDO\nENDDO\nENDIF\n\n3) traadv.F90 : Modification of the tracer advection due to the Stokes Drift\nIF (ln_wave .AND. ln_sdw) THEN\nDO jk = 1, jpkm1\nzun(:,:,jk) = e2u(:,:) * fse3u(:,:,jk) * &\n& ( un(:,:,jk) + usd3d(:,:,jk) ) !eulerian transport + Stokes Drift\nzvn(:,:,jk) = e1v(:,:) * fse3v(:,:,jk) * &\n& ( vn(:,:,jk) + vsd3d(:,:,jk) )\nzwn(:,:,jk) = e1e2t(:,:) * &\n& ( wn(:,:,jk) + wsd3d(:,:,jk) )\nEND DO\nELSE (no changes in wn wn)\n\n4) sbcmod.F90 : Surface boundary condition for the momentum\nIF (ln_wave .AND. ln_tauoc) THEN\nutau(:,:) = utau(:,:)*tauoc_wave(:,:)\nvtau(:,:) = vtau(:,:)*tauoc_wave(:,:)\ntaum(:,:) = taum(:,:)*tauoc_wave(:,:)\nENDIF\n\n5) dynstcor.F90 : Add Stokes-Coriolis forcing to horizontal momentum equation\nDO jk = 1, jpkm1\nDO jj = 2, jpjm1\nDO ji = 2, jpim1\nzy1 = ff(ji ,jj-1) * ( vsd3d(ji ,jj-1,jk) + vsd3d(ji+1,jj-1,jk) )\nzy2 = ff(ji ,jj ) * ( vsd3d(ji ,jj ,jk) + vsd3d(ji+1,jj ,jk) )\nzx1 = ff(ji-1,jj ) * ( usd3d(ji-1,jj ,jk) + usd3d(ji-1,jj+1,jk) )\nzx2 = ff(ji ,jj ) * ( usd3d(ji ,jj ,jk) + usd3d(ji ,jj+1,jk) )\nua(ji,jj,jk) = ua(ji,jj,jk) + 0.25 * ( zy1 + zy2 ) *umask(ji,jj,jk)\nva(ji,jj,jk) = va(ji,jj,jk) - 0.25 * ( zx1 + zx2 ) *vmask(ji,jj,jk)\nENDDO\nENDDO\nENDDO\n\n6) zdfqiao.F90 (new) : compute QBv = Qiao terms to be added to vertical eddy diffusivity and viscosity coefficients\nDO jk = 1, jpk\nDO jj = 1, jpjm1\nDO ji = 1, jpim1\nQBv(ji,jj,jk) = 1.0 * 0.353553 * swh(ji,jj) * tsd2d(ji,jj) * &\n& exp(3.0 * wnum(ji,jj) * &\n& (-MIN( fsdept(ji ,jj ,jk) , fsdept(ji+1,jj ,jk), &\n& fsdept(ji ,jj+1,jk) , fsdept(ji+1,jj+1,jk))))\nEND DO\nEND DO\nEND DO\n\n7) step.F90 : added calls to dyn_stcor and zdf_qiao' 0 20] === Reference manual and web pages updates === [tf.textarea:manual -id=piform -class=taform 'Add new section in paragraph 7 on Surface Boundary conditions on "Wave coupling".\nThis should include:\n1) introduction on wave coupling;\n2) namelist specifications to include the wave coupling;\n3) sub-sections on each interaction process that can be activated.' 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. == Preview [=#preview] 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.[[BR]]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. == Tests [=#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:]''''' }}} == Review [=#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?[[BR]]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)?[[BR]]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__'''[[BR]] Is the review fully successful?[tf.select:status -id=revform '' Yes No][[BR]] [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.