| 44 | '''WARNING''': The routine '''ini_hmixcoef.F''' was modified. It initializes the viscosity and diffusion arrays with the constant (uniform) values specified in standard input file(s). Then if '''VISC_GRID''' and/or '''DIFF_GRID''' are activated, it scales the horizontal mixing values according to the maximum grid size; the value read from standard input is assigned to cell with the larger area. Finally, if '''!LuvSponge(ng)''' and/or '''!LtracerSponge(itrc,ng)''' are turned '''ON''' and '''ANA_SPONGE''' is not defined, it multiples the horizontal mixing arrays with the sponge factors '''visc_factor''' and '''diff_factor''' described above. Check routine for more details. |
| 45 | |
| 46 | Consequently, the header file '''ana_hmixcoef.h''' is deprecated and replaced with '''ana_sponge.h'''. So if you were used this capability before in older ROMS versions, you need to code your sponge areas in the new header file '''ana_sponge.h'''. This is a much simpler file. Notice that the routine '''ini_hmixcoef''' is called before than '''ana_sponge''' is called. Therefore, users have two options: ('''1''') completely overwrite the horizontal mixing coefficient assigned earlier in '''ini_hmixcoef''', or ('''2''') only increase horizontal mixing in the sponge areas. The sponge areas in '''ana_sponge''' can be coded as a non-dimensional factor as it is done in '''ini_hmixcoef''' with '''visc_factor''' and '''diff_factor'''. Or a complete overwrite, which is not recommended if either '''VISC_GRID''' and '''DIFF_GRID''' are activated. |
| 47 | |
| 48 | Again, it is much easier to add the sponge scales '''visc_factor''' and '''diff_factor''' to the application GRID NetCDF file. '''Please follow this advice. |
| 49 | ''' |
| 50 | |
59 | | The sea-surface height (SSH) climatology. '''CLIMA(ng)%ssh''', is not used but it is kept for future use. The nudging of SSH on the free-surface governing equation (vertically integrated continuity equation) is '''not''' allowed because it violates mass/volume conservation. Recall that the time rate of change of free-surface is computed from the divergence of '''ubar''' and '''vbar'''. If such nudging term is required, it needs to be specified on the momentum equations for ('''u''','''v''') and/or ('''ubar''','''vbar'''). If done on ('''u''','''v''') only, its effects enter the 2D momentum equations via the residual vertically integrated forcing term. |
| 66 | The sea-surface height (SSH) climatology. '''CLIMA(ng)%ssh''', is not used but it is kept for future use. The nudging of SSH on the free-surface governing equation (vertically integrated continuity equation) is '''not''' allowed because it violates mass/volume conservation. Recall that the time rate of change of free-surface is computed from the divergence of '''ubar''' and '''vbar'''. If such nudging term is required, it needs to be specified on the momentum equations for ('''u''','''v''') and/or ('''ubar''','''vbar'''). If done on ('''u''','''v''') only, its effects enter the 2D momentum equations via the residual vertically integrated forcing terms ('''rufrc''', '''rvfrc'''). |
| 103 | The switches for biological and sediment tracer are specified in their respective input scripts. Users also need activate the respective switches to process the climatology fields to nudge: '''Lm2CLM''', '''Lm3CLM''', and '''LtracerCLM''', respectively. |
| 104 | |
| 105 | '''Nudging Inverse Time Scales''': The inverse nudging scales (1/time) can be read from new NetCDF file '''NUDNAME''' in '''ocean.in''': |
| 106 | {{{ |
| 107 | ! Input climatology nudging coefficients file name. |
| 108 | |
| 109 | NUDNAME == ocean_nud.nc |
| 110 | }}} |
| 111 | or set with analytical functions used '''new''' CPP option '''ANA_NUDGCOEF'''. The inverse nudging scales are stored in ROMS in the following variables: |
| 112 | {{{ |
| 113 | CLIMA(ng) % M2nudgcof(i,j) 2D momentum |
| 114 | CLIMA(ng) % M3nudgcof(i,j,k) 3D momentum |
| 115 | CLIMA(ng) % Tnudgcof(i,j,k,itrc) Tracers |
| 116 | }}} |
| 117 | Notice that now the nudging scales for 3D momentum and tracers has a depth dependency. This will be handy, for example, when relaxing temperature and salinity to climatology below an specific depth (say, z=-2000m). |
| 118 | |
| 119 | In order to allow complex nudging distributions, I '''highly recommend''' users to set the nudging inverse time scales outside of ROMS and write into the '''NUDNAME''' NetCDF file. The metadata for the NetCDF variables is as follows: |
| 120 | {{{ |
| 121 | double M2_NudgeCoef(eta_rho, xi_rho) ; |
| 122 | M2_NudgeCoef:long_name = "2D momentum inverse nudging coefficients" ; |
| 123 | M2_NudgeCoef:units = "day-1" ; |
| 124 | M2_NudgeCoef:coordinates = "xi_rho eta_rho " ; |
| 125 | |
| 126 | double M3_NudgeCoef(s_rho, eta_rho, xi_rho) ; |
| 127 | M3_NudgeCoef:long_name = "3D momentum inverse nudging coefficients" ; |
| 128 | M3_NudgeCoef:units = "day-1" ; |
| 129 | M3_NudgeCoef:coordinates = "xi_rho eta_rho s_rho " ; |
| 130 | |
| 131 | double tracer_NudgeCoef(s_rho, eta_rho, xi_rho) ; |
| 132 | tracer_NudgeCoef:long_name = "generic tracer inverse nudging coefficients" ; |
| 133 | tracer_NudgeCoef:units = "day-1" ; |
| 134 | tracer_NudgeCoef:coordinates = "xi_rho eta_rho s_rho " ; |
| 135 | |
| 136 | double temp_NudgeCoef(s_rho, eta_rho, xi_rho) ; |
| 137 | temp_NudgeCoef:long_name = "temp inverse nudging coefficients" ; |
| 138 | temp_NudgeCoef:units = "day-1" ; |
| 139 | temp_NudgeCoef:coordinates = "xi_rho eta_rho s_rho " ; |
| 140 | |
| 141 | double salt_NudgeCoef(s_rho, eta_rho, xi_rho) ; |
| 142 | salt_NudgeCoef:long_name = "salt inverse nudging coefficients" ; |
| 143 | salt_NudgeCoef:units = "day-1" ; |
| 144 | salt_NudgeCoef:coordinates = "xi_rho eta_rho s_rho " ; |
| 145 | }}} |
| 146 | A new routine get_nudgcoef.F is added to read these nudging inverse time scales. This routine will check the '''units''' attribute to convert the scales to 1/second. If the nudging scales for a specific tracer are available (say '''salt_NudgCoef''') it will read that NetCDF variable. If '''not and''' the generic scales are available ('''tracer_NudgeCoef'''), it will process those values instead. This strategy will give a lot of flexibility when setting nudging for a particular application. The generic '''tracer_NudgeCoef''' variable is useful when nudging passive (biology and sediment) tracers. |