DOI QR코드

DOI QR Code

Development of a High Performance Ocean Model using Julia Language

줄리아 언어를 이용한 고성능 해양모델의 개발

  • KWON, MIN-SUN (Department of Environmental Engineering, Kunsan National University) ;
  • KIM, JONG GU (Department of Environmental Engineering, Kunsan National University)
  • Received : 2018.08.27
  • Accepted : 2019.04.09
  • Published : 2019.05.31

Abstract

In order to develop a high performance ocean model, we used Julia, a Just-In-Time compile language, and to obtain the solution of the momentum equation, we made the code to solve the Poisson equation by the Successive Over-Relaxation method. And then we made two models to test Julia calculation codes. First, a simple channel form is modeled to test constant source/sink conditions. Second, the simplified Yellow Sea was modeled to test tidal forcing, Coriolis forces, and the effect of vertical eddy diffusivity coefficients. The model has been tested with a total of eight cases in the two scenarios. As a result of the test, the depth-averaged current speed of the three cases in Scenario 1 converged perfectly to the theoretical value, and that showed well a vertical flow velocity gradient due to the bottom friction. Also, the result of Scenario 2 represented well the amphidromic points of Yellow Sea and the tidal characteristics of mid-western and southwestern coast of Korea. Therefore, it is considered that the ocean model using Julia language has developed successfully, this suggests that the ocean model has come to the stage of successful transition from a classical compile language to a Just-In-Time compile language.

고성능 해양모델을 개발하기 위하여 적시 컴파일(Just-In-Time) 언어인 줄리아 언어를 사용하였고, 운동량 방정식의 해를 구하기 위해 연속완화법으로 푸아송 방정식을 푸는 코드를 작성하였다. 다음으로, 줄리아 계산 코드를 시험하기 위하여 두 가지의 모델을 구축하였다. 첫 번째로, 일정한 유량의 생성/소멸(source/sink) 조건을 시험하기 위해 단순한 수로 형태를 모델링하였고, 두 번째로, 조석 외력(tidal forcing) 및 전향력(Coriolis force), 난류확산계수로 인한 효과 등을 시험하기 위해 황해(Yellow Sea)를 단순화하여 모델링하였다. 모델은 두 가지 시나리오 안에서 총 8개의 실험안으로 테스트되었다. 테스트 결과, 시나리오 1에서 3가지 실험안의 수심 평균된 유속은 이론 값에 완벽하게 수렴하였고, 해저마찰로 인한 수직적 유속 구배를 잘 보여주었다. 또한 시나리오 2에서는 황해의 무조점과 우리나라 서해 중부와 남부 연안의 조석 특성을 잘 재현하였고, 전향력과 수직 난류확산계수에 따른 결과의 차이를 잘 보여주었다. 따라서, 줄리아 언어를 이용한 해양모델을 개발하는 데에 성공하였다고 판단되며, 이는 해양모델이 고전적인 컴파일 언어에서 적시 컴파일 언어로 성공적으로 넘어가는 단계에 오게 됐다는 것을 시사한다.

Keywords

GHOHBG_2019_v24n2_187_f0001.png 이미지

Fig. 1. Grid design for model scenario 1. (a) is horizontal water depth colormap, (b) is vertical water depth colormap from the south to the north in the center line.

GHOHBG_2019_v24n2_187_f0002.png 이미지

Fig. 2. Open boundary forcing cells in scenario 1 with constant flow forcing at two points of each source (+) and sink (-).

GHOHBG_2019_v24n2_187_f0003.png 이미지

Fig. 3. Open boundary forcing cells in scenario 2 with tidal forcing at south and east boundaries, and comparison points between observations and computations.

GHOHBG_2019_v24n2_187_f0004.png 이미지

Fig. 4. The results of scenario 1. (a) is the surface current vector of Case 1 after 24 hours, (b) is the time series of current speed at point A of each test case.

GHOHBG_2019_v24n2_187_f0005.png 이미지

Fig. 5. The vertical current vectors of three test cases in the center line after 24 hours, (a) is Case 1(r=0), (b) is Case 2(r=0.1), (c) is Case 3(r=0.2).

GHOHBG_2019_v24n2_187_f0006.png 이미지

Fig. 6. The time series of current speed at point A in each test case, (a) is the current speed at the surface layer, (b) is the current speed at the bottom layer.

GHOHBG_2019_v24n2_187_f0007.png 이미지

Fig. 7. The tidal co-amplitude and co-phase chart for the 4 major tidal constituents of Case 1. (a) is M2, (b) is S2, (c) is K1, and (d) is O1.

GHOHBG_2019_v24n2_187_f0008.png 이미지

