Questions about processing package

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
backkom
Posts: 35
Joined: Wed Nov 07, 2007 5:03 pm
Location: Ocean University of China

Questions about processing package

#1 Unread post by backkom »

Hi, i am a newbie to roms and linux,here i have a doubt about the processing packages.
i think the packages need to be compiled by make,is it right? there are many makefiles in the packages like Makefile.Cray,my configuration is as follows:
os: fedora 9
cc: gcc
fc: gfortran

but i don't find the Makefile.linux,so could someone give me some adive about this?

linzhenhua
Posts: 64
Joined: Mon Oct 17, 2005 2:02 am
Location: Institute of Oceanology,Chinese Academy of Sciences

Re: Questions about processing package

#2 Unread post by linzhenhua »

Since you could find file "Makefile.cray",it seems that you use an old roms version. Use Makefile.gfortran if you have this file,or change Makefile.ifort or Makefile.pgi for the gfortran compiler.

Generally,The developers advise you to update to the newest version.The new version has a new makefile structure and has support for gfortran.

backkom
Posts: 35
Joined: Wed Nov 07, 2007 5:03 pm
Location: Ocean University of China

Re: Questions about processing package

#3 Unread post by backkom »

linzhenhua wrote:Since you could find file "Makefile.cray",it seems that you use an old roms version. Use Makefile.gfortran if you have this file,or change Makefile.ifort or Makefile.pgi for the gfortran compiler.

Generally,The developers advise you to update to the newest version.The new version has a new makefile structure and has support for gfortran.

lin,thanks very much for your kind reply!
i think my roms source code is the newest version and my questions here is about the processing package which are download seperately from:https://www.myroms.org/index.php?page=Processing several days ago,if changing from other Makefile,would you give some suggestions which items need to be modified.
thanks!

linzhenhua
Posts: 64
Joined: Mon Oct 17, 2005 2:02 am
Location: Institute of Oceanology,Chinese Academy of Sciences

Re: Questions about processing package

#4 Unread post by linzhenhua »

Hi
Just have a glance at the forcing package.I think the Best template for you is Makefile.Gnu ,you need to change the compiler,path etc. And it seems that it depends on ncar graphics,so you should first install it.

And the code was written 8 years ago,I'm not sure whether ROMS group still support it.

backkom
Posts: 35
Joined: Wed Nov 07, 2007 5:03 pm
Location: Ocean University of China

Re: Questions about processing package

#5 Unread post by backkom »

linzhenhua wrote:Since you could find file "Makefile.cray",it seems that you use an old roms version. Use Makefile.gfortran if you have this file,or change Makefile.ifort or Makefile.pgi for the gfortran compiler.

Generally,The developers advise you to update to the newest version.The new version has a new makefile structure and has support for gfortran.

lin,thanks very much for your kind reply!
the package are download from ROMS´s official webset:https://www.myroms.org/index.php?page=Processing several days ago,and i choose Makefile.Gnu as my makefill,it seems to me that nothing needs to be changed in this file,the configure of the Makefile.Gnu is as follows:
# CFT Name of the fortran compiler to use
# CPP Name of the GNU C preprocessor
# CPPFLAGS Flags to the C preprocessor
# FFLAGS Flags to the fortran compiler
# INCDIR Include directory
# LDR Program to load the objects into an executable
# LDFLAGS Flags to the loader
# RANLIB Name of ranlib command
# MDEPFLAGS Flags for sfmakedepend (-s if you keep .f files)
# CDFLIB Name of netCDF library, either -lnetcdf or null
#

CFT = g77
CPP = $(HOME)/bin/cpp
INCDIR = /usr/local/include
CPPFLAGS = -P -I$(INCDIR)
GLDR = ncargf77
LDR = g77
RANLIB = ranlib

LDFLAGS =
# FFLAGS = -g -DNO_EXIT
FFLAGS = -DNO_EXIT -g -O2
MDEPFLAGS = -I $(INCDIR)

LIBDIR = /usr/local/lib
CDFLIB = -L$(LIBDIR) -lnetcdf
LIBS = $(CDFLIB)

SHELL = /bin/sh
CC = cc

STD_INCLUDES = StandardIncludes
STD_DEFINES =
EXTRA_LOAD_FLAGS = ExtraLoadFlags

ICONFIGFILES = $(IRULESRC)/Imake.tmpl \
$(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)


