Ask Your Question

how to specify the sediment source? (Solved)

asked 2021-02-08 17:55:08 +0100

updated 2021-03-11 18:09:53 +0100

Hello everybody

Actually have configured successful CROCO model in at area, with this  characteristics: 

Climatology configuration

Grid nested offline 

River (PSOURCE) : only  Temp and Salt specified

Now I want to add sediment at this configuration. But I don't know how specify the source of sediment (in this case the source is the river), type of sediment (silt) and variability a long time.

Can help me? 


edit retag flag offensive close merge delete

6 answers

Sort by » oldest newest most voted

answered 2021-02-08 19:38:23 +0100

andres gravatar image

Hi Carlos,

In cppdefs.h you have to activate both SEDIMENT and BBL

# define SEDIMENT


# define BBL (optional, but recommended)

In make sure you have at least five tracer T in your primary history and average fiels, e.g.

primary_history_fields: zeta UBAR VBAR U V wrtT(1:NT) T T T T T T T T T T 25*F

these 5 extra are for Temp, Salt, and the three components of the simple sediment module in CROCO

also in the psource part

add three T's one for each of the three sediment components, in each line that defines a river. You have to define also the concentration of each component (sand/silt/clay) at each river, but I am not sure of which comes first nor the units.

psource: Nsrc Isrc Jsrc Dsrc Qbar [m3/s] Lsrc Tsrc 2 3 54 1 200. T T T T T 5. 0. .1 .2 .3 3 40 0 200. T T T T T 5. 0. .1 .2 .3

This value will be held constant for the duration of the run. You can do monthly runs and each month change the values, or try to use the PSOURCE_NCFILE, but I am not sure if it has been adapted to addo temporal variability of the sediments

edit flag offensive delete link more

answered 2021-03-11 18:09:14 +0100

Hello everybody

Thanks to Andres and the team of CROCO developers. Whit your help i did a configuration successfull.

suggesting: in current version of CROCO (v1.1) it is not possible to read sediment variable from for this reason I suggest that you do not use this option. I tried but had many problems.

1.- define the following in your cppdefs.h

# define SEDIMENT
#define BEDLOAD
#define PSOURCE

2.- in modify this section

psource: Nsrc Isrc Jsrc Dsrc Qbar [m3 / s] Lsrc Tsrc
53 51 0 -10000. T T T T 20. 2. 9.9 9.8

where: Nsrc = Number of sources or rivers (1), Isrc and Jsrc = source position in xi and eta (53 51), Dsrc = source direction (0 = zonal), Qbar = flow (-10000, negative value indicate that flow is north / south), Lsrc = tracers (Temp, Salt, Sand_1, Sand_2) and Tsrc = tracers value (20. 2. 9.9 9.8).

3- in modify value of CSED

0.125 0.0 2650. 9.4 25.0e-5 0.05 0.14 0.4 0.4
0.050 0.0 2650. 1.6 4.0e-5 0.01 0.14 0.6 0.6

Change both value to zero. with this change i avoided a lot problems in my model.
Clarifying that this configuration it is for when the sediment comes from a river.

edit flag offensive delete link more

answered 2021-02-20 15:16:52 +0100

Hi Andrés

1.- this is my file for this configuration model: I defined SEDIMENT, BBL and PSOURCE C:\fakepath\

2.- on my second try I actived SEDIMENT, BBL, PSOURCE_NCFILES and PSOURCE_NCFILE_TS

this is my C:\fakepath\ and this is my cppdefs.h C:\fakepath\cppdefs.h and this is mi out of model C:\fakepath\16135786999468359.txt

I specified one river whit variable caudal (~500 m3/s) in a Netcdf file. my grid size is of 54 x 75.


edit flag offensive delete link more

answered 2021-02-19 13:54:53 +0100

andres gravatar image

Hi Carlos, a few comments

1) If you get this:

" " READ_INP ERROR while reading block with keyword 'psource'." "

the error is in the file. Please post it.

2) You can´t activate


yo need to activate


but that might not be the problem there. A blowup is generally a CFL problem. Decrease the time step (What is the flow specified for your river(s)? What is your grid size?

3) Yes, you need a file if you activate SEDIMENT in the cppdefs.h

edit flag offensive delete link more

answered 2021-02-17 18:11:39 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >5 is welcome to improve it.

Hi Andrés and the whole community

I did what you recommended but i had a few problems.

I defined SEDIMENT, BBL , PSOURCE on my simulation and i modified specifying tracers. I have this problem: " READ_INP ERROR while reading block with keyword 'psource'." I tryed many things but nothing worked. I attach the files C:\fakepath\out_Psorce_Sediment.txt C:\fakepath\cppdefs_Psorce_Sediment.h

I did can not resolve this problem then i decided use make_runoff.m to create I defined SEDIMENT, BBL , PSOURCE, PSOURCE_NCFILE_TS on my simulation and i modified specifying psource_ncfile. I have this problem: " STEP2D: ABNORMAL JOB END BLOW UP " . I attach the files. C:\fakepath\out_ncPsource_Sediment.txt C:\fakepath\cppdefs_ncPsource_Sediment.h

Finally I defined only SEDIMENT and undefine BBL. with this configuration the simulation did successful but it is not what i expected. The river is not sediment source, apparently only the bottom sediment is moving. I attach the files. C:\fakepath\out_ncPsorce_Sediment_NOBBL.txt C:\fakepath\cppdefs_ncPsorce_Sediment_NOBBL.h. C:\fakepath\Screenshot from 2021-02-17 10-38-33.png C:\fakepath\Screenshot from 2021-02-17 10-39-18.png

Now my questions are: How do I add a new tracer in make_runoff.m? (actually the script only add T,S or/and NO3) What name should the sediment tracer variable have?

Note: in line 234 define that is a input file (i not modified nothing)

I attach general files used in my simulation.C:\fakepath\ C:\fakepath\

Thank you

edit flag offensive delete link more

answered 2021-02-09 02:28:04 +0100

Thank you so much, I will try

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2021-02-08 17:55:08 +0100

Seen: 1,429 times

Last updated: Mar 11 '21