Origin date error when using a river file

Hi everyone,

I used to successfully run a number of different model configurations with river inputs activated using CROCO v1.1. I’m trying to re-run one of them using CROCO v1.3.1 and although it runs without problems with rivers turned off, upon running with river inputs activated, I encounter many instances of the following error:

TOOL_ORIGINDATE ERROR: Could not find any origin date in time var units.
Time variable should follow Netcdf CF format:
‘seconds(days) since YYYY-MM-DD hh:mm:ss’

I am using a river input file with 12 river inputs which includes biogeochemistry parameter inputs. I formatted the river input netcdf file following what I had used previously for CROCO v1.1. Upon checking the online documentation for rivers, there doesn’t seem to be any change in format. And so I would like to directly ask if I need to modify my river input file in some way to make my configuration work.

I would sincerely appreciate any help and advice.

Thanks,
Lawrence

As a follow up to this issue, I was able to resolve it by modifying the “units” attribute of the variables qbar_time, temp_src_time, salt_src_time and so on from simply “days” as it was originally to “days since 1900-01-01 00:00:00”. If this is indeed the proper fix for this issue, then I suggest a modification of the info in the rivers documentation page runoff file example:

https://croco-ocean.gitlabpages.inria.fr/croco_doc/model/model.river.html

However, although I was able to overcome this error, my model stopped running at the very first time step with a segmentation fault. When I deactivated BIOLOGY (in particular PISCES) however, the model was able to run. And so, I would now appreciate any help or advice from anyone who may have encountered such an error. I tried to run the same setup with PISCES turned on using CROCO v1.1 and am able to run the model, and so I suspect it may have to do with PISCES code modifications in the transition to CROCO v1.3.1.

Best,
Lawrence

Hi,
First can you check with this specific branch
wget https://gitlab.inria.fr/croco-ocean/croco/-/archive/141-new-pisces-version/croco-141-new-pisces-version.tar.gz
See if it works or not. and please attach your error log. can you send me your river-runoff NC file.
I will see it.
Best
Subhadeep

1 Like

Hi,
A change has been made in the origin date in CROCO v1.3.1. If you are using USE_CALENDAR (I assume you are since you have this error) the origin date must be specified in the input file and more precisely in the ‘units’ attribute of the time variable.
For example, in your river file, since the time variable is ‘qbar_time’ you should have:

double qbar_time(qbar_time) ;
		qbar_time:long_name = "river discharge time" ;
		qbar_time:units = "days since 2008-01-01" ;

Best,
Mathieu

1 Like

Dear Mathieu,

Thank you for clarifying about this change. Indeed I am using USE_CALENDAR, and have made the changes to the ‘units’ attribute as you instructed. The model is now able to proceed but gets a segmentation fault during the first time step if PISCES is activated. Hence I think the problem is now related to ROMS-PISCES coupling, and I am now trying what Subhadeep has suggested in his reply.

Thanks,
Lawrence

Dear Subhadeep,

Thank you so much for your reply. I am now attempting to run my setup using the CROCO version in the link you sent. I will let you know how it goes.

Meanwhile, while testing further with CROCO v1.3.1, I found that the segmentation fault occurs specifically when I set ln_river=‘true’ in the ‘namelist_pisces_ref’ file. If I set it to ‘false’, the model runs even with PISCES activated. Attached is the error log.

SB_3rivpiscon.txt (69.6 KB)

I would like to send my river-runoff NC file, but I could not seem to attach it here. I will try to send you a personal message with a link.

Thanks,
Lawrence

Hi,
Lawrence
when ln_river=‘false’ you receiving this line ?
Number of days per year in file year2daydta = 0.000000000000000E+000

