0

I'm a new user to Ubuntu and confront a problem through some process:

  • There's a freeware called TDEFNODE coded with Fortran and runs under Ubuntu. So I've just installed Ubuntu 14 on a virtual drive.
  • My friend compiled the program, download "gfortran" and "tcsh", and put some syntax in the .bashrc to show the shell that the program is in some folder.
  • The software runs fine from the terminal and creates a lot of result files. Some of these files are used to draw some certain shapes and vectors.
  • Program needs another program called GMT so I downloaded it with all packages from the Ubuntu software center.
  • The real problem I encounter is that; a file which is called "td_plot". This is another file in the software folder and uses the output files and GMT software together to draw certain type of files, like .ps. A sample command is like this:

    td_plot -p map -m aaaa -obsv -calc
    

    And this means : Plot a map which results are in the ".aaaa" files. And show the "observation" and "calculated" vectors on this map.

  • This command produce files, but files include maps without these vectors.

  • As I understood, this td_plot file having commands used under "tcsh" and the misdrawing issue is about that.

  • All the process I've done until here is made under bashrc.

Any ideas to run this tcsh file properly?

Thanks.

3 Answers 3

0

As I understand until now, the problem is that the script is full of commands from "tcsh" shell. Scripts starts with a "#!/bin/tcsh -f", which means to run the script with the tcsh shell(which is installed).

But the problem remains the same, output files are incorrect and missing some properties.

Is there a way around to change the shell to tcsh and run this script with it?

0

Finally, I figured out to work with these softwares. I don't want this topic to be a dead end, so I'll simply explain the installation process. Maybe it'll be useful somehow:

  1. Installation and next process seems to rely on the versions of the softwares.
  2. I installed Ubuntu 16.04 on a VMware virtual machine(4 CPUs, 4 GB RAM).
  3. Install netcdf(libnetcdf-dev) and gdal(libgdal1-dev).
  4. Download GMT-4.5.14, GSHHG-GMT-2.3.4, GMT4param.txt, and install_gmt4.sh
  5. Change the parameters on GMT4param.txt: GSHHG_ftp=n GSHHG_path= (installation path) GMT_ftp=n GMT_prefix= (installation path) GMT_delete=n
  6. Install these files, using: sudo sh install_gmt4.sh GMT4param.txt
  7. Add PATH of GMT to your .bashrc file.

These steps are for GMT.

For TDEFNODE:

  1. Download and compile TDEFNODE.
  2. Put all the files in a directory.
  3. Specify the PATHs for TDEFNODE and td_plot in .bashrc
  4. Install tcsh package.

Now the software runs and works with GMT. Seems no error so far.

0

(using ubuntu in this installation)

at first you should download tdefnode using This Link (README file here) and some other apps

sudo apt install make
sudo apt install gcc
sudo apt install gfortan
sudo apt install gmt
sudo apt install make
sudo apt install tcsh (this one is optional I guess)

remember, where ever you need .bashrc open it using sudo nano ~/.bashrc and where ever you want to add some thing to PATH use sudo export PATH=$PATH:/address to file/. for finding address of a file use pwd

then extract it some where like /home/user/TDEFNODE/ ; download this and do the mentioned steps for installation

And for more information about PATH , read this article

then download td_plot and add these lines to .bashrc:

export TD_HOME=/home/asdfgh/TDEFNODE
alias tdefnode='/home/asdfgh/TDEFNODE/tdefnode'
alias td_plot='/home/asdfgh/TDEFNODE/td_plot'


PATH=/usr/bin/gmt/:"${PATH}"
PATH=/etc/gmt/:"${PATH}"
PATH=/usr/lib/gmt/:"${PATH}"
PATH=/usr/bin/X11/gmt:"${PATH}"
PATH=/usr/share/gmt/:"${PATH}"
PATH=/usr/lib/gmt/bin/:"${PATH}"
PATH=/home/asdfgh/TDEFNODE/td_plot:"${PATH}"

as mentioned here: https://ubuntuforums.org/showthread.php?t=2365967

as I tried td_plot and tdefnode should work properly. ask any other questions it the comment I hope to be able to help you. :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .