<commit_before># coding: utf-8
"""
The payu interface for MOM4
===============================================================================
Primary Contact:    <NAME> (<EMAIL>)
"""

import os
import subprocess as sp
from fms import fms

class mom4(fms):
    #---
    def __init__(self, **kwargs):
        
        # FMS initalisation
        super(mom4, self).__init__(**kwargs)
        
        # Model-specific configuration
        self.model_name = 'mom4'
        self.default_exec = 'mom4'
        self.path_names(**kwargs)
        
        self.modules = ['pbs',
                        'openmpi',
                        'nco']
        self.load_modules()
        
        self.config_files = ['data_table',
                             'diag_table',
                             'field_table',
                             'input.nml']
    
    
    #---
    def setup(self):
        # FMS initialisation
        super(mom4, self).setup()
        
        self.load_modules()
    
    
    #---
    def core2iaf_setup(self, core2iaf_path=None, driver_name=None):<commit_msg>MOM4 module loading moved to setup method<commit_after># coding: utf-8
"""
The payu interface for MOM4
===============================================================================
Primary Contact:    <NAME> (<EMAIL>)
"""

import os
import subprocess as sp
from fms import fms

class mom4(fms):
    #---
    def __init__(self, **kwargs):
        
        # FMS initalisation
        super(mom4, self).__init__(**kwargs)
        
        # Model-specific configuration
        self.model_name = 'mom4'
        self.default_exec = 'mom4'
        self.path_names(**kwargs)
        
        self.modules = ['pbs',
                        'openmpi',
                        'nco']
        
        self.config_files = ['data_table',
                             'diag_table',
                             'field_table',
                             'input.nml']
    
    
    #---
    def setup(self):
        # FMS initialisation
        super(mom4, self).setup()
        
        self.load_modules()
    
    
    #---
    def core2iaf_setup(self, core2iaf_path=None, driver_name=None):
{'fraction_non_alphanumeric': 0.1774193548387097, 'fraction_numerical': 0.008755760368663594, 'mean_word_length': 1.6125150421179302, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3444036', 'n_tokens_mistral': 629, 'n_tokens_neox': 604, 'n_words': 122}