def set_parameter(self, vs): vs.identifier = '4deg' vs.nx, vs.ny, vs.nz = 90, 40, 15 vs.dt_mom = 1800.0 vs.dt_tracer = 86400.0 vs.runlen = 200.0*360*86400 vs.coord_degree = True vs.enable_cyclic_x = True vs.congr_epsilon = 1e-8 vs.congr_max_iterations = 20000 vs.enable_neutral_diffusion = True vs.K_iso_0 = 1000.0 vs.K_iso_steep = 1000.0 vs.iso_dslope = 4. / 1000.0 vs.iso_slopec = 1. / 1000.0 vs.enable_skew_diffusion = True vs.enable_hor_friction = True vs.A_h = (4 * vs.degtom)**3 * 2e-11 vs.enable_hor_friction_cos_scaling = True vs.hor_friction_cosPower = 1 vs.enable_implicit_vert_friction = True vs.enable_tke = True vs.c_k = 0.1 vs.c_eps = 0.7 vs.alpha_tke = 30.0 vs.mxl_min = 1e-8 vs.tke_mxl_choice = 2 vs.kappaM_min = 2e-4 vs.kappaH_min = 2e-5 vs.enable_kappaH_profile = True vs.enable_tke_superbee_advection = True vs.enable_eke = True vs.eke_k_max = 1e4 vs.eke_c_k = 0.4 vs.eke_c_eps = 0.5 vs.eke_cross = 2. vs.eke_crhin = 1.0 vs.eke_lmin = 100.0 vs.enable_eke_superbee_advection = True vs.enable_idemix = False vs.enable_idemix_hor_diffusion = True vs.enable_eke_diss_surfbot = True vs.eke_diss_surfbot_frac = 0.2 vs.enable_idemix_superbee_advection = True vs.eq_of_state_type = 5 # custom variables vs.nmonths = 12 vs.variables.update( sss_clim=Variable('sss_clim', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), sst_clim=Variable('sst_clim', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), qnec=Variable('qnec', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), qnet=Variable('qnet', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), taux=Variable('taux', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), tauy=Variable('tauy', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), )
def set_parameter(self, vs): vs.identifier = 'na' vs.nx, vs.ny, vs.nz = 250, 350, 50 vs.x_origin = -98. vs.y_origin = -18. vs._x_boundary = 17.2 vs._y_boundary = 70. vs._max_depth = 5800. vs.dt_mom = 3600. / 2. vs.dt_tracer = 3600. / 2. vs.runlen = 86400 * 365. * 10. vs.coord_degree = True vs.congr_epsilon = 1e-10 vs.congr_max_iterations = 20000 vs.enable_neutral_diffusion = True vs.enable_skew_diffusion = True vs.K_iso_0 = 1000.0 vs.K_iso_steep = 200.0 vs.iso_dslope = 1. / 1000.0 vs.iso_slopec = 4. / 1000.0 vs.enable_hor_friction = True vs.A_h = 1e3 vs.enable_hor_friction_cos_scaling = True vs.hor_friction_cosPower = 1 vs.enable_tempsalt_sources = True vs.enable_implicit_vert_friction = True vs.enable_tke = True vs.c_k = 0.1 vs.c_eps = 0.7 vs.alpha_tke = 30.0 vs.mxl_min = 1e-8 vs.tke_mxl_choice = 2 vs.kappaM_min = 2e-4 vs.kappaH_min = 2e-5 vs.enable_kappaH_profile = True vs.K_gm_0 = 1000.0 vs.enable_eke = False vs.enable_idemix = False vs.eq_of_state_type = 5 vs.variables.update({ 'sss_clim': Variable('sss_clim', ('xt', 'yt', 12), 'g/kg', 'Monthly sea surface salinity'), 'sst_clim': Variable('sst_clim', ('xt', 'yt', 12), 'deg C', 'Monthly sea surface temperature'), 'sss_rest': Variable('sss_rest', ('xt', 'yt', 12), 'g/kg', 'Monthly sea surface salinity restoring'), 'sst_rest': Variable('sst_rest', ('xt', 'yt', 12), 'deg C', 'Monthly sea surface temperature restoring'), 't_star': Variable('t_star', ('xt', 'yt', 'zt', 12), 'deg C', 'Temperature sponge layer forcing'), 's_star': Variable('s_star', ('xt', 'yt', 'zt', 12), 'g/kg', 'Salinity sponge layer forcing'), 'rest_tscl': Variable('rest_tscl', ('xt', 'yt', 'zt'), '1/s', 'Forcing restoration time scale'), 'taux': Variable('taux', ('xt', 'yt', 12), 'N/s^2', 'Monthly zonal wind stress'), 'tauy': Variable('tauy', ('xt', 'yt', 12), 'N/s^2', 'Monthly meridional wind stress'), })
def set_parameter(self, vs): vs.identifier = '4deg' vs.nx, vs.ny, vs.nz = 90, 40, 15 vs.dt_mom = 1800.0 vs.dt_tracer = 86400.0 vs.dt_bio = vs.dt_tracer // 4 vs.runlen = 0. vs.trcmin = 0 vs.enable_npzd = True vs.enable_carbon = True with open(os.path.join(BASE_PATH, 'npzd.yml')) as yaml_file: cfg = yaml.safe_load(yaml_file)['npzd'] vs.npzd_selected_rules = cfg['selected_rules'] vs.remineralization_rate_detritus = 0.09 / 86400 vs.bbio = 1.038 vs.cbio = 1.0 vs.maximum_growth_rate_phyto = 0.23 / 86400 vs.maximum_grazing_rate = 0.13 / 86400 vs.fast_recycling_rate_phytoplankton = 0.025 / 86400 vs.specific_mortality_phytoplankton = 0.035 / 86400 vs.quadric_mortality_zooplankton = 0.06 / 86400 vs.zooplankton_growth_efficiency = 0.60 vs.assimilation_efficiency = 0.5 vs.wd0 = 2 / 86400 vs.mwz = 1000 vs.mw = 0.02 / 86400 vs.dcaco3 = 2500 vs.coord_degree = True vs.enable_cyclic_x = True vs.congr_epsilon = 1e-8 vs.congr_max_iterations = 20000 vs.enable_neutral_diffusion = True vs.K_iso_0 = 1000.0 vs.K_iso_steep = 500.0 vs.iso_dslope = 0.001 vs.iso_slopec = 0.001 vs.enable_skew_diffusion = True vs.enable_hor_friction = True vs.A_h = (4 * vs.degtom)**3 * 2e-11 vs.enable_hor_friction_cos_scaling = True vs.hor_friction_cosPower = 1 vs.enable_implicit_vert_friction = True vs.enable_tke = True vs.c_k = 0.1 vs.c_eps = 0.7 vs.alpha_tke = 30.0 vs.mxl_min = 1e-8 vs.tke_mxl_choice = 2 vs.kappaM_min = 2e-4 vs.kappaH_min = 7e-5 # usually 2e-5 vs.enable_Prandtl_tke = False vs.enable_kappaH_profile = True # eke vs.K_gm_0 = 1000.0 vs.enable_eke = False vs.eke_k_max = 1e4 vs.eke_c_k = 0.4 vs.eke_c_eps = 0.5 vs.eke_cross = 2. vs.eke_crhin = 1.0 vs.eke_lmin = 100.0 vs.enable_eke_superbee_advection = False vs.enable_eke_isopycnal_diffusion = False # idemix vs.enable_idemix = False vs.enable_idemix_hor_diffusion = False vs.enable_eke_diss_surfbot = False vs.eke_diss_surfbot_frac = 0.2 # fraction which goes into bottom vs.enable_idemix_superbee_advection = False vs.eq_of_state_type = 5 # custom variables vs.nmonths = 12 vs.variables.update( sss_clim=Variable('sss_clim', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), sst_clim=Variable('sst_clim', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), qnec=Variable('qnec', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), qnet=Variable('qnet', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), taux=Variable('taux', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), tauy=Variable('tauy', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), )
def set_parameter(self, vs): vs.identifier = 'UNNAMED' vs.nx = 360 vs.ny = 160 vs.nz = 60 vs.dt_mom = vs.dt_tracer = 900 vs.runlen = 86400 * 10 vs.coord_degree = True vs.enable_cyclic_x = True # streamfunction vs.congr_epsilon = 1e-10 vs.congr_max_iterations = 1000 # friction vs.enable_hor_friction = True vs.A_h = 5e4 vs.enable_hor_friction_cos_scaling = True vs.hor_friction_cosPower = 1 vs.enable_tempsalt_sources = True vs.enable_implicit_vert_friction = True vs.eq_of_state_type = 5 # isoneutral vs.enable_neutral_diffusion = True vs.K_iso_0 = 1000.0 vs.K_iso_steep = 50.0 vs.iso_dslope = 0.005 vs.iso_slopec = 0.005 vs.enable_skew_diffusion = True # tke vs.enable_tke = True vs.c_k = 0.1 vs.c_eps = 0.7 vs.alpha_tke = 30.0 vs.mxl_min = 1e-8 vs.tke_mxl_choice = 2 vs.kappaM_min = 2e-4 vs.kappaH_min = 2e-5 vs.enable_kappaH_profile = True vs.enable_tke_superbee_advection = True # eke vs.enable_eke = True vs.eke_k_max = 1e4 vs.eke_c_k = 0.4 vs.eke_c_eps = 0.5 vs.eke_cross = 2. vs.eke_crhin = 1.0 vs.eke_lmin = 100.0 vs.enable_eke_superbee_advection = True vs.enable_eke_isopycnal_diffusion = True # idemix vs.enable_idemix = False vs.enable_eke_diss_surfbot = True vs.eke_diss_surfbot_frac = 0.2 vs.enable_idemix_superbee_advection = True vs.enable_idemix_hor_diffusion = True # custom variables vs.nmonths = 12 vs.variables.update( t_star=Variable('t_star', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), s_star=Variable('s_star', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), qnec=Variable('qnec', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), qnet=Variable('qnet', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), qsol=Variable('qsol', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), divpen_shortwave=Variable('divpen_shortwave', ('zt', ), '', '', time_dependent=False), taux=Variable('taux', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), tauy=Variable('tauy', ('xt', 'yt', 'nmonths'), '', '', time_dependent=False), )
from collections import OrderedDict from veros.variables import Variable, T_GRID, T_HOR, YT, TIMESTEPS MAIN_VARIABLES = OrderedDict([]) CONDITIONAL_VARIABLES = OrderedDict([ ('enable_npzd', OrderedDict([ ('bottom_mask', Variable('Bottom mask', T_GRID, '', 'Bottom mask', dtype='int8')), ('phytoplankton', Variable('Phytoplankton concentration', T_GRID + TIMESTEPS, 'mmol/m^3?', 'Concentration of phytoplankton in grid box', output=True, write_to_restart=True)), ('zooplankton', Variable('Zooplankton concentration', T_GRID + TIMESTEPS, 'mmol/m^3?', 'Concentration of zooplankton in grid box', output=True, write_to_restart=True)), ('detritus', Variable('Detritus concentration', T_GRID + TIMESTEPS, 'mmol/m^3?', 'Concentration of detritus in grid box', output=True,