I am using the latestest roms version (v 714) to examine the model response to tides and atmospheric forcing in the region covering the Sicilian Channel and the Tunsian Coasts.
I have tried to run my 2D model using OpenMp in a computer with 8 processors (domain partition NtileI=4, NtileJ=2) using the AVERAGES_DETIDE option. I am using the tidal forcing in an independent netcdf file as it was recommend . The detied variables are expected to be saved every 24h but I couldn't reach this aim! When the model is runnig from the restart file I get a segmenation fault just before the first 24h (24h -dt).
When I re-run the model with the same files (but with the modified tides file forcing) I get the following error message:
NLM: GET_STATE - Read state initial conditions, t = 1460 00:00:00
(Grid 01, File: ocean_rst4ans_oabis.nc, Rec=0001, Index=1)
- free-surface
(Min = -2.09724253E-02 Max = 1.03833694E-01)
- vertically integrated u-momentum component
(Min = -2.17156129E-01 Max = 3.43984241E-01)
- vertically integrated v-momentum component
(Min = -1.46289869E-01 Max = 6.87685520E-01)
GET_NGFLD - tidal period
(Min = 0.00000000E+00 Max = 9.29520000E+04)
GET_2DFLD - tidal elevation amplitude
(Min = 0.00000000E+00 Max = 4.80361044E-01)
GET_2DFLD - tidal elevation phase angle
(Min = 0.00000000E+00 Max = 6.28316948E+00)
GET_2DFLD - tidal current inclination angle
(Min = 0.00000000E+00 Max = 6.28317684E+00)
GET_2DFLD - tidal current phase angle
(Min = 0.00000000E+00 Max = 6.28317064E+00)
GET_2DFLD - maximum tidal current, ellipse major axis
(Min = 0.00000000E+00 Max = 7.58107564E-01)
GET_2DFLD - minimum tidal current, ellipse minor axis
(Min = -1.24626304E-01 Max = 2.70169961E-02)
GET_IDATA - incosistent restart and harmonics time:
1460.0000 ***************
This error seems to be related to the Hcount variable which is empty in the forcing file and shoud be written by the model during the run!!! if it is the case how can I resolve the problem?
Thank you for your help
segmentation fault when using averages_detide
Re: segmentation fault when using averages_detide
I have not gone back and looked at the code, but from curiosity I did try doing a quick run with AVERAGES_DETIDE turned on, and then a second run which tried to use the same tide forcing file. I also got an error message that it cannot find the variable Hcount.
As you probably know, ROMS writes some things to your tide forcing file when you turn on AVERAGES_DETIDE.
If you do the above after setting aside a copy of the original forcing file, and then compare that with the one ROMS has written to, you will see that there are the following changes:
1. A new dimension, called harmonics, is written. I assume that this is the number of harmonics ROMS analyses for (for purposes of detiding), because it is not the number of harmonics originally provided. This in itself is not a concern - e.g. the model currents may generate nonlinear tides which are not provided at the open boundaries. I will look into this when I have a chance.
2. Seven new variables, including Hcount, ocean_time, and five involving combinations of sin and cos. Unfortunately (at least in our cases), Hcount as you noticed is empty, which I assume is what causes the error message.
Obviously, as I am sure you already figured out, if all you want to do is another run with the original forcing file, you have got to either give Hcount a value, or get rid of the file ROMS wrote to and copy in the original.
Unfortunately that's as far as I have time to take this today. I'm not sure there is actually anything wrong - it may be just that the forcing file was not intended to be re-used. But it does seem a little odd to have a variable (Hcount) created by ROMS but then not given a value. I'm hoping that Arango can enlighten me (gently).
As you probably know, ROMS writes some things to your tide forcing file when you turn on AVERAGES_DETIDE.
If you do the above after setting aside a copy of the original forcing file, and then compare that with the one ROMS has written to, you will see that there are the following changes:
1. A new dimension, called harmonics, is written. I assume that this is the number of harmonics ROMS analyses for (for purposes of detiding), because it is not the number of harmonics originally provided. This in itself is not a concern - e.g. the model currents may generate nonlinear tides which are not provided at the open boundaries. I will look into this when I have a chance.
2. Seven new variables, including Hcount, ocean_time, and five involving combinations of sin and cos. Unfortunately (at least in our cases), Hcount as you noticed is empty, which I assume is what causes the error message.
Obviously, as I am sure you already figured out, if all you want to do is another run with the original forcing file, you have got to either give Hcount a value, or get rid of the file ROMS wrote to and copy in the original.
Unfortunately that's as far as I have time to take this today. I'm not sure there is actually anything wrong - it may be just that the forcing file was not intended to be re-used. But it does seem a little odd to have a variable (Hcount) created by ROMS but then not given a value. I'm hoping that Arango can enlighten me (gently).