.
The whole system together with the computer models, are managed by the so-called timer functions. The aim of the timer function is to control the system in such a way that all models will be run in a proper order, at the right time and with specific settings. These timer functions work as a loop which starts and ends based on specific time counting. There are two loops (timer functions) that operate in the system: Main Loop and Model Loop (see Figure 1).
Figure 1. Flow diagram of the CoSMoS system. Main Loop and Model Loop are shown.
The Main Loop is a timer function which controls the overall system and acts as initiator for the model simulation that needs to be run within the system. When we initiate the system, the Main Loop first read data of models which are assigned and prepared by user and stored in the Central Archive database. After reading all the data, this function then determines the start time of model simulation as well as the stop time. Once start and stop time are determined, meteorological data will be downloaded corresponding to the time frame (start and stop time). Meteorological data used by this system are wind field data of Global Forecasting System (GFS) and HIRLAM. Furthermore, observational data are also obtained in order to have a comparison with computed parameters out of the system. This data are taken from MATROOS database. Once obtained completely, both meteorological data and observations are stored into the Central Archive database.
Using this timer function, the entire model will be performed in such a way that they are run in proper order. In general, there are four steps within this loop, as described herein.
Initially, this Model Loop timer function will update the so-called waiting list. This is in order to check whether there is a model ready to be run. If the waiting list is empty, then this timer function will automatically start in 5 seconds and check the waiting list again. When the waiting list is not empty, which means there is at least one model ready to be run, the Pre-processing will be performed. This step includes the preparation of all inputs and data stored in the Central Archive, which are necessary for running a simulation. Once the Pre-processing is finished, the model is ready to run, and will be submitted to a specific folder which is defined as a Job directory. Here at this step, the mode is run. Once a certain simulation is finished, Post-processing takes place: output from the simulation are converted into a proper format so that useful charts and other relevant information can be generated. These output and results are then stored into the Central Archive and will be published into the OPeNDAP server or a web server. The whole process within this Model Loop is repeated until all models finish to run. Then the Model Loop will stop.