TS_MPDATA and TS_U3HADVECTION_TL... Dsrc not found? I4DVAR

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
lmp4
Posts: 38
Joined: Tue Aug 12, 2014 8:32 pm
Location: Imperial College London

TS_MPDATA and TS_U3HADVECTION_TL... Dsrc not found? I4DVAR

#1 Unread post by lmp4 »

I came across this issue a few months ago and I've decided that I should try and see if anyone else has ever come across it. For my data assimilation (DA) application the original model (without the DA enabled) with the TS_MPDATA scheme performs better than other TS schemes.

Therefore I want to run the the DA model with the TS_MPDATA scheme.

Now I understand that TS_MPDATA can only be used for the non linear model therefore I set up my CPP settings as the following;

Code: Select all

#define TS_MPDATA       /* Recursive MPDATA 3D advection turn ON */ 
#define TS_U3HADVECTION_TL    /* 3rd-order upstream horiz. advection turn tangent linear ON */
#define TS_C4VADVECTION_TL    /* 4th-order centered vertical advection tangent linear turn ON */
This howevever leads to the following compilation error;

Code: Select all

ROMS/Bin/cpp_clean /scratch/lp2314/ROMS/ROMS_TEST/WC13/I4DVAR/Build_I4DVAR_V2/ad_step3d_t.f                                     90
cd /scratch/lp2314/ROMS/ROMS_TEST/WC13/I4DVAR/Build_I4DVAR_V2; /apps/mpt/mpt-2.06/bin/mpif9                                     0 -c -heap-arrays -fp-model precise -ip -O3 ad_step3d_t.f90
ad_step3d_t.f90(672): error #6404: This name does not have a type, and must have an explici                                     t type.   [DSRC]
              ELSE IF (INT(Dsrc(is)).eq.1) THEN
---------------------------^
ad_step3d_t.f90(672): error #6362: The data types of the argument(s) are invalid.   [INT]
              ELSE IF (INT(Dsrc(is)).eq.1) THEN
---------------------------^
compilation aborted for ad_step3d_t.f90 (code 1)
Dscr is the source direction for rivers right? I'm not too experianced in the ROMS code so I'm really stuck to why I can't use TS_MPDATA.

Looking into ad_step3d_t.f90 (line 672) I was wondering if

Code: Select all

 ELSE IF (INT(Dsrc(is)).eq.1) THEN
was actually meant to be

Code: Select all

 ELSE IF (INT(SOURCES(ng)%Dsrc(is)).eq.1) THEN
In any case I tried that change but it then failed compiling at -larpack with undefined references within ad_step3d_t.f90. So I'm quite stuck for ideas :( Any thoughts would be greatly appreciated!

User avatar
arango
Site Admin
Posts: 1347
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: TS_MPDATA and TS_U3HADVECTION_TL... Dsrc not found? I4DV

#2 Unread post by arango »

Yes, it needs to be SOURCES(ng)%Dsrc(is), thank you :!: That's was easy an obvious. The ARPACK library is needed in the propagators drivers for Generalized Stability Analysis that uses the tangent linear and adjoint models. What are the undefined references in ad_step3d_t? We don't need the ARPACK library to link that routine. Something is off... The ARPACK library is used for eigenvalue problems in optimal perturbations and some of sophisticated 4D-Var algorithms but not in ROMS NLM, TLM, and ADM basic numerical kernels.

lmp4
Posts: 38
Joined: Tue Aug 12, 2014 8:32 pm
Location: Imperial College London

Re: TS_MPDATA and TS_U3HADVECTION_TL... Dsrc not found? I4DV

#3 Unread post by lmp4 »

Ok thanks! Now the references are stated in the following error message I get upon trying to compile ROMS up to -larpack ;

Code: Select all

COAWST/ROMS/Lib/ARPACK/PARPACK -lparpack -L/scratch/lp2314/COAWST/ROMS/Lib/ARPACK -larpack
/scratch/lp2314/COAWST/Projects/4DVAR/Build_Angola_3km_4dvar/libADM.a(ad_step3d_t.o): In function `ad_step3d_t_mod_mp_ad_step3d_t_tile_':
ad_step3d_t.f90:(.text+0xb99d): undefined reference to `exchange_r3d_tile_'
ad_step3d_t.f90:(.text+0xbbd4): undefined reference to `mp_exchange4d_'
ad_step3d_t.f90:(.text+0x10df9): undefined reference to `mpdata_adiff_tile_'
ad_step3d_t.f90:(.text+0x16eb5): undefined reference to `ad_mpdata_adiff_tile_'
/scratch/lp2314/COAWST/Projects/4DVAR/Build_Angola_3km_4dvar/libTLM.a(tl_step3d_t.o): In function `tl_step3d_t_mod_mp_tl_step3d_t_tile_':
tl_step3d_t.f90:(.text+0x8976): undefined reference to `tl_mpdata_adiff_tile_'
make: *** [/scratch/lp2314/COAWST/Projects/4DVAR/coawstM_Angola_4dvar] Error 1
I have also attached my .h file for reference of my CPP options.
Attachments
angola_3km_4dvar.h
(25.15 KiB) Downloaded 263 times

User avatar
arango
Site Admin
Posts: 1347
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: TS_MPDATA and TS_U3HADVECTION_TL... Dsrc not found? I4DV

#4 Unread post by arango »

I changed the TS_MPDATA to TS_MPDATA_NOT_YET in several TLM, RPM, and ADM routines. It think that this will solve your compilation problem. See :arrow: trac ticket for more information. You need to update. By the way, your header file angola_3km_4dvar.h needs some cleaning, specially when you use the adjoint-based algorithms (see the WC13 application in the test repository). It pretty much has all the CPP options available in ROMS. The only version of ROMS that is tested for any adjoint-based algorithms is the one that we distribute. I noticed several CPP-options that are not part of the codes that we distribute. I guarantee that you will have problems with 4D-Var with all that mess.

lmp4
Posts: 38
Joined: Tue Aug 12, 2014 8:32 pm
Location: Imperial College London

Re: TS_MPDATA and TS_U3HADVECTION_TL... Dsrc not found? I4DV

#5 Unread post by lmp4 »

This has resolved my issue as my model now compiles! :) and thanks for the tip! I'll go through it and clean it up.

User avatar
AbhiPasula
Posts: 9
Joined: Thu Dec 12, 2019 4:10 pm
Location: Indian Institute of Science

Re: TS_MPDATA and TS_U3HADVECTION_TL... Dsrc not found? I4DVAR

#6 Unread post by AbhiPasula »

I'm trying to compile W4DVAR using 'TS_U3ADV_SPLIT'
Please find the CPP options in the attachment below.

Error i am getting while using 'TS_U3ADV_SPLIT'
------------------------
ad_t3dmix.f90(400): error #6404: This name does not have a type, and must have an explicit type. [ISTVAR]
IF (ad_LBC(iwest,isTvar(itrc),ng)%closed) THEN
-----------------------------^
compilation aborted for ad_t3dmix.f90 (code 1)

------------------------

Without TS_U3ADV_SPLIT model is blowing up at exactly the same time step irrespective of the initial conditions. :cry:

Please suggest me, where i gone wrong.? :?
Attachments
sse.h
(5.69 KiB) Downloaded 182 times

Post Reply