A memo packed with RADEX environment construction

environment

・ MacBook Pro 2017 ・ Mojave 10.14.5

RADEX environment construction

Follow the steps to build the environment according to the page below.

https://personal.sron.nl/~vdtak/radex/index.shtml#install

Download the source code and unzip it.

$ tar xf radex_public.tar

Move to src in the created Radex directory.

$ cd Radex/src

Edit Makefile and specify the compiler for make. Initially use the default gfortran without editing.

Edit Radex.inc and specify the location of the molecular data and the calculation method of the photon escape probability.

parameter(radat   = '/.../Radex/data/')
parameter (method = 1)  ! uniform sphere

In the src directory

$ make

Hit.

Then a long error ---.

$ make
gfortran -O2   -c main.f -o main.o
gfortran -O2   -c io.f -o io.o
io.f:47:62:

   47 |      $     molfile = radat(1:length(radat))//molfile(1:length(molfile))
      |                                                              1
Warning: Character length of actual argument shorter than of dummy argument 'st' (120/200) at (1) [-Wargument-mismatch]
io.f:47:36:

   47 |      $     molfile = radat(1:length(radat))//molfile(1:length(molfile))
      |                                    1
Warning: Character length of actual argument shorter than of dummy argument 'st' (120/200) at (1) [-Wargument-mismatch]
io.f:47:36:

   47 |      $     molfile = radat(1:length(radat))//molfile(1:length(molfile))
      |                                    1
Warning: Character length of actual argument shorter than of dummy argument 'st' (120/200) at (1) [-Wargument-mismatch]
io.f:48:36:

   48 |       write(13,20) molfile(1:length(molfile))
      |                                    1
Warning: Character length of actual argument shorter than of dummy argument 'st' (120/200) at (1) [-Wargument-mismatch]
io.f:52:36:

   52 |       write(13,20) outfile(1:length(outfile))
      |                                    1
Warning: Character length of actual argument shorter than of dummy argument 'st' (120/200) at (1) [-Wargument-mismatch]
io.f:234:31:

  234 |      $      //version(1:length(version))
      |                               1
Warning: Character length of actual argument shorter than of dummy argument 'st' (20/200) at (1) [-Wargument-mismatch]
io.f:234:31:

  234 |      $      //version(1:length(version))
      |                               1
Warning: Character length of actual argument shorter than of dummy argument 'st' (20/200) at (1) [-Wargument-mismatch]
io.f:234:31:

  234 |      $      //version(1:length(version))
      |                               1
Warning: Character length of actual argument shorter than of dummy argument 'st' (20/200) at (1) [-Wargument-mismatch]
gfortran -O2   -c readdata.f -o readdata.o
gfortran -O2   -c matrix.f -o matrix.o
gfortran -O2   -c background.f -o background.o
background.f:405:72:

  405 |       if (h.eq.0.d0) pause 'Warning: bad xin input in splintrp '
      |                                                                        
Warning: Deleted feature: PAUSE statement at (1)
gfortran -O2   -c slatec.f -o slatec.o
slatec.f:824:72:

  824 |       IF (INCX .EQ. INCY) IF (INCX-1) 5,20,60
      |                                                                        
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
slatec.f:1204:72:

 1204 |       IF (INCX .EQ. INCY) IF (INCX-1) 5,20,60
      |                                                                        
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
slatec.f:1512:72:

 1512 |       IF (INCX .EQ. INCY) IF (INCX-1) 5,20,60
      |                                                                        
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
gfortran -O2    main.o io.o readdata.o matrix.o background.o slatec.o -o radex
strip radex
install -m 755 -p -s radex ../bin/
rm *.o
rm radex

It seems that the number of characters in the argument does not match, so edit it.

