bluemath_tk.wrappers.schism package

Submodules

bluemath_tk.wrappers.schism.schism_example module

bluemath_tk.wrappers.schism.schism_wrapper module

class bluemath_tk.wrappers.schism.schism_wrapper.SchismHyCoFfEE(*args, **kwargs)[source]

Bases: SchismModelWrapper

Schism wrapper: HyCoFfEE : A Hybrid Compound Flooding metamodel for Estuarine Environment.

build_case(case_context: dict, case_dir: str)[source]

Build the input files for a case.

Parameters:
  • case_context (dict) – The case context.

  • case_dir (str) – The case directory.

default_parameters = {'eco_class': {'description': 'EcoSim. Must be bewteen [25,60]', 'type': <class 'float'>, 'value': 27}, 'eos_a': {'description': 'Needed if ieos_type=1; should be <=0', 'type': <class 'float'>, 'value': -0.1}, 'eos_b': {'description': 'Needed if ieos_type=1', 'type': <class 'float'>, 'value': 1001}, 'ibc': {'description': 'Barotropic flag', 'type': <class 'float'>, 'value': 1}, 'ibtp': {'description': 'Baroclinic flag', 'type': <class 'float'>, 'value': 0}, 'ieos_pres': {'description': 'Used only if ieos_type=0. 0: without pressure effects ', 'type': <class 'float'>, 'value': 0}, 'ieos_type': {'description': 'UNESCO 1980 (nonlinear); =1: linear function of T ONLY, i.e. ', 'type': <class 'float'>, 'value': 0}, 'ihorcon': {'description': 'Horizontal viscosity option: 0= no viscosity is used; 1= Lapacian', 'type': <class 'float'>, 'value': 0}, 'indvel': {'description': 'Method for computing velocity at nodes: 0= linear shape function; 1 = averaging method', 'type': <class 'float'>, 'value': 1}, 'inter_mom': {'description': ' Interpolation is used for velocity at foot of char: 0=linear; 1=Kriging (define kr_co ); -1= spatial Kriging (define krvel.gr3)', 'type': <class 'float'>, 'value': 0}, 'ipre': {'description': 'Pre-process flag: 0= normal run; 1= only for single CPU!', 'type': <class 'float'>, 'value': 0}, 'ishapiro': {'description': 'on/off flag for Shapiro filter: 0= off; 1= on', 'type': <class 'float'>, 'value': 0}, 'mdc2': {'description': 'Grid for WWM. Same as mdc in .nml ... for consitency check between SCHISM and WWM', 'type': <class 'float'>, 'value': 30}, 'msc2': {'description': 'Grid for WWM. Same as msc in .nml ... for consitency check between SCHISM and WWM', 'type': <class 'float'>, 'value': 24}, 'ntracer_age': {'description': 'Age calculation, must be 2*ntracer_gen', 'type': <class 'float'>, 'value': 4}, 'ntracer_gen': {'description': '# of tracers', 'type': <class 'float'>, 'value': 2}, 'output_WL': {'description': 'Elev. [m] = 0: off; 1: on', 'type': <class 'float'>, 'value': 1}, 'output_depth_averaged_vel': {'description': 'Depth-averaged vel vector [m/s] = 0: off; 1: on', 'type': <class 'float'>, 'value': 1}, 'output_water_salinity': {'description': 'Water salinity [PSU] = 0: off; 1: on', 'type': <class 'float'>, 'value': 0}, 'output_water_temperature': {'description': 'Water temperature [C] = 0: off; 1: on', 'type': <class 'float'>, 'value': 0}, 'output_wind_velocity': {'description': 'Wind velocity vector [m/s] = 0: off; 1: on', 'type': <class 'float'>, 'value': 1}, 'sed_class': {'description': 'SED3D', 'type': <class 'float'>, 'value': 5}}
generate_at_th(case_context: dict, case_dir: str, at_series: ndarray, times: ndarray)[source]

Generate the at.th file for a case (not required by SCHISM, but nice to plot).

Parameters:
  • case_context (dict) – The case context.

  • case_dir (str) – The case directory.

generate_elev_th(case_context: dict, case_dir: str, AT_SS_series: ndarray, times: ndarray)[source]

Generate the elev.th file for a case.

Parameters:
  • case_context (dict) – The case context.

  • case_dir (str) – The case directory.

generate_flux_th(case_context: dict, case_dir: str, qq_series: ndarray, times: ndarray)[source]

Generate the elev.th file for a case.

Parameters:
  • case_context (dict) – The case context.

  • case_dir (str) – The case directory.

generate_ss_th(case_context: dict, case_dir: str, ss_series: ndarray, times: ndarray)[source]

Generate the ss.th file for a case (not required by SCHISM, but nice to plot).

Parameters:
  • case_context (dict) – The case context.

  • case_dir (str) – The case directory.

generate_time_series(case_context: dict, case_dir: str)[source]

Generate the required th files for the case.