but when i make: make -f Makefile.Gnu
the following error occours:
[root@backkom initial]# make -f Makefile.gfortran clean
/bin/rm -f *.o core *.trace
[root@backkom initial]# make -f Makefile.Gnu
g77 -c -DNO_EXIT -g -O2 initial.F
g77 -c -DNO_EXIT -g -O2 bleck.F
g77 -c -DNO_EXIT -g -O2 crash.F
g77 -c -DNO_EXIT -g -O2 day_code.F
g77 -c -DNO_EXIT -g -O2 get_date.F
get_date.F: In subroutine `get_date':
get_date.F:113:
mon=1
^
Invalid declaration of or reference to symbol `mon' at (^) [initially seen at (^)]
make: *** [get_date.o] Error 1

the result shows that the makefile is ok, is it right?
and the error indicates a undefined variable: mon in get_date.F ,so i look through the get-date.f ,the variables definition code is as follows:
!
# include cppdefs.h
implicit none
INTEGER_TYPE
& dstat, half, hour, iday, imon, len1, len2, len3, min,
& nday, sec, tstat, year
INTEGER_TYPE
& lday(31), lmonth(12)
INTEGER_TYPE
& lenstr
#if defined cray
INTEGER_TYPE
& century
parameter (century=1900)
character*8 tstring
#elif defined sun || defined sgi || defined DECALPHA
character*3 day3, mon
character*28 fdate, tmpday
#elif defined AIX
character*3 day3, mon
character*28 tmpday
#endif
character*3 ampm(0:1)
character*9 day(0:6), month(12)
character*11 ctime
character*18 today
character*20 fmt
character*44 wkday
character*(*) date_str
data ampm /' AM',' PM'/
data day /'Sunday','Monday','Tuesday','Wednesday','Thursday',
& 'Friday','Saturday'/
data lmonth, lday /7,8,5,5,3,4,4,6,9,7,8,8,9*1,22*2/
data month /'January','February','March','April','May','June',
& 'July','August','September','October','November',
& 'December'/
!

it seems that only cases for cray,sgi,sun,aix,DECALPHA exist ,why not for the others?
and all the define seems to be in the include file: cppdefs.h ,so i wanna to know whether cppdefs.h needs modify ,if needs, how?
or i have to modify the code in get_date.F ?

Any suggestions will be greatly appreciated !
thanks!

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Questions about processing package

#6 Unread post by kate »

it seems that only cases for cray,sgi,sun,aix,DECALPHA exist ,why not for the others?
and all the define seems to be in the include file: cppdefs.h ,so i wanna to know whether cppdefs.h needs modify ,if needs, how?
or i have to modify the code in get_date.F ?
Those are the systems we were using back in the day when we actually used this code. We know it at least did work on them once. In this case, the Sun/Dec, etc case is probably the most "normal" and I would rewrite the if test so that it becomes the default, then see if that works for you.

By the way, we are using Matlab now for these tasks.

backkom
Posts: 35
Joined: Wed Nov 07, 2007 5:03 pm
Location: Ocean University of China

Re: Questions about processing package

#7 Unread post by backkom »

Thanks kate for your help!
i wanna to know which tools is convinent for the pre and post processing tasks for Roms .and the Matlab tools you mentioned is Roms_tools, is it right? or simply the CDL packages in trunk\Data\ROMS\CDL?

thanks !

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Questions about processing package

#8 Unread post by kate »

Perhaps you should be more specific about exactly what you'd like to do. There are several scripts floating around that aren't on any repository that I know of. The ones I use take advantage of Manu's RNT toolbox. Or are you talking about plotting up your results? I use both Hernan's plot package and NCL. Then there's the octant effort in Python.

What I use (note that I'm the oddball on most of these):
* xcoast/gridpak for making grids
* NCL to process OTPS tides
* ROMS to interpolate the forcing fields from global CORE files
* RNT/Matlab scripts to create initial and forcing files
* Back in the day I used Perl/PDL to make river files from
* coastline files extracted using C++ maskedge

backkom
Posts: 35
Joined: Wed Nov 07, 2007 5:03 pm
Location: Ocean University of China

Re: Questions about processing package

#9 Unread post by backkom »

Thanks kate for your reply!
I wanna to generate all the input files for my own applications. I will try the tools you suggested.
thanks!

Post Reply