Changes between Version 2 and Version 3 of Ticket #627
- Timestamp:
- 03/13/14 18:44:26 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #627 – Description
v2 v3 1 '''This is a very important update'''. It includes changes on how sponge areas are specified. A sponge is an area of increased horizontal viscosity and/or diffusivity. It also includes changes to the processing of climatology fields and nudging of climatology fields. These changes are made to activate or not such capabilities during nesting over multiple grids. Several C-preprocessing options are eliminated and replaced with logical switches that read from standard input '''ocean.in''' and, if appropriate, from biology and sediment input scripts. 1 '''This is a very important update'''. Please read careful since it is loaded with information that will be useful when setting realistic applications. 2 3 It includes changes on how sponge areas are specified. A sponge is an area of increased horizontal viscosity and/or diffusivity. It also includes changes to the processing of climatology fields and nudging of climatology fields. These changes are made '''to activate or not''' such capabilities during nesting over multiple grids. Several C-preprocessing options are eliminated and replaced with logical switches that read from standard input '''ocean.in''' and, if appropriate, from biology and sediment input scripts. 2 4 3 5 ---- … … 44 46 '''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 47 46 Consequently, the header file '''ana_hmixcoef.h''' is deprecated and replaced with '''ana_sponge.h'''. So if you were us ed this capability before inolder 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.48 Consequently, the header file '''ana_hmixcoef.h''' is deprecated and replaced with '''ana_sponge.h'''. So if you were using this capability before with 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 49 48 50 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. … … 101 103 LnudgeTCLM == F F ! temperature, salinity, inert 102 104 }}} 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.105 The switches for biological and sediment tracers 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. This is done with two switches because the processing of climatology in ROMS is used for various options and not just nudging. 104 106 105 107 '''Nudging Inverse Time Scales''': The inverse nudging scales (1/time) can be read from new NetCDF file '''NUDNAME''' in '''ocean.in''': … … 109 111 NUDNAME == ocean_nud.nc 110 112 }}} 111 or set with analytical functions used '''new''' CPP option '''ANA_NUDGCOEF'''. The inverse nudging scales are stored in ROMS in the following variables:113 or set with analytical functions when the '''new''' CPP option '''ANA_NUDGCOEF''' is activated. The inverse nudging scales are stored in ROMS in the following variables: 112 114 {{{ 113 115 CLIMA(ng) % M2nudgcof(i,j) 2D momentum … … 115 117 CLIMA(ng) % Tnudgcof(i,j,k,itrc) Tracers 116 118 }}} 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 anspecific depth (say, z=-2000m).119 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 a specific depth (say, z=-2000m). 118 120 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:121 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 new '''NUDNAME''' NetCDF file. The metadata for the NetCDF variables is as follows: 120 122 {{{ 121 123 double M2_NudgeCoef(eta_rho, xi_rho) ; … … 144 146 salt_NudgeCoef:coordinates = "xi_rho eta_rho s_rho " ; 145 147 }}} 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. 148 A template script '''d_nudgcoef.m''' is provided in the matlab/initial repository to create this new NetCDF file. 149 150 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 give us 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. 151 152 ''' WARNING:''' The header file '''ana_nudgcoef.h''' was modified to include depth dependency in the nudging inverse time scales. The routine is simpler now. However, please use the NetCDF file instead to avoid parallel coding errors. Recall that you can plot and fine tune the variables outside of ROMS. 153 154 If passive/active radiation open boundary conditions and activated climatology nudging, the inverse time scales are used directly in the open boundary conditions routines instead of the uniform variables '''*obc_out''' and '''*obc_in'''. Notice that this logic was removed from '''ana_nudgcoef.h'''. 155 156 ---- 157 158 Again, please use the NetCDF options discussed above instead of coding with analytical functions. We keep these analytical functions as part of the legacy code. Coding such routines require extensive parallel expertise. So if you are in doubt, set a NetCDF file instead. It is much easier. I will ignore forum messages asking for help or guidance how to code such analytical functions. 159 160 This constitutes the final piece in the nesting algorithms. I have seen some nesting inquires in the forum. Nesting requires expertise to set-up and a lot of patience. There are a lot things that you need to think when setting a nesting application: dynamical regimes, atmospheric forcing, volume/mass conservation, grid topology, bathymetry, land/sea masking, and so on. You just cannot put a nesting grid anywhere! Many users think about nesting as a grid generation problem, but it is much more than that. We cannot provide you with a cooking recipe for nesting so you just need to get your hands dirty and try various strategies until you find one that works for your particular application.