Example #1
0
def set_coupling_timestep(experiment, timestep, model):

    # Change timestep in the namcouple files.
    for n in namcouple:
        nc = Namcouple(n % (experiment), model)
        nc.set_ocean_timestep(timestep)
        nc.write()

    if model == 'auscom': 
        nml = FortranNamelist(input_atm % (experiment))
        nml.set_value('coupling', 'dt_atm', timestep)
        nml.write()

    nml = FortranNamelist(input_ocn % (experiment))
    nml.set_value('auscom_ice_nml', 'dt_cpl', timestep)
    nml.set_value('ocean_solo_nml', 'dt_cpld', timestep)
    nml.write()

    nml = FortranNamelist(input_ice % (experiment))
    nml.set_value('coupling_nml', 'dt_cpl_io', timestep)
    nml.write()