Edit FUNCTION length (str) in ʻio.f. Matched to the character in radex.inc`.

CHARACTER*200 str → CHARACTER*120 str

Then the error about length (radat) disappeared. The error of length (version) is also erased.

Changed character of version in radex.inc. Align with radat.

character*20 version → character*120 version

The length (version) error has also disappeared.

However,

gfortran -O2   -c background.f -o background.o
background.f:405:72:

  405 |       if (h.eq.0.d0) pause 'Warning: bad xin input in splintrp '
      |                                                                        
Warning: Deleted feature: PAUSE statement at (1)
gfortran -O2   -c slatec.f -o slatec.o
slatec.f:824:72:

  824 |       IF (INCX .EQ. INCY) IF (INCX-1) 5,20,60
      |                                                                        
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)

These two types of errors do not go away.

Download the old gcc with Homebrew. The latest one at the moment is 9.1.0, so install the previous one.

$ brew install gcc@8

Then use the Makefile compiler

FC = gfortran-8

change to. Then the error of Fortran 2018 deleted feature disappears and only PAUSE statement.

Edit background.f directly.

if (h.eq.0.d0) pause 'Warning: bad xin input in splintrp '
→
if (h.eq.0.d0) then
      write(*,*) 'Warning: bad xin input in splintrp '
      read(*,*)
      endif

No more errors!

Recommended Posts

A memo packed with RADEX environment construction
ConoHa environment construction memo
BigGorilla environment construction memo
Anaconda environment construction memo
[Memo] Build a virtual environment with Pyenv + anaconda
Django development environment construction memo
[Memo] Construction of cygwin environment
ML environment construction with Miniconda
Anaconda3 × Pycharm environment construction memo
[MEMO] [Development environment construction] Python
[MEMO] [Development environment construction] wine
[Memo] Build a development environment for Django + Nuxt.js with Docker
Building a kubernetes environment with ansible 2
Get started with Python! ~ ① Environment construction ~
Easy Jupyter environment construction with Cloud9
Create a virtual environment with Python!
Python environment construction memo on Mac
Building a virtual environment with Python 3
Star Cluster environment construction work memo
Environment construction memo of pyenv + conda
[MEMO] [Development environment construction] Jupyter Notebook
Automate environment construction with Shell Script
Python3 environment construction with pyenv-virtualenv (CentOS 7.3)
Using Chainer with CentOS7 [Environment construction]
Emacs Python development environment construction memo
Ubuntu Desktop 20.04 development environment construction memo
pytorch @ python3.8 environment construction with pipenv
Building a kubernetes environment with ansible 1
Data science environment construction with Docker
Environment construction with pyenv and pyenv-virtualenv
Postgres environment construction with Docker I struggled a little, so note
LaTeX and R (a little Python) environment construction with SublimeText3 (Windows)
[Pyenv] Building a python environment with ubuntu 16.04
Building a Python3 environment with Amazon Linux2
Easily build a development environment with Laragon
Vue.js + Flask environment construction memorandum ~ with Anaconda3 ~
Build a Tensorflow environment with Raspberry Pi [2020]
A memo with Python2.7 and Python3 on CentOS
Building a Python 3.6 environment with Windows + PowerShell
Build a Fast API environment with docker-compose
Get a local DynamoDB environment with Docker
Create a virtual environment with Python_Mac version
Mac OS X development environment construction memo
Build a python virtual environment with pyenv
Build a modern Python environment with Neovim
Let's get along with Python # 0 (Environment construction)
[Linux] Build a Docker environment with Amazon Linux 2
Build a Python + bottle + MySQL environment with Docker on RaspberryPi3! [Easy construction]
A memo that allows you to change Pineapple's Python environment with pyenv
Django environment construction
Build a C language development environment with a container
Environment construction with VSCode + Remote Container (Go / Application)
DeepIE3D environment construction
Emacs-based environment construction
Analytical environment construction with Docker (jupyter notebook + PostgreSQL)
MacOS 10.11 environment construction: Powerline with Anaconda and Dein.vim
Linux environment construction
Building a python environment with virtualenv and direnv
Python environment construction
A memo that made a graph animated with plotly
Build a python environment with ansible on centos6