How to erase sediment-variables in ROMS?

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
markus.qs
Posts: 9
Joined: Mon Jun 21, 2021 12:40 pm
Location: Ranold AS

How to erase sediment-variables in ROMS?

#1 Unread post by markus.qs »

Hello,
I'm new to the ROMS society so my knowledge is limited. I am turning here to hopefully get some answers.

When running ROMS (on an local lake called Norsjo) I don't want the model to look for the variable "erosion_stress" in the initial condition file (or other variables related to sediment). How can I modify ROMS to stop looking for it?
I tried to delete it from varinfo.dat, but that didn't work.

NLM: CHECKVARS_NF90 - unable to find model variable: erosion_stress
in file: /home/markus/norsjo/norsjo_init.nc
Found Error: 02 Line: 314 Source: ROMS/Utility/get_state.F, get_state_nf90
Found Error: 02 Line: 151 Source: ROMS/Utility/get_state.F
Found Error: 02 Line: 417 Source: ROMS/Nonlinear/initial.F
Found Error: 02 Line: 200 Source: ROMS/Drivers/nl_roms.h, ROMS_initialize

Markus
Attachments
norsjo_forcing_it_grid.nc
(80.38 MiB) Downloaded 430 times
varinfo.dat
(160.59 KiB) Downloaded 248 times
roms_norsjo.in
(152.4 KiB) Downloaded 273 times
norsjo.h
(1.96 KiB) Downloaded 268 times

User avatar
IMRAN5379
Posts: 21
Joined: Fri Sep 08, 2017 11:59 pm
Location: Indian Institute of Technology Kharagpur

Re: How to erase sediment-variables in ROMS?

#2 Unread post by IMRAN5379 »

Hi
If you do not want to look for sediment related variables then you should keep
#undef SEDIMENT in your cppdef.h file.
hope this will help you.
thanks!

markus.qs
Posts: 9
Joined: Mon Jun 21, 2021 12:40 pm
Location: Ranold AS

Re: How to erase sediment-variables in ROMS?

#3 Unread post by markus.qs »

Thanks for the reply
I tried to undefine sediment in my cppdef.h file (called norsjo.h) and it worked for the variables mud_, mud_west, ..., etc,....., bed_biodiff and bed_tau_crit (line 2377-2627 in varinfo.dat). But unfortunately it didn't work for the variables further down, e.g grain_diameter, erosion_stress, ripple_lenght etc.

Markus

User avatar
IMRAN5379
Posts: 21
Joined: Fri Sep 08, 2017 11:59 pm
Location: Indian Institute of Technology Kharagpur

Re: How to erase sediment-variables in ROMS?

#4 Unread post by IMRAN5379 »

Hi
you should individually keep #undef all variables as you mentioned e.g grain_diameter, erosion_stress, ripple_lenght etc.

Imran

markus.qs
Posts: 9
Joined: Mon Jun 21, 2021 12:40 pm
Location: Ranold AS

Re: How to erase sediment-variables in ROMS?

#5 Unread post by markus.qs »

Thanks again for the reply

How do I individually keep #undef the variables?
I tried to open the headerfile cppdefs.h (here norsjo.h) and add

# undef erosion_stress

without any luck. The same error as the previous post appeared when running ROMS:

NLM: CHECKVARS_NF90 - unable to find model variable: erosion_stress
in file: /home/markus/norsjo/norsjo_init.nc
Found Error: 02 Line: 314 Source: ROMS/Utility/get_state.F, get_state_nf90
Found Error: 02 Line: 151 Source: ROMS/Utility/get_state.F
Found Error: 02 Line: 417 Source: ROMS/Nonlinear/initial.F
Found Error: 02 Line: 200 Source: ROMS/Drivers/nl_roms.h, ROMS_initialize

Markus

User avatar
IMRAN5379
Posts: 21
Joined: Fri Sep 08, 2017 11:59 pm
Location: Indian Institute of Technology Kharagpur

Re: How to erase sediment-variables in ROMS?

#6 Unread post by IMRAN5379 »

Hi
You need not to add anything instead of that the variable which is not required for simulation should be keep #undef in your cppdef.h (header file).

markus.qs
Posts: 9
Joined: Mon Jun 21, 2021 12:40 pm
Location: Ranold AS

Re: How to erase sediment-variables in ROMS?

#7 Unread post by markus.qs »

I found out that the variable causing the error "unable to find model variable: erosion_stress" is SSW_BBL, so I tried

#undef SSW_BBL

But I need this for bottom stress formulation. The error I now got is:

CHECKDEFS - no bottom stress formulation is selected.

Markus

markus.qs
Posts: 9
Joined: Mon Jun 21, 2021 12:40 pm
Location: Ranold AS

Re: How to erase sediment-variables in ROMS?

#8 Unread post by markus.qs »

I can define another bottom variable, e.g UV_LOGDRAG instead of SSW_BBL, in other words

# undef SSW_BBL
# define UV_LOGDRAG

But when I now run ROMS I got the error:

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

I dont know if this is an better alternative ... ?

Markus

User avatar
IMRAN5379
Posts: 21
Joined: Fri Sep 08, 2017 11:59 pm
Location: Indian Institute of Technology Kharagpur

Re: How to erase sediment-variables in ROMS?

#9 Unread post by IMRAN5379 »

hello
better if you can contact the developer JC warner, he will tell you more in detail.
thanks!
Last edited by IMRAN5379 on Tue Dec 07, 2021 6:52 am, edited 1 time in total.

jcwarner
Posts: 1200
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: How to erase sediment-variables in ROMS?

#10 Unread post by jcwarner »

if go back to your original setup, and activate
#define ANA_SEDIMENT
this will create the vars needed.
to do this, i suggest you
- copy the ROMS/Functionals/ana_sediment.h to your project folder
-edit build.bash or whatever to set the path to the ANALYTICAL files
-edit ANA_SEDIMENT and copy or change all the stuff for TEST_CHAN or some other application, and rename those ifdefs to your project name.
for example

!# elif defined TEST_CHAN < -- change the name
#elif defined YOUR_APP_NAME_HERE
DO j=JstrT,JendT
DO i=IstrT,IendT
!
! Set bed layer properties.
!
DO k=1,Nbed
bed(i,j,k,iaged)=time(ng)
bed(i,j,k,ithck)=1.0_r8
bed(i,j,k,iporo)=0.90_r8
DO ised=1,NST
bed_frac(i,j,k,ised)=1.0_r8/REAL(NST,r8)
END DO
END DO
!
! Set exposed sediment layer properties.
!
bottom(i,j,irlen)=0.0_r8
bottom(i,j,irhgt)=0.0_r8
bottom(i,j,izdef)=Zob(ng)
END DO
END DO

Post Reply