How to erase sediment-variables in ROMS?
How to erase sediment-variables in ROMS?
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
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 440 times
-
- varinfo.dat
- (160.59 KiB) Downloaded 257 times
-
- roms_norsjo.in
- (152.4 KiB) Downloaded 287 times
-
- norsjo.h
- (1.96 KiB) Downloaded 276 times
- 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?
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!
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!
Re: How to erase sediment-variables in ROMS?
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
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
- 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?
Hi
you should individually keep #undef all variables as you mentioned e.g grain_diameter, erosion_stress, ripple_lenght etc.
Imran
you should individually keep #undef all variables as you mentioned e.g grain_diameter, erosion_stress, ripple_lenght etc.
Imran
Re: How to erase sediment-variables in ROMS?
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
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
- 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?
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).
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).
Re: How to erase sediment-variables in ROMS?
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
#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
Re: How to erase sediment-variables in ROMS?
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
# 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
- 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?
hello
better if you can contact the developer JC warner, he will tell you more in detail.
thanks!
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.
Re: How to erase sediment-variables in ROMS?
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
#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