Fig. 8. The tidal co-amplitude and co-phase chart for the M2 tidal constituent of each case. (a) is Case 2(f = 1 × 10-4, (b) is Case 3(f = 0), (c) Case 4(Az ≦ 0.001), and (d) is Case 5(Az ≦ 0.01).

GHOHBG_2019_v24n2_187_f0009.png 이미지

Fig. 9. The tidal co-amplitude and co-phase chart for the K1 tidal constituent of each case. (a) is Case 2(f = 1 × 10-4, (b) is Case 33(f = 0), (c) Case 4(Az 0.001), and (d) is Case 5(Az ≦ 0.01).

GHOHBG_2019_v24n2_187_f0010.png 이미지

Fig. 10. The comparison of amplitude and phase of M2, K1 constituent for each case. (a) is M2 amplitude, (b) is K1 amplitude, (c) is M2 phase, and (d) is K1 phase.

Table 1. Julia model files and contents

GHOHBG_2019_v24n2_187_t0001.png 이미지

Table 2. The raw and adjusted harmonic constants for open boundary forcing

GHOHBG_2019_v24n2_187_t0002.png 이미지

Table 3. The model test cases in two scenarios, the simple channel and Yellow Sea

GHOHBG_2019_v24n2_187_t0003.png 이미지

Table 4. The root mean square error for the amplitude and the phase of the 4 major tidal constituents in each case

GHOHBG_2019_v24n2_187_t0004.png 이미지

References

  1. Arakawa, A. and V.R. Lamb, 1977. Computational Design of the Basic Dynamical Processes of the UCLA General Circulation Model, Methods in Computational Physics: Advances in Research and Applications, 17: 173-265.
  2. Aycock, 2003. 2. JIT Compilation Techniques, 2.1 Genesis, p. 98.
  3. Brunt, D., 1927. The period of simple vertical oscillations in the atmosphere. Quarterly Journal of the Royal Meteorological Society, 53(221): 30-32. https://doi.org/10.1002/qj.49705322103
  4. Fringer, O.B., S.W. Armfield and R. L. Street., 2005. Reducing numerical diffusion in interfacial gravity wave simulations. International Journal for Numerical Methods in Fluids, 49: 301-329. https://doi.org/10.1002/fld.993
  5. GitHub, Inc., 2018, GitHub, Retrieved from https://github.com/
  6. Hamrick, J.M., 1992. A three-dimensional environmental fluid dynamics computer code : Theoretical and computational aspects, The College of William and Mary, Virginia Institute of Marine Science, Special Report 317, VA. pp. 1-63.
  7. JuliaLang., 2018a. Julia 1.0 Documentation, Retrieved from https://docs.julialang.org/en/v1/.
  8. JuliaLang., 2018b. The Julia Language, Retrieved from https://github.com/JuliaLang/julia.
  9. Kampf, J., 2009. Ocean Modelling for Beginners (using open-source software), Springer, p. 59.
  10. Kampf, J., 2010. Advanced Ocean Modelling (using open-source software), Springer.
  11. Kochergin, V. P., 1987. Three-dimensional prognostic models. In: Heaps, N. S. (ed.), Three- Dimensional Coastal Ocean Models, Coastal Estuarine Science Series, vol. 4, Union, American Geophysical Washington, DC, pp. 201-208.
  12. Lattner, C., 2002. LLVM: An Infrastructure for Mulit-Stage Optimization, Masters Thesis, Computer Science Dept., University of Illinois at Urbana-Champaign, Dec.
  13. MathWorks, 2018. MATLAB, Retrieved from http://www.mathworks.com/.
  14. McCarthy, J., 1960. Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I, Communications of the ACM, April, 3(4): 184-195. https://doi.org/10.1145/367177.367199
  15. OSU Tidal Data Inversion, 2018. TPX09-ATLAS, Retrieved from http://volkov.oce.orst.edu/tides/tpxo9_atlas.html.
  16. Poisson, S.-D., 1813. Remarques sur une equation qui se presente dans a theorie des attractions des spheroides, Nouvelle Bulletin de la Societe Philomatique, 3: 388-392.
  17. Python Software Foundation, 2018. Python, Retrieved from https://www.python.org/.
  18. Smagorinsky, J., 1963. General circulation experiments with the primitive equations - I. The basic experiment. Mon. Weather Rev., 91: 99-165. https://doi.org/10.1175/1520-0493(1963)091<0099:GCEWTP>2.3.CO;2
  19. The R Foundation, 2018. R, Retrieved from https://www.r-project.org/.
  20. Vaisala, V., 1925. Uber die Wirkung der Windschwankungen aufdie Pilotbeobachtungen. Soc. Sci. Fenn. Commentat. Phys.-Math., 2(19): 1-46.