[[PageOutline]] Last edited [[Timestamp]] [[BR]] '''Author''' : Rachel Furner '''ticket''' : #465 '''Branch''' : [https://forge.ipsl.jussieu.fr/nemo/browser/branches/DEV_R1821_Rivers] ---- === Description === The river runoff has been seperated from emp and emps throughout the code. This has been done by creating a new 2d variable rnf, and replacing emp and emps with 'emp - rnf' and 'emps - rnf' where ever appropriate. This meant changing the following files; SBC/sbc_oce.F90 cla.F90 cla_div.F90 cla_dynspg.F90 BDY/bdyvol.F90 DIA/diawri.F90 DIA/diawri_dimg.h90 DYN/dynspg_flt.F90 DYN/dynspg_ts.F90 DYN/sshwzv.F90 OBC/obcvol.F90 SBC/sbcmod.F90 ZDF/zdfkpp.F90 DIA/diafwb.F90 DOM/closea.F90 SBC/sbcfwb.F90 SBC/sbc_oce.F90 Then the option was included for the user to specify the temperature and salinity or the river runoff, as well specifying a depth for which the river runoff will be added (this includes being able to specify adding throughout the water column, and into the surface layer only). These changes are applied in sbcrnf and trasbc. In sbcrnf the routine is amended to define extra variables, and read in/calculate the extra info, then in trasbc the adjustment to temperature and salinity now includes an adjustment due to the river qualities. For more information on this change please see the word document attached to the ticket (465). ---- === Testing === Testing could consider (where appropriate) other configurations in addition to NVTK]. ||NVTK Tested||!'''NO'''|| ||Other model configurations||!'''NO'''|| ||Processor configurations tested||[ Enter processor configs tested here ]|| ||If adding new functionality please confirm that the [[BR]]New code doesn't change results when it is switched off [[BR]]and !''works!'' when switched on||!'''YES'''|| (Answering UNSURE is likely to generate further questions from reviewers.) The code was tested to ensure it did not interfere with the original code by running with ln_rnf_att=false, (for both the linear free surface and the vvl case) and running the original code. An ncdiff showed the output to be identical. It was also run with ln_rnf_att=true, but specifying river conditions which should give the same result as the original code, again they were identical. The new code was run with initial conditions of 0oC and 0psu everywhere adding one river also of 0oC and 0psu, and as expected there was a change in ssh only. The change in ssh is exactly the same as in the original coding, and shows that the new code has not caused any problems in the ssh calculation. The total change in volume over the whole domain (running without bdy) for each time step was also calculated, and this equalled the amount of water being added by the river at each time step. When running with fresh water the new code gives exactly the same output as the original, showing the dilution effect works as it should. To test the linear free surface case the difference in salinity and temperature from before and after the river runoff is included was outputted. This was run using both fresh water rivers, with no temperature specified, to check the dilution effect, and with low salinity river, with a temperature specified, to asses the direct tracer flux. The depth to which the river water is added was also varied, the river was added into the surface box only, throughout the water depth and to a specified depth in between (50m, where the bathymetry was ~91m). For each run the code gave changes in only the grid boxes expected and of the correct amount, showing the code affects only the intended boxes, and changes the temperature and salinity in them as expected. To test the non linear free surface case the code was run with a fresh river, without any temperature changes, adding the river only at the surface, this gave exactly the same distribution of salinity and temperature as the original code, so it can be assumed the code works fine for the dilution effect. The model was run with initial conditions of 10oC and 35.5psu everywhere, with one river of 10oC and 35.5psu. There should be a change in ssh only, as the direct flux should be exactly equal and opposite to the dilution effect. A run of just over 22 days with one river shows absolutely no change in salinity or temperature, implying the direct flux also works as expected. All testing was done with the met office AMM configuration, both with and without vvl. This is an s-coordinate configuration, with key_bdy. === Bit Comparability === ||Does this change preserve answers in your tested standard configurations (to the last bit) ?||!'''YES/NO !'''|| ||Does this change bit compare across various processor configurations. (1xM, Nx1 and MxN are recommended)||!'''YES/NO!'''|| ||Is this change expected to preserve answers in all possible model configurations?||!'''YES'''|| ||Is this change expected to preserve all diagnostics? [[BR]]!,,!''Preserving answers in model runs does not necessarily imply preserved diagnostics. !''||!'''YES'''|| If you answered !'''NO!''' to any of the above, please provide further details: * Which routine(s) are causing the difference? * Why the changes are not protected by a logical switch or new section-version * What is needed to achieve regression with the previous model release (e.g. a regression branch, hand-edits etc). If this is not possible, explain why not. * What do you expect to see occur in the test harness jobs? * Which diagnostics have you altered and why have they changed?Please add details here........ ---- === System Changes === ||Does your change alter namelists?||!'''YES '''|| ||Does your change require a change in compiler options?||!'''NO'''|| If any of these apply, please document the changes required here....... The namelist must be amended so namsbc_rnf is: !----------------------------------------------------------------------- &namsbc_rnf ! runoffs namelist surface boundary condition !----------------------------------------------------------------------- ! ! file name ! frequency (hours) ! variable ! time interpol. ! clim ! 'yearly'/ ! weights ! rotation ! ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! cn_dir = './' ! root directory for the location of the runoff files ln_rnf_emp = .false. ! runoffs included into precipitation field (T) or into a file (F) sn_rnf = 'AMM_rivers' , 24 , 'rorunoff' , .false. , .true. , 'daily' , '' , '' sn_cnf = 'runoff_1m_nomask' , 0 , 'socoefr' , .false. , .true. , 'yearly' , '' , '' sn_sal_rnf = 'AMM_rivers' , 24 , 'rosaline' , .false. , .true. , 'daily' , '' , '' sn_tmp_rnf = 'AMM_rivers' , 24 , 'rotemper' , .false. , .true. , 'daily' , '' , '' sn_dep_rnf = 'AMM_rivers' , 24 , 'rodepth' , .false. , .true. , 'daily' , '' , '' ln_rnf_mouth = .false. ! specific treatment at rivers mouths rn_hrnf = 1000.e0 ! depth over which enhanced vertical mixing is used rn_avt_rnf = 10.e0 ! value of the additional vertical mixing coef. [m2/s] rn_rfact = 1.e0 ! multiplicative factor for runoff ln_rnf_att = .true. ! read in salinity, temperature and depth information for runoff / ---- === Resources === !''Please !''summarize!'' any changes in runtime or memory use caused by this change......!'' ---- === IPR issues === ||Has the code been wholly (100%) produced by NEMO developers staff working exclusively on NEMO?||!'''YES'''|| If No: * Identify the collaboration agreement details * Ensure the code routine header is in accordance with the agreement, (Copyright/Redistribution etc).Add further details here if required..........