Run_croco_inter.bash fails at the very final step due to error in get_bry

I have been trying to run an inter-annual simulation over Bay of Bengal from 2016 to 2023 with mercator ocean boundary forcing. With DT= 300 and nd_avg=15, it shows 6440 time steps. It works fine till 6439, as you can see in the picture. But while finalising outputs, it fails due to some error in get_bry. I tried so many ways to solve it but no luck yet.

If someone has any idea, please let me know.

Uploading: PXL_20240124_120441863.jpg…

Hello.
whoerfanul

I have no idea why your model is not running.

Their have to many people in our forum they may be potentially answer your question.

I suspected that OS or croco model library dependency is upgraded/downgraded.

For that also I don’t thing running few time step after model can Blow Up !.
I have NO idea. sorry.
I have run many times CROCO standalone to CPL in Indian Ocean region and my model never Blow Up !

Have a good day.
Subhadeep

Hello

Yesterday I also got a case like this. I suspect that you are using mercator in monthly intervals. So I replaced the mercator in the daily interval. Try using daily data in the mercator.

Thank you
Apriansyah

Hello,

Did you have the same problem “ERROR in frc_bry” and was it solved with daily data?

Let me know. Because I tried daily data too once. But it also didn’t work. But if you were successful, I will give it another shot.

Thanks
Erfanul

Yes, I used the daily data in make_OGCM_mercator. Also, I changed itolap_a and itolap_p from 1 to 2.
Can I know how you download the mercator data for OBC, since the motu_client is not working.
Yesterday, I modified the way of downloading and converting the data to produce a new toolbox.

Thank you
Apriansyah

I have downloaded the updated version of crocotools from croco git where it uses copernicusmarine library to download mercator files.

Can I have a look on your crocotools_param, param.h, cppdefs.h, croco_inter.in and run_croco_inter.bash files.

Please email these to chyalbin2@gmail.com, if possible. It will be very helpful.

Thanks.

Can I get crocotools update from CROCO git.

did you manage to fix that ?
i got the same problem, it happened after updating to copernicusmarine library

 ERROR in get_bry: cannot read variable 'bry_time'

 MAIN - number of records written into history  file(s):  159
        number of records written into restart  file(s):  159
        number of records written into averages file(s):  159


 ERROR: Abnormal termination: netCDF INPUT

Hello Malateibi,

Yes, I manage to fix it with daily mercator and GEBCO topographical data. You can try that too. If you still face any problem, email me in whoerfanul1@gmail.com.

Thanks
Erfan

still couldn’t fix the problem

I think the problem is in

Oforc_OGCM/download_mercator_python.m

specifically line 70 where is says

time2=datenum(Y,M+1,01) - 1;

this has the effect of removing the last day of the month, thus it fails.

itiopal_a and itolap_b variables are not being taking in consideratio when downloading the data.

A quick fix would be to modify your code to

time2=datenum(Y,M+1,01) ;

Please try.

Thanks for your reply,

for i=1:lh+1
    time1(i)=rundate_dnum-(lh+1-i);
end
time2=rundate_dnum;
if lf > 0
    for j=1:lf
        time3(j)=rundate_dnum+j-2;
    end
else
    time3=[];  %(1)=rundate_dnum+1;
end

and the values are

time1=
14-Mar-2024
15-Mar-2024
time2=
15-Mar-2024
time3=
14-Mar-2024
15-Mar-2024
16-Mar-2024
17-Mar-2024
18-Mar-2024
19-Mar-2024
20-Mar-2024

the run date in this example is 2024 03 15 T 0000Z

do you think there is something wrong ?
I don’t use monthly files ( i guess )

Hi,
malateibi
can you upload your download_mercator_python.m and
“ERROR in get_bry: cannot read variable 'bry_time” complete error.log file.
Cheers!
Subhadeep

1 Like

download_mercator_frcst_python.m (6.0 KB)
croco_run.log.txt (273.7 KB)
those are the files

Hi,
malateibi
for your case:

for i=1:lh+1
time1(i)=datenum(rundate_str)-(lh+2-i);
end
time2=datenum(rundate_str);
for j=1:lf+2
time3(j)=datenum(rundate_str)+j-1;
end
time=cat(2,time1,time2,time3)

i am recommending you to use this branch and create your file:
git clone --branch dev_newcopernicus croco-ocean / croco_tools · GitLab
Cheers!
Subhadeep

1 Like

Hi Andres,

It is Anurag here. Last time you suggested me to use croco_tools-v2.0.0 to make boundary condition due to Copernicus motu client is no more longer to use. I tried the new croco_tools_version.

I am able to download data and to make it on our grid by using make_OGCM_mercator.m. Model was running good but in the last of first month I am getting error like below:

7170041 26693.98785 1.296290127E-02 2.1021968E+01 2.1034931E+01 1.4468930E+14 0
7170042 26693.98958 1.295977042E-02 2.1021997E+01 2.1034956E+01 1.4468998E+14 0
7170043 26693.99132 1.295693490E-02 2.1022025E+01 2.1034982E+01 1.4469066E+14 0
7170044 26693.99306 1.295436299E-02 2.1022053E+01 2.1035008E+01 1.4469134E+14 0
7170045 26693.99479 1.295207527E-02 2.1022082E+01 2.1035034E+01 1.4469201E+14 0
7170046 26693.99653 1.295004056E-02 2.1022109E+01 2.1035059E+01 1.4469269E+14 0
7170047 26693.99826 1.294827896E-02 2.1022137E+01 2.1035085E+01 1.4469336E+14 0
ERROR in get_bry: cannot read variable ‘bry_time’

MAIN - number of records written into history file(s): 408
number of records written into restart file(s): 420
number of records written into averages file(s): 5
number of records written into diags_t file(s): 0

    number of records written into avg diag_t  file(s):    5

ERROR: Abnormal termination: netCDF INPUT

I tried to search about this and found your suggestions that to overcome with this issues we need to change time2=datenum(Y,M+1,01) - 1 as time2=datenum(Y,M+1,01) in download_mercator_python.m.

I did it accordingly but when I check the new boundaries files with my old version boundaries files (with them model was running smoothly) then the time dimension have one more index value this time compare to the old one. As I said the previous files was no issue to run the model.

Can you please suggest me, shall it be ideal to run the model with new boundaries files that have one more time index values made by change time2 as you pointed out in your comments?

Many thanks!

Anurag

Hi Anurag,

In the end your problem is not enough BRY steps.

Sometimes what I do is to concatenate all the BRY for a year into a single BRY file
e.g. with something like

ncrcar croco_bry_mercator_Y2021M01.nc … croco_bry_mercatorY2021M12.nc croco_bry_all.nc

and use that croco_bry_all.nc file as the BC for all months.

Hi Andres,

Thanks for you comments but I tried as you suggested before to change time2=datenum(Y,M+1,01) - 1 as time2=datenum(Y,M+1,01) in in download_mercator_python.m and it’s work perfectly, as I said before with one more time index.

Best regards,
Anurag

1 Like