Parameters:
  • case_context (dict) – The case context.

  • case_dir (str) – The case directory.

generate_wind_th(case_context: dict, case_dir: str, times: ndarray)[source]

Generate the wind files for a case.

Parameters:
  • case_context (dict) – The case context.

  • case_dir (str) – The case directory.

rndays_calculation(case_context: dict, case_dir: str, t_series: ndarray)[source]

Calculate the rndays parameter (time of simulation in days).

Parameters:
  • case_context (dict) – The case context.

  • case_dir (str) – The case directory.

  • t_series (np.ndarray) – The time series array.

class bluemath_tk.wrappers.schism.schism_wrapper.SchismModelWrapper(*args, **kwargs)[source]

Bases: BaseModelWrapper

Wrapper for the Schism model.

default_parameters

The default parameters type for the wrapper.

Type:

dict

available_launchers

The available launchers for the wrapper.

Type:

dict

available_launchers = {'geoocean-cluster': 'launchSchism.sh'}
build_case(case_context: dict, case_dir: str) None[source]

Build the input files for a case.

Parameters:
  • case_context (dict) – The case context.

  • case_dir (str) – The case directory.

default_parameters = {}
class bluemath_tk.wrappers.schism.schism_wrapper.SchismOnlyWindModelWrapper(*args, **kwargs)[source]

Bases: SchismModelWrapper

Schism wrapper: only wind case.

build_case(case_context: dict, case_dir: str)[source]

Build the input files for a case.

Parameters:
  • case_context (dict) – The case context.

  • case_dir (str) – The case directory.

default_parameters = {'eco_class': {'description': 'EcoSim. Must be bewteen [25,60]', 'type': <class 'float'>, 'value': 27}, 'eos_a': {'description': 'Needed if ieos_type=1; should be <=0', 'type': <class 'float'>, 'value': -0.1}, 'eos_b': {'description': 'Needed if ieos_type=1', 'type': <class 'float'>, 'value': 1001}, 'ibc': {'description': 'Barotropic flag', 'type': <class 'float'>, 'value': 0}, 'ibtp': {'description': 'Baroclinic flag', 'type': <class 'float'>, 'value': 0}, 'ieos_pres': {'description': 'Used only if ieos_type=0. 0: without pressure effects ', 'type': <class 'float'>, 'value': 0}, 'ieos_type': {'description': 'UNESCO 1980 (nonlinear); =1: linear function of T ONLY, i.e. ', 'type': <class 'float'>, 'value': 0}, 'ihorcon': {'description': 'Horizontal viscosity option: 0= no viscosity is used; 1= Lapacian', 'type': <class 'float'>, 'value': 0}, 'indvel': {'description': 'Method for computing velocity at nodes: 0= linear shape function; 1 = averaging method', 'type': <class 'float'>, 'value': 1}, 'inter_mom': {'description': ' Interpolation is used for velocity at foot of char: 0=linear; 1=Kriging (define kr_co ); -1= spatial Kriging (define krvel.gr3)', 'type': <class 'float'>, 'value': 0}, 'ipre': {'description': 'Pre-process flag: 0= normal run; 1= only for single CPU!', 'type': <class 'float'>, 'value': 0}, 'ishapiro': {'description': 'on/off flag for Shapiro filter: 0= off; 1= on', 'type': <class 'float'>, 'value': 0}, 'mdc2': {'description': 'Grid for WWM. Same as mdc in .nml ... for consitency check between SCHISM and WWM', 'type': <class 'float'>, 'value': 30}, 'msc2': {'description': 'Grid for WWM. Same as msc in .nml ... for consitency check between SCHISM and WWM', 'type': <class 'float'>, 'value': 24}, 'ntracer_age': {'description': 'Age calculation, must be 2*ntracer_gen', 'type': <class 'float'>, 'value': 4}, 'ntracer_gen': {'description': '# of tracers', 'type': <class 'float'>, 'value': 2}, 'output_WL': {'description': 'Elev. [m] = 0: off; 1: on', 'type': <class 'float'>, 'value': 1}, 'output_depth_averaged_vel': {'description': 'Depth-averaged vel vector [m/s] = 0: off; 1: on', 'type': <class 'float'>, 'value': 1}, 'output_water_salinity': {'description': 'Water salinity [PSU] = 0: off; 1: on', 'type': <class 'float'>, 'value': 0}, 'output_water_temperature': {'description': 'Water temperature [C] = 0: off; 1: on', 'type': <class 'float'>, 'value': 0}, 'output_wind_velocity': {'description': 'Wind velocity vector [m/s] = 0: off; 1: on', 'type': <class 'float'>, 'value': 1}, 'sed_class': {'description': 'SED3D', 'type': <class 'float'>, 'value': 5}}
generate_windth(case_context: dict, case_dir: str)[source]

Generate the wind files for a case.

Parameters:
  • case_context (dict) – The case context.

  • case_dir (str) – The case directory.

Module contents