Queries regarding possible use of modified test_chan case in ROMS

Discussion of how to use ROMS on different regional and basin scale applications.

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
neelbasak08
Posts: 99
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

Queries regarding possible use of modified test_chan case in ROMS

#1 Unread post by neelbasak08 »

Hello!

I am for the first time trying to do something of this kind in ROMS 3.9. I thought of creating a test open channel case where I put bottom sand properties such as average grain diameter depending on the type of sand maybe somewhere around (100 to 200 microns) depending case, would love to input bottom sand bed density, add a porosity value and edit either free slip or no-slip condition at the bottom of the channel. And then investigate the velocity profiles u,v and temperature profiles and how they are affected by having various soil condition at the bottom.

I identified the Sediment test channel case study on wikiROMS and decided to look into it, now I face certain queries in it.

On investigating the in the file of sediment test_chan case I see the following things:
!------------------------------------------------------------------------------
! General sediment bed model parameters.
!------------------------------------------------------------------------------

! Depositional bed layer thickness criteria to create a new layer (m). If
! deposition exceeds this value, then a new layer is created, [1:Ngrids].

NEWLAYER_THICK == 0.01d0

! Bedload transport rate coefficient. [1:Ngrids].

BEDLOAD_COEFF == 0.15d0

! Logical switches (TRUE/FALSE) to activate writing of bed layer parameters,
! [1:Ngrids] values expected.

Hout(ithck) == T ! bed_thickness sediment layer thickness
Hout(iaged) == F ! bed_age sediment layer age
Hout(iporo) == T ! bed_porosity sediment layer porosity
Hout(idiff) == F ! bed_biodiff biodiffusivity

! Logical switches (TRUE/FALSE) to activate writing of bed bottom sediment
! parameters, [1:Ngrids] values expected.

Hout(isd50) == T ! grain_diameter mean grain diameter
Hout(idens) == T ! grain_density mean grain density
Hout(iwsed) == T ! settling_vel mean settling velocity
Hout(itauc) == T ! erosion_stress critical erosion stress

! Non-cohesive Sediment Parameters, [1:NNS,1:Ngrids] values expected.
!------------------------------------------------------------------------------

! Median sediment grain diameter (mm).

SAND_SD50 == 1.0d0

! Sediment concentration (kg/m3).

SAND_CSED == 0.0d0

! Sediment grain density (kg/m3).

SAND_SRHO == 2650.0d0

! Particle settling velocity (mm/s).

SAND_WSED == 1.0d0

! Surface erosion rate (kg/m2/s).

SAND_ERATE == 5.0d-4

! Critical shear for erosion and deposition (N/m2).

SAND_TAU_CE == 0.1d0
SAND_TAU_CD == 0.1d0

! Porosity (nondimensional: 0.0-1.0): Vwater/(Vwater+Vsed).

SAND_POROS == 0.5d0
It seems that sediment_test_chan doesn't write velocity, temperatures into the output history file. So I think of not using it. While trying to observe roms_test_chan in the file I see:
Hout(idUvel) == T ! u 3D U-velocity
Hout(idVvel) == T ! v 3D V-velocity
Hout(idu3dE) == F ! u_eastward 3D U-eastward at RHO-points
Hout(idv3dN) == F ! v_northward 3D V-northward at RHO-points
Hout(idWvel) == T ! w 3D W-velocity
Hout(idOvel) == F ! omega omega vertical velocity
Hout(idUbar) == T ! ubar 2D U-velocity
Hout(idVbar) == T ! vbar 2D V-velocity
Hout(idu2dE) == F ! ubar_eastward 2D U-eastward at RHO-points
Hout(idv2dN) == F ! vbar_northward 2D V-northward at RHO-points
Hout(idFsur) == T ! zeta free-surface
Hout(idBath) == T ! bath time-dependent bathymetry
It seems there's no way to change the grain size average diameter, sand bed density etc. in the roms_test_chan in file.

Can we use ana_sediment with this roms_test_chan.in file ?

While trying to investigate into ana_sediment.f I see the following and there's a place where I could modify my parameters :
#if defined BBL_MODEL && !defined SEDIMENT
!
!-----------------------------------------------------------------------
! If only bottom boundary layer and not sediment model, set bottom
! sediment grain diameter (m) and density (kg/m3).
!-----------------------------------------------------------------------
!
# if defined BL_TEST || defined NJ_BIGHT
DO j=JstrT,JendT
DO i=IstrT,IendT
bottom(i,j,isd50)=0.0005_r8
bottom(i,j,idens)=2650.0_r8
END DO
END DO
# elif defined LAKE_SIGNELL || defined ADRIA02
DO j=JstrT,JendT
DO i=IstrT,IendT
bottom(i,j,isd50)=0.000150_r8 ! 150 microns
bottom(i,j,idens)=2650.0_r8
END DO
END DO
# elif defined SED_TOY
DO j=JstrT,JendT
DO i=IstrT,IendT
bottom(i,j,isd50)=0.0005_r8
bottom(i,j,idens)=2650.0_r8
END DO
END DO
# else
ana_sediment.h: no values provided for bottom(:,:,isd50) and
bottom(:,:,idens)
# endif
So just by modifying the ana_sediment in my project directory and adding my case in the quotes, editing the avg grain diameter and density in this ana_sediment, will I be heading in the right direction? I am thinking of using define ana_sediment, define BBL_MODEL, undefine sediment along with others in my header file and using the template and fields of roms_test_chan in the file for my model run.