ldd croco >lawrence_croco.log and ncdump -h “river-runoff NC file”. >lawrence_runoff_ncdump.log
you sent NC file i have seen in my mail. I am actually in leave and i don’t have my system with me . just attach this log then i can see it.
please attach lawrence_croco.log and lawrence_runoff_ncdump.log
And in between compile model with IFORT+ OpenMPI
Check there have update in croco_tools. Merge branch '16-update-pisces-external-inputs' into 'master' (4488628a) · Commits · croco-ocean / croco_tools · GitLab
and create your file with latest croco_tools
wget https://gitlab.inria.fr/croco-ocean/croco_tools/-/archive/master/croco_tools-master.tar.gz
Best
Subhadeep

Dear Subhadeep,

As a follow up to my previous reply, I tried running using the branch in the link you sent, but this time I am having problems compiling the code. The last few lines of the output log right up to the compilation are as follows:

This is CROSS_MATRIX: Creating new version of Make.depend.

cpp -traditional -DLinux -DIfort -P -I/home/opt/local/apps/intel/2022.3.1/netcdf-fortran/4.6.0/include -ICROCOFILES/AGRIF_INC -I/home/opt/local/cores/intel/impi/2019.5.281/intel64/include par_pisces.F90 > par_pisces_.f90
/home/opt/local/cores/intel/impi/2019.5.281/intel64/bin/mpiifort -c -O3 -xCORE-AVX512 -fno-alias -i4 -r8 -fp-model precise -parallel -mt_mpi -mcmodel=medium -shared-intel -I/home/opt/local/cores/intel/impi/2019.5.281/intel64/include par_pisces_.f90 -o par_pisces.o
gmake: Circular oce_trc.mod ← oce_trc.o dependency dropped.
m2c -o oce_trc.o oce_trc.mod
gmake: m2c: Command not found
gmake: *** [oce_trc.o] Error 127
rm oce_trc.mod

I’ll continue looking through the compilation script and the code for the cause, but if you might have suggestions I would be glad to hear from you.

Best,
Lawrence

Hi,
Lawrence
Its regarding compiling issues.
check this update and update your file accordingly PISCES bugfix + JOBCOMP update for AGRIF (e5afe491) · Commits · croco-ocean / croco · GitLab
Best
Subhadeep

1 Like

Dear Subhadeep,

Thank you so much, and I truly appreciate your help in spite of your being on leave. As for your question, when ln_river=‘false’, I receive the following line instead:

Number of days per year in file year2daydta = 365.250000000000

I have attached my log file (case where ln_river=‘false’) and the output of doing an ncdump on my river-runoff NC file. If you notice anything that I might need to modify, please let me know.

lawrence_croco_lnriver_false_log.txt (180.5 KB)
lawrence_runoff_ncdump_log.txt (9.1 KB)

Thank you also for the updates you mentioned for croco_tools. They seem very recent, but I will compare then to the tools that I have and inspect the differences.

Best,
Lawrence

Dear Subhadeep,

Thank you again for your most recent reply below. I have checked these and confirmed that these changes are already implemented in CROCO ver. 1.3.1, which I was using when I encountered the segmentation fault error after setting ln_river=‘true’.

Best,
Lawrence

Hi,
Lawrence
SORRY for spam!.
problems compiling the croco
can check with this master branch: git clone croco-ocean / croco · GitLab
After that we will check PISCES folder.
Best
Subhadeep

Hi Subhadeep,

No worries, and thank you for sending this link. I tried running my setup using this master branch version and receive a similar error when setting ln_river=‘true’. Attached is my log file.

lawrence_croco_log_ver2.txt (66.3 KB)

And as you can see this time the following line which you mentioned earlier appears just before the segmentation fault:

Number of days per year in file year2daydta = 0.000000000000000E+000

Best,
Lawrence

Hi,
Lawrence
Yes error in year2daydta = 0.000000000000000E+000
can you send me your complete CROCO folder, unchanged. with grid, frc etc.
i think It’s just some GB.
in my email address : subhadeepmaishal@kgpian.iitkgp.ac.in
The problem is that to reproduce this error what you faced.
then i can check it today itself.
Best
Subhadeep