示例#1
0
文件: cice.py 项目: nicjhan/payu
 def set_oasis_timestep(self, t_step):
     # TODO: Move over to access driver
     for model in self.expt.models:
         if model.model_type == 'oasis':
             namcpl_path = os.path.join(model.work_path, 'namcouple')
             namcpl = Namcouple(namcpl_path, 'access')
             namcpl.set_ice_timestep(str(t_step))
             namcpl.write()
示例#2
0
    def set_timestep(self, t_step):

        namcpl_path = os.path.join(self.work_path, 'namcouple')
        namcpl = Namcouple(namcpl_path, 'access')
        namcpl.set_ice_ocean_coupling_timestep(str(t_step))
        namcpl.write()

        for model in self.expt.models:

            if model.model_type in ('cice', 'cice5'):

                # Set namcouple timesteps

                ice_ts = model.config.get('timestep')
                if ice_ts:
                    model.set_oasis_timestep(ice_ts)

                # Set ACCESS coupler timesteps

                input_ice_path = os.path.join(model.work_path, 'input_ice.nml')
                input_ice = f90nml.read(input_ice_path)

                input_ice['coupling_nml']['dt_cpl_io'] = t_step

                input_ice.write(input_ice_path, force=True)

            elif model.model_type == 'matm':

                input_atm_path = os.path.join(model.work_path, 'input_atm.nml')
                input_atm = f90nml.read(input_atm_path)

                input_atm['coupling']['dt_atm'] = t_step

                input_atm.write(input_atm_path, force=True)

            elif model.model_type == 'mom':

                input_nml_path = os.path.join(model.work_path, 'input.nml')
                input_nml = f90nml.read(input_nml_path)

                input_nml['auscom_ice_nml']['dt_cpl'] = t_step
                input_nml['ocean_solo_nml']['dt_cpld'] = t_step

                input_nml.write(input_nml_path, force=True)
示例#3
0
文件: cice.py 项目: coecms/payu
 def set_oasis_timestep(self, t_step):
     # TODO: Move over to access driver
     for model in self.expt.models:
         if model.model_type == 'oasis':
             namcpl_path = os.path.join(model.work_path, 'namcouple')
             namcpl = Namcouple(namcpl_path, 'access')
             namcpl.set_ice_timestep(str(t_step))
             namcpl.write()
示例#4
0
文件: oasis.py 项目: rmholmes/payu
    def set_timestep(self, t_step):

        namcpl_path = os.path.join(self.work_path, 'namcouple')
        namcpl = Namcouple(namcpl_path, 'access')
        namcpl.set_ice_ocean_coupling_timestep(str(t_step))
        namcpl.write()

        for model in self.expt.models:

            if model.model_type in ('cice', 'cice5'):

                # Set namcouple timesteps

                ice_ts = model.config.get('timestep')
                if ice_ts:
                    model.set_oasis_timestep(ice_ts)

                # Set ACCESS coupler timesteps

                input_ice_path = os.path.join(model.work_path, 'input_ice.nml')
                input_ice = f90nml.read(input_ice_path)

                input_ice['coupling_nml']['dt_cpl_io'] = t_step

                input_ice.write(input_ice_path, force=True)

            elif model.model_type == 'matm':

                input_atm_path = os.path.join(model.work_path, 'input_atm.nml')
                input_atm = f90nml.read(input_atm_path)

                input_atm['coupling']['dt_atm'] = t_step

                input_atm.write(input_atm_path, force=True)

            elif model.model_type == 'mom':

                input_nml_path = os.path.join(model.work_path, 'input.nml')
                input_nml = f90nml.read(input_nml_path)

                input_nml['auscom_ice_nml']['dt_cpl'] = t_step
                input_nml['ocean_solo_nml']['dt_cpld'] = t_step

                input_nml.write(input_nml_path, force=True)