Computing
Change font color settings in Ubuntu terminal on WSL

I found it difficult to see some of the colors of the terminals on WSL2 Ubuntu 18.04LTS on Windows 10 Pro. So you can customize the text color. Install Windows Terminal Install from Microsoft Store. Register in the start menu. Start Windows Terminal Start Windows Terminal from the Start menu, then Windows PowerShell terminal will be launched. Click on the downward-facing symbol to the right of the "+" on the right of the tab to open the menu. Click on Settings in the menu, edit it (Append "colorScheme": "One Half Dark",) as follows: { "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}", "hidden": false, "name": "Ubuntu-18.04", "colorScheme": "One Half Dark", "source": "Windows.Terminal.Wsl" }, Color setting using […]

Read more
Python
Exporting and rebuilding conda virtual environment

Background After installing Miniconda on a new Windows 10 PC and setting up a virtual environment for running xhycom, xarray.Dataset.hvPlot does not work. There seems to be a problem with the handling of datetime64; pandas get_loc(key) returns a KeyError in datetimes.py. get_loc(key) seems to take an index and there seems to be a confusion between the index and the integer value of datetime64(ns). Since I do not know the solution, I decide to rebuild the virtual environment that is working well. This problem has been discussed in this site. It may be associated with some incompatibility between xarray 0.16 and pandas 1.1 (works with pandas 1.05). Exporting the virtual environment […]

Read more
Research
HYCOM data download and visualization

The HYCOM database is an oceanic reanalysis dataset often used for open boundary conditions in oceanic circulation models. The Netcdf handling tool of xhycom was developed to facilitate the OPeNDAP download and visualization of Netcdf data using xarray. Data visualization includes creation of still images and time-series movies with matplotlib while interactive visualization with hvPlot. Jupyter Notebook on xhycom may help you to understand how to use it. In terms of visualization, matplotlib is superior in terms of ease of fine tuning and speed, which is better for printed materials. On the other hand, hvPlot is useful for checking values and understanding phenomena interactively; but it is slower.

Read more
Computing
Making vim (vi) text color easier to see on WSL-Ubuntu

Comments in .bashrc hard to see I'm using WSL-Ubuntu session of MobaXterm on Ubuntu 18.04LTS on WSL, but when I open .bashrc with vi (vim), comments are hard to see. So make the text color easier to see. Referring to this site (in Japanese), let's introduce a color scheme of molokai to make it easier to see. Installing molokai Start a terminal, create vim's personal setting directory .vim in the home directory, install molokai, and open .vimrc using vi. $ mkdir .vim $ cd .vim $ mkdir colors $ git clone https://github.com/tomasr/molokai Cloning into'molokai'... remote: Enumerating objects: 148, done. remote: Total 148 (delta 0), reused 0 (delta 0), pack-reused 148 […]

Read more
Computing
Working on GitLab by mirroring open source model

Clone open source model to GitLab Taking an ocean model ROMS as an example, let's consider the best practice of operating the ROMS repositories by cloning (not forking) the original ROMS repository to GitLab, where the mirroring is set to automatically import the update of the original repository. Please refer to this article for the settings up to this point. I will create and operate my own devel branch to avoid changing the repository cloned from the original repository on GitLab. Now the remote repository is GitLab cloning (mirroring) the original ROMS repository; local repository is operated using GitBash on Windows 10 Pro and Git on Supercomputer ITO. Final workflow […]

Read more
Computing
Git for Windows

Install Install Git for Windows on Windows 10 Pro and manage version control with Git Bash. It is assumed that the compilation and execution will be done on Ubuntu 18.04 LTS on WSL on Windows 10 Pro. Therefore, the linefeed code should always be in Linux format. This linefeed code stuff is a trap for beginners, so be careful. Download Git for Windows from here and start installation by double-clicking. Basically, the default is OK, but in the question about line endings appearing nearly at the end (Configuring line ending conversions), click the third option below. This allows you to work while always maintaining the Linux linefeed code. Checkout as-is, […]

Read more
Computing
Using Markdown editor StackEdit on GSuite

StackEdit initial settings Our lab members use GSuite; it is convenient if README.MD is prepared in Markdown in a shared folder and can be viewed. This can be realized by StackEdit. Here and here (both in Japanese) are helpful. StackEdit is a browser-based (confirmed using Chrome) Markdown editor and can be used standalone. You do not need to register; access here, read the explanation, and start writing with START WRITING at the top. At first, the following Welcome to StackEdit document appears, the left is the manuscript in Markdown notation while the right is its display. There are Toggle explorer buttons in the upper left and upper right. As shown […]

Read more
Computing
HYCOM dataset usage

HYCOM Datasets In HYCOM Data Server, the results of HYCOM's global ocean flow field reproduction prediction results are available as a dataset. The two main ones are: They are Analysis and Reanalysis. The difference in contents is written in here. The items are the same for both, SSH (sea surface height), zonal velocity (east-west velocity), meridional velocity (north-north velocity), temperature (in-situ water temperature), and salinity. GOFS 3.1: 41-layer HYCOM + NCODA Global 1/12 ° Analysis Archive from July 2014 to the present. Details are here. Be careful that there are Missing days. GOFS 3.1: 41-layer HYCOM + NCODA Global 1/12 ° Reanalysis This is an archive every 3 hours from […]

Read more
Computing
Installing NetCDF-Fortran using Intel oneAPI on Ubuntu 22.04 on WSL2

November 5, 2023: Installation environment is updated. Prerequisites It is assumed that Ubuntu 22.04LTS is installed on WSL2 on Windows 11 Pro; Intel oneAPI is installed as well. Referring to this article, libraries other than NetCDF-Fortran are easily installed with apt (compiled with GNU). How to compile NetCDF-C with Intel oneAPI is introduec here in Japanese, but it is time consuming. Install GNU libraries with apt HDF5 (referenced here) and GNU version of NetCDF-C (libnetcdf-dev) and NetCDF-Fortran (libnetcdff-dev, refer to here) are installed as follows. libnetcdff-dev should not be installed as building Intel version failed. $ sudo apt update $ sudo apt install hdf5-tools hdf5-helpers libhdf5-dev libhdf5-doc libhdf5-serial-dev $ sudo […]

Read more
Computing
Exporting PowerPoint slide images in high resolution

Saving in PNG is coarse in 96dpi When saving (exporting) images in PNG of PowerPoint slides of Microsoft Office 2016 on Windows 10 Pro, the output is in 96dpi by default; the resolution is too low as a graphic to be inserted into a paper or thesis. A method to increase the resolution was introduced in here. The method is common to any type of images, including PNG and JPEG. Edit Registry Editor Since it operates the registry editor, if you make a mistake, Windows may be damaged at worst. Close all running software and then work carefully. Right-click the "Start button", type regedit in the "Name box" of "Run", […]

Read more