compiling ROMS with DIAGNOSTICS_TS

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
fabeobd
Posts: 13
Joined: Thu Jun 09, 2011 2:10 pm
Location: CCRC - UNSW
Contact:

compiling ROMS with DIAGNOSTICS_TS

#1 Unread post by fabeobd »

Hi all,

I'm trying to compile the source code to get the tendency diagnostics for temperature tracer. The compilation (and model) works fine without it, but it returns this error when I add #define DIAGNOSTICS_TS into my .h file:

===========================================================

cd /projappl/project_2000339/source/waom/Build; /appl/opt/cluster_studio_xe2018/compilers_and_libraries_2018.5.274/linux/mpi/intel64/bin/mpif90 -c -heap-arrays -fp-model precise -g -check bounds -traceback -check uninit -warn interfaces,nouncalled -gen-interfaces wrt_diags.f90
wrt_diags.f90(76): error #6404: This name does not have a type, and must have an explicit type. [IDDTRC]
ifield=idDtrc(itrc,ivar)
-----------------^
compilation aborted for wrt_diags.f90 (code 1)
make: *** [/projappl/project_2000339/source/waom/Build/wrt_diags.o] Error 1

===========================================================

There is anything I'm missing?

Many thanks,
Fabio
Fabio Boeira Dias, PhD
Postdoctoral researcher
Climate Change Research Centre (CCRC)
University of New South Wales

User avatar
robertson
Site Admin
Posts: 219
Joined: Wed Feb 26, 2003 3:12 pm
Location: IMCS, Rutgers University

Re: compiling ROMS with DIAGNOSTICS_TS

#2 Unread post by robertson »

idDtrc is "typed" and allocated in mod_ncparam. Check the mod_ncparam.f90 file in your /projappl/project_2000339/source/waom/Build directory. There should be a block like this:

Code: Select all

!
!  Tracer/Momentum Diagnostic variable IDs.
!
        integer, allocatable :: idDtrc(:,:)   ! tracers terms
        integer, allocatable :: idDu2d(:)     ! 2D u-momentum terms
        integer, allocatable :: idDv2d(:)     ! 2D v-momentum terms
        integer, allocatable :: idDu3d(:)     ! 3D u-momentum terms
        integer, allocatable :: idDv3d(:)     ! 3D v-momentum terms
There should also be an

Code: Select all

        allocate ( idDtrc(MT,NDT) )
line further down in that file. Your compiler isn't complaining about the module "mod_ncparam" not existing but also check that mod_ncparam.mod exists and that the line

Code: Select all

      USE mod_ncparam
exists in your wrt_diags.f90 file.

What svn revision number of ROMS are you using?

fabeobd
Posts: 13
Joined: Thu Jun 09, 2011 2:10 pm
Location: CCRC - UNSW
Contact:

Re: compiling ROMS with DIAGNOSTICS_TS

#3 Unread post by fabeobd »

Hi Robertson,

thanks for your help. I'm using a frozen ROMS 3.6 version from people at University of Tasmania that do ice sheet model development. I check the mod_ncparam.f90 and it indeed does not contain the block you mentioned above. The mod_ncparam is being used in the wrt_diags.F though.

As the code I'm currently using have other modifications, I solved it by adding manually the pieces related with diagnostics from an updated mod_ncparam.F. The model compiled ok and I'm going to test it now.

Do you think this is a viable solution? Or I should do the other way around, by getting the most updated code and them add all the pieces from the ice sheet development? I'm just starting a project and I think might worth to expend this time now than later down the road. I'm also keen to improve the ROMS tracer diagnostics by splitting the mixing component due to individual parameterisation schemes (something I have been working with MOM5 that would be nice to have in ROMS for this project).

Many thanks,
Fabio
Fabio Boeira Dias, PhD
Postdoctoral researcher
Climate Change Research Centre (CCRC)
University of New South Wales

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

Re: compiling ROMS with DIAGNOSTICS_TS

#4 Unread post by kate »

This is a matter of personal preference. I have a friend here to swears by never updating his code such that if he now had to update, it would be a matter of months of work to merge his stuff with modern ROMS and he's hoping to retire before it comes to that. I go the other way, trying to merge early and often. Nine times out of ten it is easy and painless with git. I have enough personal code that that other time is something else again.

Post Reply