Welcome, Guest
Username: Password: Remember me

TOPIC: Set a non-erodible bottom

Set a non-erodible bottom 3 years 7 months ago #38099

  • sanaz
  • sanaz's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 69
  • Thank you received: 1
Hello all,
I am trying to set a non-erodible bottom in my geometry file by defining a variable "NOER" in the geometry file
I also Set the following keywords in the GAIA steering file:
NUMBER OF PRIVATE ARRAYS = 1
NAMES OF PRIVATE VARIABLES= 'NOER M '
I also modified the subroutine noerod.f as follows:
Add the following line just below USE BIEF:
USE DECLARATIONS_GAIA, ONLY: PRIVE
Replace the default CALL OV that sets the erodible bed 100 m below
the river bottom CALL OV(’X=Y+C ’,ZR,ZF,ZF,-100.D0,NPOIN) by the
following:
CALL OV('X=Y-Z ', ZR, ZF, PRIVE%ADR(1)%P%R, 0.D0, NPOIN
And call this subroutine from the keyword FORTRAN FILE in the steering file.
However, for some reasons it seems the model still can not call the non erod region and the non erodible region is still getting eroded.
Please see the attached my geometry file, T3D CAS file, GAIA CAS file as well as noerod.f subroutine. I followed everything from the GAIA manual but still have problem.

Your help on this is very much appreciated!
Sanaz
Attachments:
The administrator has disabled public write access.

Set a non-erodible bottom 3 years 7 months ago #38103

  • mafknaapen
  • mafknaapen's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 157
  • Thank you received: 62
Hi Sanaz,
You have coded everything correct, I think. However, the user manual incorrectly states that you should create a noerod.f file. Try again with the file renamed to USER_BED_INIT.f
Dr Michiel Knaapen
Senior Scientist
E This email address is being protected from spambots. You need JavaScript enabled to view it.
T +44 (0)1491 822399

HR Wallingford, Howbery Park, Wallingford, Oxfordshire OX10 8BA, United Kingdom
T +44 (0)1491 835381, F +44 (0)1491 832233
www.hrwallingford.com
The administrator has disabled public write access.

Set a non-erodible bottom 3 years 7 months ago #38110

  • sanaz
  • sanaz's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 69
  • Thank you received: 1
Hello,
Thanks alot for your respond.
However, I did not get what you mean by renaming the file to USER_BED_INIT.f. you mean renaming the fortran file?
is not the SER_BED_INIT.f related to sediment layer thickness?


Thanks in advance.
Sanaz
The administrator has disabled public write access.

Set a non-erodible bottom 3 years 7 months ago #38121

  • mafknaapen
  • mafknaapen's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 157
  • Thank you received: 62
Sorry, I do realise that was not very clear. The structure of GAIA is such that all user defined bed composition data is initialise in USER_BED_INIT.f.

I am still getting used to it myself, but I think you will need to change the line

ESTRATUM(ISTRAT,IPOIN) = SED_THICK(ISTRAT)

to something like

ESTRATUM(ISTRAT,IPOIN) = PRIVE%ADR(1)%P%R(IPOIN)
Dr Michiel Knaapen
Senior Scientist
E This email address is being protected from spambots. You need JavaScript enabled to view it.
T +44 (0)1491 822399

HR Wallingford, Howbery Park, Wallingford, Oxfordshire OX10 8BA, United Kingdom
T +44 (0)1491 835381, F +44 (0)1491 832233
www.hrwallingford.com
The administrator has disabled public write access.
The following user(s) said Thank You: sanaz

Set a non-erodible bottom 3 years 7 months ago #38122

  • sanaz
  • sanaz's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 69
  • Thank you received: 1
Thanks alot mafknaapen. You are completely right. I modified USER_BED_INIT.f. As follows:
add the following line just below USE BIEF:
USE DECLARATIONS_GAIA, ONLY: PRIVE

And replaced ESTRATUM(ISTRAT,IPOIN) = PRIVE%ADR(1)%P%R(IPOIN) with ESTRATUM(ISTRAT,IPOIN) = SED_THICK(ISTRAT)

also Added the following lines in GAIA CAS file.
NUMBER OF PRIVATE ARRAYS = 1
NAMES OF PRIVATE VARIABLES= 'NOER M '
but it seems the bed is eroding. I defined the non-erodible bed thinness as 0 m in my SERAFIN file and other erodible bed as 100.

Do you think it is my geometry file problem? I also attached my geo file and fortran file here.

Thanks in advance!
Sanaz
Attachments:
The administrator has disabled public write access.

Set a non-erodible bottom 3 years 7 months ago #38126

  • pavans
  • pavans's Avatar
  • OFFLINE
  • Moderator
  • Posts: 46
  • Thank you received: 17
Hello Sanaz,

I cannot check all your files , however I think that your code is not read by Telemac : you should read the first part of the subroutine (remove the return statement).

Hope it helps

Sara
The administrator has disabled public write access.
The following user(s) said Thank You: sanaz

Set a non-erodible bottom 3 years 7 months ago #38127

  • sanaz
  • sanaz's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 69
  • Thank you received: 1
Hi Sara,
Thanks for the response. Yes, I realized that but still it seems still it is not working.Please see below. The model is working but the specified non erod region is still eroding. Thanks for your help in advance!



! ************************
SUBROUTINE USER_BED_INIT
! ************************
!
&(NUMSTRAT,NPOIN,NSICLA,ESTRATUM,RATIO_INIT)
!
!***********************************************************************
! GAIA
!***********************************************************************
!
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!>@param[in] NPOIN Number of points
!>@param[in] NSICLA Number of sediment classes
!>@param[in] NUMSTRAT Number of initial physical layers
!>@param[in,out] ESTRATUM Thickness of initial layers
!>@param[in,out] RATIO_INIT Initial ratio of sediment classes
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
USE BIEF
! USE DECLARATIONS_GAIA, ONLY: AVA0,SED_THICK
USE DECLARATIONS_GAIA, ONLY: AVA0,PRIVE
USE DECLARATIONS_SPECIAL
IMPLICIT NONE
!
!!-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
!
INTEGER, INTENT(IN) :: NUMSTRAT,NPOIN,NSICLA
DOUBLE PRECISION,INTENT(INOUT):: ESTRATUM(NUMSTRAT,NPOIN)
DOUBLE PRECISION,INTENT(INOUT):: RATIO_INIT(NSICLA,NUMSTRAT,NPOIN)
!!-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
!
INTEGER :: IPOIN,ICLA,ISTRAT
!
!!-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
!
! REMOVE THIS RETURN IF YOU WANT TO ENTER INTO THIS USER SUBROUTINE
! IF (.TRUE.) RETURN
!
!!-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
!
!
!======================================================================!
!
! EXAMPLE 1: DEFAULT CASE: NO STRATIFICATION = ONLY ONE STRATUM 100 M DEEP

IF (.FALSE.) THEN
! USER CAN CHANGE THE THICKNESS OF SEDIMENT HERE
! (REPLACES SUBROUTINE NOEROD)
! GRADED SEDIMENT: USER CAN DEFINE AN INITIAL STRATIFICATION
! DEFINED BY LAYER THICKNESS AND COMPOSITION FOR EACH STRATUM
!
! POROSITY IS DEFINED (KEYWORD) FOR STRATUMS.
! THE VALUE FOR THE FIRST STRATUM IS COPIED IN
! THE FIRST TWO NUMERICAL LAYERS (ACTIVE LAYER + FIRST STRATUM)
DO IPOIN=1,NPOIN
DO ISTRAT=1,NUMSTRAT

! DEFAULT CASE: ALL STRATUMS HAVE SAME THICKNESS.
! THIS CAN BE CHANGED BY USER
! SED_THICK=0.0D0
! ESTRATUM(ISTRAT,IPOIN) = SED_THICK(ISTRAT)
ESTRATUM(ISTRAT,IPOIN) = PRIVE%ADR(1)%P%R(IPOIN)
! DEFAULT CASE: ALL STRATUMS HAVE SAME COMPOSITION.
! THIS CAN BE CHANGED BY USER
DO ICLA=1,NSICLA
RATIO_INIT(ICLA,ISTRAT,IPOIN) = AVA0(ICLA)
ENDDO
ENDDO
ENDDO
ENDIF
!
! EXAMPLE 2: OF HOW A USER COULD DEFINE MANUALY AN INITIAL
! STRATIFICATION
!!
! IF (.FALSE.) THEN
! NSICLA = 4
! NUMSTRAT = 2
! DO IPOIN=1,NPOIN
! ESTRATUM(1,IPOIN) = 0.12D0
! RATIO_INIT(1,1,IPOIN) = 0.5D0
! RATIO_INIT(2,1,IPOIN) = 0.5D0
! RATIO_INIT(3,1,IPOIN) = 0.D0
! RATIO_INIT(4,1,IPOIN) = 0.D0
! ESTRATUM(2,IPOIN) = 2.D0
! RATIO_INIT(1,2,IPOIN) = 0.D0
! RATIO_INIT(2,2,IPOIN) = 0.D0
! RATIO_INIT(3,2,IPOIN) = 0.5D0
! RATIO_INIT(4,2,IPOIN) = 0.5D0
! ENDDO
! ENDIF
!
!
!
WRITE(LU,*) 'nonerodworking '
RETURN
END
The administrator has disabled public write access.

Set a non-erodible bottom 3 years 7 months ago #38333

  • pavans
  • pavans's Avatar
  • OFFLINE
  • Moderator
  • Posts: 46
  • Thank you received: 17
Hello Sanaz,

I'm sorry, the section 6.8 of Gaia's user guide is not up to date, I will modify it as soon as possible.

If you wish to set a non erodible bottom you can modify by hand the fortran code of subroutine USER_BED_INIT in order to assignee a value to ESTRATUM which will represent the thickness of your layer which could be eroded. Gaia will then compute the non-erodible bottom subtracting it to the bottom (see lines 215-221 of bed1_init_sediment_gaia).

If you do not wish to modify the USER_BED_INIT subroutine, you could try to do a restart. Indeed, in restart mode GAIA can compute the non erodible bottom starting from the bottom and the thickness of your previous computation. The variable that you define in your new geometry file should be named 'LAYER1 THICKNES' - geometry file must also contain the BOTTOM variable. Once you have the geometry done, you just need to add the appropriate keyword for restart in the steering file.
This solution should be work for your case, let me know if it doesn't.

Sorry for my late reply,

Sara
The administrator has disabled public write access.
The following user(s) said Thank You: sanaz

Set a non-erodible bottom 3 years 2 months ago #39110

  • wjh6610
  • wjh6610's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Hi,Sanaz
I encounter the same problem. Although the gaia module has a declaration of prive, it does not read the private variable anyway.
The fast way is to declare the private variable in the telemac2d cas file, and add "USE DECLARATIONS_TELEMAC2D, ONLY: PRIVE" in the user_bed_init file. Then the variable can be used.

Jinhua
The administrator has disabled public write access.
The following user(s) said Thank You: edifier1hao

Set a non-erodible bottom 2 years 11 months ago #39507

Hello,
I think i have all done, but non erodible bottom is still eroding.
What i did :
- create variable NOER in .slf file (100 for erodible, 0 for non erodible)
- declarate it in .cas t2d file :
NUMBER OF PRIVATE ARRAYS = 1
NAMES OF PRIVATE VARIABLES = 'NOER M '
- copy USER_BED_INIT.f file in user-fortran, and modify :
-add : DECLARATIONS_TELEMAC2D, ONLY: PRIVE
-replace ESTRATUM(ISTRAT,IPOIN) = SED_THICK(ISTRAT)
by :
ESTRATUM(ISTRAT,IPOIN) = PRIVE%ADR(1)%P%R(IPOIN)
Is all ok? what did i forget?
Thank you in advance!
Attachments:
The administrator has disabled public write access.
Moderators: Pablo, pavans

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.