Any help is deeply appreciated.

Kind regards
-Neel
Last edited by neelbasak08 on Mon Jun 14, 2021 2:57 pm, edited 1 time in total.

User avatar
neelbasak08
Posts: 99
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

Re: Queries regarding possible use of modified test_chan case in ROMS

#2 Unread post by neelbasak08 »

While trying to execute what I planned to do, I faced with some build errors:
undefined -finit-real=nan -ffpe-trap=invalid,zero,overflow -ffree-form -ffree-line-length-none analytical.f90
analytical.f90:1522:18:

1522 | ana_sediment.h: no values provided for bottom(:,:,isd50) and
| 1
Error: ‘ana_sediment’ at (1) is not a variable
analytical.f90:1523:54:

1523 | bottom(:,:,idens)
| 1
Error: Invalid character in name at (1)
make: *** [ROMS/Functionals/Module.mk:15: /home/sbasak08/roms/Projects/test_chan/Build_romsG/analytical.o] Error 1
Although I have # define BBL_MODEL and #undef SEDIMENT while #define ANA_SEDIMENT in my tets_chan header file and in my ana_sediment.h file as well I have defined my case :
!-----------------------------------------------------------------------
! If only bottom boundary layer and not sediment model, set bottom
! sediment grain diameter (m) and density (kg/m3).
!-----------------------------------------------------------------------
!
# if defined BL_TEST || defined NJ_BIGHT
DO j=JstrT,JendT
DO i=IstrT,IendT
bottom(i,j,isd50)=0.0005_r8
bottom(i,j,idens)=2650.0_r8
END DO
END DO
# elif defined LAKE_SIGNELL || defined ADRIA02
DO j=JstrT,JendT
DO i=IstrT,IendT
bottom(i,j,isd50)=0.000150_r8 ! 150 microns
bottom(i,j,idens)=2650.0_r8
END DO
END DO
# elif defined SED_TOY
DO j=JstrT,JendT
DO i=IstrT,IendT
bottom(i,j,isd50)=0.0005_r8
bottom(i,j,idens)=2650.0_r8
END DO
END DO
# elif defined TEST_CHAN
DO j=JstrT,JendT
DO i=IstrT,IendT
bottom(i,j,isd50)=0.000150_r8
bottom(i,j,idens)=2650.0_r8
END DO
END DO
# else
ana_sediment.h: no values provided for bottom(:,:,isd50) and
bottom(:,:,idens)
# endif
I still get this error taking the else case from ana_sediment when I've clearly defined my case in it.

Kind regards
-Neel
Last edited by neelbasak08 on Mon Jun 14, 2021 3:08 pm, edited 1 time in total.

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

Re: Queries regarding possible use of modified test_chan case in ROMS

#3 Unread post by jcwarner »

I think you are modifying the ana_sediment in ROMS/Functionals ???
what did you set for the path to the analytical files, in the build.bash or whatever you are using?

export MY_HEADER_DIR=${MY_PROJECT_DIR}/??????
export MY_ANALYTICAL_DIR=${MY_PROJECT_DIR}/???? - what did you set here???

I suggest you copy the file ROMS/Functionals/ana_sediment.h to your project folder, edit the file in that folder, and set the Header_dir and analytical_dir to that folder.
Also, if you activate ssw_bbl, i suggest you also activate define SEDIMENT and define ANA_SEDIMENT.
it will make things easier.
-j

User avatar
neelbasak08
Posts: 99
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

Re: Queries regarding possible use of modified test_chan case in ROMS

#4 Unread post by neelbasak08 »

sir,

I had made a sepearte directory in my project directory and placed the ana_sediment file in /home/sbasak08/roms/Projects/test_chan/Functionals/ana_sediment.

My build_roms.sh file has:

export MY_HEADER_DIR='pwd'
export MY_ANALYTICAL_DIR= 'pwd'

I tried activating define SEDIMENT and define ANA_SEDIMENT along with define SSW_BBL, I still get the same earlier error so I described in my earlier post.

So I tried to compile the default way in ROMS, by copying the ana_sediment file in my project directory and not changing anything provided in the test channel header file, but I get a very different kind of error where execution of "roms_test_chan.in" gives the error even though I have the file sediment_test_chan.in in my desired location home/sbasak08/roms/Projects/test_chan/External/:
At line 89 of file inp_par.f90 (unit = 25)
Fortran runtime error: Cannot open file 'home/sbasak08/roms/Projects/test_chan/External/sediment_test_chan.in': No such file or directory
Kind regards
-Neel

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

Re: Queries regarding possible use of modified test_chan case in ROMS

#5 Unread post by jcwarner »

maybe it needs a leading /
change
home/sbasak08/roms/Projects/test_chan/External/sediment_test_chan.in
to
/home/sbasak08/roms/Projects/test_chan/External/sediment_test_chan.in

??

Post Reply