{'fraction_non_alphanumeric': 0.026497085320614733, 'fraction_numerical': 0.0034824740707093647, 'mean_word_length': 5.275534441805226, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Development of a computational environment for the General Curvilinear Ocean Model

The General Curvilinear Ocean Model (GCOM) differs significantly from the traditional approach, where the use of Cartesian coordinates forces the model to simulate terrain as a series of steps. GCOM utilizes a full three-dimensional curvilinear transformation, which has been shown to have greater accuracy than similar models and to achieve results more efficiently. The GCOM model has been validated for several types of water bodies, different coastlines and bottom shapes, including the Alarcon Seamount, Southern California Coastal Region, the Valencia Lake in Venezuela, and more recently the Monterey Bay. In this paper, enhancements to the GCOM model and an overview of the computational environment (GCOM-CE) are presented. Model improvements include migration from F77 to F90; approach to a component design; and initial steps towards parallelization of the model. Through the use of the component design, new models are being incorporated including biogeochemical, pollution, and sediment transport. The computational environment is designed to allow various client interactions via secure Web applications (portal, Web services, and Web 2.0 gadgets). Features include building jobs, managing and interacting with long running jobs; managing input and output files; quick visualization of results; publishing of Web services to be used by other systems such as larger climate models. The CE is based mainly on Python tools including a grid-enabled Pylons Web application Framework for Web services, pyWSRF (python-Web Services-Resource Framework), pyGlobus based web services, SciPy, and Google code tools.


Introduction
The science of ocean modeling and simulation is complex, involving systems spanning a large number of geographical and climate systems. Computer models have evolved to be the primary tools used to study and predict physical, chemical, and biological characteristics of the oceans; integrating simulated results and observational data from the ocean, and enhancements to the realism of ocean model simulations. Models of the ocean range in complexity from simple mathematical models to massive, realistic global ocean circulation simulators encompassing many different models, requiring thousands or millions of lines of computer code to solve, and integrating disparate and distributed data and computational resources. As a result, there are a large number of ocean models in use today, many of which address specific aspects of this complex problem such as global, coastal, regional, or basin systems. Because of increases in computer power and data resources, modelers are able to construct models where the elements of the ocean and atmosphere interact across many spatial and temporal scales. Consequently, there is a driving need for new models that can be integrated into larger systems that can also take advantage of the computational infrastructures being utilized within the ocean and computational modelling communities.
In November, 2008, the US DOE held a workshop addressing the grand challenges and limitations that exist today in the field of high-resolution climate and Earth modeling systems [1]. The outcome of this meeting is a comprehensive report with recommendations for the next generation models. Among the suggestions, the panels identified the need to develop models that can take advantage of the specialized computational environments available for us by modern computational scientists. These are needed to integrate multiple ocean models and clients with advanced compute and data resources, emerging Web and internet technologies, and cyberinfrastructure. Additionally, the workshop pointed out a need to have more precise coastal models.
In this paper, we discuss updates being made to the General Curvilinear Ocean Model (GCOM) [2] and the development of a computational environment (GCOM-CE) that allows a component-based, serial or parallel model to run on a variety of resources (local workstations, large grids such as the TeraGrid, clouds) using emerging Web and internet technologies to seamlessly access the model and its results. This paper is organized as follows: in Sections 2 and 3 we introduce the GCOM model and present a prototype system of the proposed computational environment, in Section 4, we present our conclusions and future plans.

The General Curvilinear Ocean Model (GCOM)
This paper does not have enough room to discuss the model in detail, so we include a brief overview of the GCOM model. The interested reader should refer to the included references of the work by Torres and Castillo. GCOM solves 3-D, time-dependent, curvilinear Navier-Stokes flow equations to simulate 3D marine currents and density gradients over irregularly shaped coastlines and sea floors [3]. GCOM differs from more traditional approaches where the use of Cartesian coordinates force the model to simulate terrain as a series of steps. Instead, it uses a full 3-D curvilinear grid (see figure 1) that is adapted both to the bottom topography and to the coastline, and a numerical model that is capable of resolving accurately the dynamics of multiple boundary-layers and their interactions with the topographic features [4]. Adaptable curvilinear grids result in more efficient algorithms and increased resolution. Although the grid generation technique allows grid points to be clustered in any region of the computational domain, the model can handle both orthogonal and non-orthogonal grids.
The resulting model equations are more complex than in case of sigma-coordinate models, but the boundary conditions are easily implemented and there is no need to interpolate near solid boundaries. GCOM has been validated against several types of water bodies, different coastline and bottom shapes. These include the Alarcon Seamount, Southern California Coastal Region, the Valencia Lake in Venezuela, and the Monterey Bay. In addition, GCOM has been proven to produce improved resolutions and smaller errors over other approaches [4].

Current Efforts
Originally developed in F77, the sequential model has been ported to F95, using a modular or component design, and is undergoing validation tests for the Monterey Bay region. Modifications and upgrades include the integration of new driving models: sediment transport, wind, biological, geochemical, and pollutants. Plans for parallelizing the code include the use of the Distributed Coupling Toolkit (DCT) for data distribution [5] and red-black ordering of the successive overrelaxation (SOR) sections. The structure of the code base and its' components are being used to help architect the computational environment to extract data and task parallelism, and to identify places in the code where modules can be operated in a distributed or asynchronous manner (see Section 3 below). As an example, we are developing a service to update the bathymetric grid in response to changes in sediment transport. This task can be done on any host, and uses messaging to interact with other components in the system. In addition, we are designing "unit test" suites for basic grid generation, simple PDE example, timing diagnostics and input conditions.

Related Work
Relevant ocean models include the Parallel Ocean Program (POP), the Regional Oceanic Modeling System (ROMS), and the Hybrid Coordinate Ocean Model (HYCOM). These models all require that one or more of the axes must be orthogonal to surface, which results in loss of detail where there are significant changes in the bathymetry. Thus, when analyzing events along coastal areas, GCOM is capable of providing more accurate results with greater resolution.

GCOM Computational Environment (GCOM-CE)
In the computational science community there are significant number of efforts to develop common tools and services that can be reused at all layers of the computational environment, including the compute and data resources, as well as the distributed middleware needed to interconnect clients and systems. Based on experiences gained by Thomas in developing reusable toolkits (Open Grid Computing Environments or OGCE, the GridPort Toolkit, the Perl COG Commodity Grid Kit [6]) a community of students, developers, and scientists exist who prefer (or need) lightweight rapid prototyping capability. These requirements, and those described by the workshop on climate change, drove technology choices for this work.

Architecture
The architecture of the GCOM-CE is shown in figure 2, and includes layers for the distributed, services oriented architecture of the Web, as well as the cyberinfrastructure and middleware services being used by the GCOM CE. In this design, the front tier clients can be a human running a browser or desktop application, or an application or service exchanging messages. The backend tier includes local services, web services, other applications, and remote computing and data services.
For the middleware, we evaluated several Web 2.0 technologies, and chose to investigate how Web application frameworks would work in the CE. To keep the CE simple, we chose to work with Python because it has a strong, active open source developer community; it is object-oriented; libraries have been proved to work well for science applications (SciPy, NumPy, PyNGL PyNIO); and libraries for grid integration (pyGlobus, pyGridWare, pyGSI). The framework must have the ability to integrate emerging Web 2.0 technologies including WSGI (Web Server Gateway Interface), databases, XML/JavaScript/AJAX, Google Gadgets, social networks, Web 2.0 services and toolkits, and security. After testing several candidates, the Pylons Web Framework emerged as a viable framework [7].
Pylons is a Web application framework, hence, any number of components and libraries developed by other projects can be incorporated into the system, which facilitates customization. Pylons uses the model-view-controller (MVC) request-response architecture. The Model contains the data that the application works with; the View reads the data from the model and displays it to the user; the Controller manages the logic of the application. Pylons has several features that are beneficial to gateways and developers: Routing and "Beautiful URLs" that simplify the naming and mapping of URI's through the REST interface; multiple database interfaces; interfaces to multiple template packages; dynamic update and interactive debugger; built-in security and authentication using the AuthKit module; RESTful web services using Paste; toolkits to interact with Google code and Web 2.0 gadgets; Easy-Install installation and packaging into Python eggs (similar to jar or tar); auto deployment using Paste (similar to Ant or Maven); "virtual environment" packaging into an isolated working directory containing all necessary libraries. An extremely important feature of the Pylons framework is that the services layer is decoupled from the logic of the code behind it, allowing the same code to be hosted, for example, as a Web service, a portal page, or an iGoogle gadget.

GCOM-CE Current Status
The Pylons framework has been extended to include GSI security (using MyProxy services). In addition, a working user portal has been developed which includes authentication, job submission, unit tests, and other services. Figure 3 shows a composite of several of the functions of the demo portal. All software has been bundled into a deployable egg that can be installed on any system and can be modified for use by other applications. System admin pages are being developed to facilitate configuration and management of users and resources. Some of the portal pages are being migrated to Web services (job submission, data viewing). An interface to the Google calendar API is being developed for posting system task status and other messages.

Conclusions and Future Work
The migration of the GCOM code base from F77 to F90 is completed, and validation of the model is in progress. New science components such as dynamic grid generation, sediment transport, biogeochemical processes are being tested and integrated. A parallel framework, based on the DCT is being developed. The GSI-enabled Pylons framework is being used for hosting Web services, including job submission to multiple types of resources. Key features include GSI integration, the extensibility of the framework (e.g. the ease with which one can add external modules), the ability deploy copies onto other systems, the ability to dynamically reload services without restarting the server and the work being done with Web2.0 applications (Google Apps, Gadgets, etc.). A simple user portal has been developed and is being used to submit GCOM jobs to the TeraGrid.
Future plans include: further development of the framework to be included as an OGCE incubator project; adding components such as a data browser, job monitoring, simple data visualization; and exposing GCOM-CE services for use by other applications. In particular, we are using the software to develop a portal interface to the CyberCHEQS computational Web service, an NSF funded CI-TEAM project investigating flame thermochemistry properties.