Compile ROMS Error: Symbol 'eps' at (1) has no IMPLICIT type

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
ywang152
Posts: 20
Joined: Wed Mar 27, 2019 2:31 am
Location: Stevens Institute of Technology

Compile ROMS Error: Symbol 'eps' at (1) has no IMPLICIT type

#1 Unread post by ywang152 »

Hello everyone!

I am trying to compile ROMS for my case study of simulating water current of an estuary, without wind force. I have successfully compiled and run the Upwelling case.
Attachment is the header file I created for my case study, but when I tried to compile ROMS with the it, I got this problem:

Code: Select all

cd /home/ywang/roms/Projects/DOT/Build; /usr/bin/gfortran -c -frepack-arrays -O3 -ffast-math tl_zetabc.f90
tl_zetabc.f90:853.23:

      cff=Dcrit(ng)-eps
                       1
Error: Symbol 'eps' at (1) has no IMPLICIT type
make: *** [/home/ywang/roms/Projects/DOT/Build/tl_zetabc.o] Error 1
I dig into the tl_zetabc.f90 a little bit and find out if I active option 'WET_DRY', the eps will be required. However, I also saw that in the script .../ROMS/Nonlinear/wetdry.F, the eps has been set up at line 181:

Code: Select all

      real(r8), parameter :: eps = 1.0E-10_r8
I guess I didn't set up the header file correctly, but not sure which option is not right.

Thanks for your help in advance!

Best regards
Yifan
Attachments
estuarynw.h
(1.92 KiB) Downloaded 206 times

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

Re: Compile ROMS Error: Symbol 'eps' at (1) has no IMPLICIT

#2 Unread post by arango »

The WET_DRY option is not adjointed because it not fully differentiable, and because of every time-step of the forward trajectory need to be saved to have a consistent linearization of the tangent linear (TLM) and adjoint (ADM) models. You cannot use such time-depending land/sea masking in any ROMS TLM and ADM application. It actually doesn't make much sense from the discrete linearization problem. That's the reason that it is not available.

ywang152
Posts: 20
Joined: Wed Mar 27, 2019 2:31 am
Location: Stevens Institute of Technology

Re: Compile ROMS Error: Symbol 'eps' at (1) has no IMPLICIT

#3 Unread post by ywang152 »

arango wrote:The WET_DRY option is not adjointed because it not fully differentiable, and because of every time-step of the forward trajectory need to be saved to have a consistent linearization of the tangent linear (TLM) and adjoint (ADM) models. You cannot use such time-depending land/sea masking in any ROMS TLM and ADM application. It actually doesn't make much sense from the discrete linearization problem. That's the reason that it is not available.
Thank you very much Arango!
I am not sure if I understand right. Are you meaning based on my header file, the land/sea masking become a time-depending variable? I used to undef WET_DRY but other errors happened:

Code: Select all

ad_set_vbc.f90:343.36:

          ad_stflx(i,j,itemp)=0.0_r8
                                    1
Error: Unexpected STATEMENT FUNCTION statement at (1)
ad_set_vbc.f90:349.30:

          ad_stflx(i,j,itemp)=ad_stflx(i,j,itemp)+ad_cff2
                              1
Error: Statement function at (1) is recursive
ad_set_vbc.f90:334.15:

          cff2=stflx(i,j,itemp)
               1
Error: Function 'stflx' at (1) has no IMPLICIT type
ad_set_vbc.f90:335.48:

          cff3=0.5_r8*(1.0_r8+SIGN(1.0_r8,cff1-t(i,j,N(ng),nrhs,itemp)))
                                                1
Error: Function 't' at (1) has no IMPLICIT type
ad_set_vbc.f90:342.25:

     &            ad_stfx(i,j,itemp)
                         1
Error: Function 'ad_stfx' at (1) has no IMPLICIT type
make: *** [/home/ywang/roms/Projects/DOT/Build/ad_set_vbc.o] Error 1
I have the grid nc file with land/sea masking, created by GridBuilder. it seems MASKING and WET_DRY should be retained. The thing that confused me is which options in my header file cause this problem. Do you have any suggestion about how to modify it? Thank you again! Also, I would try to learn cppdefs.h more to find the answer.

Best regards
Yifan
Attachments
estuarynw.h
(1.92 KiB) Downloaded 214 times

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

Re: Compile ROMS Error: Symbol 'eps' at (1) has no IMPLICIT

#4 Unread post by arango »

You didn't understand at all what I was saying to you, or what WET_DRY does. The wetting and drying option (WET_DRY) is modeled in ROMS by changing the associated land/sea masking arrays at every barotropic time-step in step2d, which affect the ocean state variables. The wet/dry mask is a new array in the top the time-independent regular land/sea masks that are defined in the ROMS input grid NetCDF. Since the wetting and drying change the land/sea mask at every timestep, it will affect the forward nonlinear trajectory used to linearized the tangent linear and adjoint models. Such mask arrays become time-dependent and time-differentiable in the tangent and adjoint kernels since they are part of the ocean state. We use variational calculus to build the TLM and ADM kernels. Their trajectories are time-stepped forward and backward. It is costly to reconstruct the changes of wetting and drying backward in time in the adjoint model. If you still don't understand adjoint-based algorithms, you have a lot of homework ahead of you to understand such a concept before using such algorithms.

:idea: If you want to use a TLM/ADM application, you need to undefine WET_DRY from your application because it is no supported in ROMS. It is that simple :!:

ywang152
Posts: 20
Joined: Wed Mar 27, 2019 2:31 am
Location: Stevens Institute of Technology

Re: Compile ROMS Error: Symbol 'eps' at (1) has no IMPLICIT

#5 Unread post by ywang152 »

arango wrote:You didn't understand at all what I was saying to you, or what WET_DRY does. The wetting and drying option (WET_DRY) is modeled in ROMS by changing the associated land/sea masking arrays at every barotropic time-step in step2d, which affect the ocean state variables. The wet/dry mask is a new array in the top the time-independent regular land/sea masks that are defined in the ROMS input grid NetCDF. Since the wetting and drying change the land/sea mask at every timestep, it will affect the forward nonlinear trajectory used to linearized the tangent linear and adjoint models. Such mask arrays become time-dependent and time-differentiable in the tangent and adjoint kernels since they are part of the ocean state. We use variational calculus to build the TLM and ADM kernels. Their trajectories are time-stepped forward and backward. It is costly to reconstruct the changes of wetting and drying backward in time in the adjoint model. If you still don't understand adjoint-based algorithms, you have a lot of homework ahead of you to understand such a concept before using such algorithms.

:idea: If you want to use a TLM/ADM application, you need to undefine WET_DRY from your application because it is no supported in ROMS. It is that simple :!:
Thanks for your explanation, I understand now. apparently, I need to do some homework about the algorithm and make it clear which algorithm should be used in which kind of case. Thank you again!

Best regards
Yifan

Post Reply