can't write to average file after restarted

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
feroda

can't write to average file after restarted

#1 Unread post by feroda »

Hi all,

My model was perfectly restarted from *_rst.nc by the first record. In the parameter file, 'LDEFOUT == F'. It is no problem to write new results into history file. However, average file can not be written, which reads as follows:

WRT_HIS - wrote history fields (Index=1,1) into time record = 0000030

WRT_AVG - error while writing variable: temp2
into averages NetCDF file for time record: 10


Anyone ever met this error before? Thanks!

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: can't write to average file after restarted

#2 Unread post by kate »

I don't know that variable "temp2". I assume it wrote "temp" just fine before the restart and in the history file?

feroda

Re: can't write to average file after restarted

#3 Unread post by feroda »

Hi Kate,
The info of 'temp2' in the average file follows:
float temp2(ocean_time, s_rho, eta_rho, xi_rho) ;
temp2:long_name = "time-averaged squared potential temperature" ;
temp2:units = "Celsius2" ;
temp2:time = "ocean_time" ;
temp2:coordinates = "lon_rho lat_rho s_rho ocean_time" ;
temp2:field = "temp2, scalar, series" ;
temp2:_FillValue = 1.e+37f ;


No problem in writing each variable into history file and restart file before writing variables into average file. However, I am not sure the sequence between writing 'temp' and 'temp2' into average file.
What I saw was that the average file was not updated after the model was shut down by the error information, which means neither of 'temp' nor 'temp2' was written into the average file. Thanks!

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: can't write to average file after restarted

#4 Unread post by kate »

Sorry, I didn't know temp2 was a legitimate variable. It might be one that many haven't tried writing, and therefore there could be bugs in the code on restart. Is this immediately after restart or some averaging time later? The first averages write after the restart? It's not very vocal on why it couldn't write, but the NetCDF write would have returned an error code which could tell you something. You might ask ROMS to print that error code for you, something like:

Code: Select all

PRINT *, trim(nf90_strerror(status))

feroda

Re: can't write to average file after restarted

#5 Unread post by feroda »

kate wrote:Is this immediately after restart or some averaging time later? The first averages write after the restart?
Yes, the first averages after the restart. Actually, I ask ROMS to output history once a day, while the averages are output each month. There is no any problem to write into history file until ROMS goes to the point of writing into the first average file after restart.
kate wrote:You might ask ROMS to print that error code for you, something like:

Code: Select all

PRINT *, trim(nf90_strerror(status))
I will check this later, and keep you posted. Thanks very much.

peisach
Posts: 7
Joined: Mon Mar 22, 2004 3:35 pm
Location: Norwegian Meteorological Institute

Re: can't write to average file after restarted

#6 Unread post by peisach »

I had this problem some time ago. Have erased the files since then, so don't remember all the details. But I seem to recall that this was only a problem when I used the PERFECT_RESTART cpp option. I was able to keep going by not activating this option (albeit with less than perfect restart conditions). Smells like a bug related to writing the quadratic quantities the avg. file (I believe temp2 is the first one of those to be written). Could you try running (from the start) with #undef PERFECT_RESTART and see what happens?

User avatar
arango
Site Admin
Posts: 1347
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: can't write to average file after restarted

#7 Unread post by arango »

I corrected the problem. The indices for time-averaged squared tracer where not initialized during restart in file def_avg.F. This problem was corrected in following trac :arrow: ticket. Thank you for reporting this issue. Please update.

barack99
Posts: 17
Joined: Thu Aug 31, 2017 4:33 pm

Re: can't write to average file after restarted

#8 Unread post by barack99 »

Dear All,


Sorry for recalling this topic again.

I had:
1. The same error message:

84960 2012-03-15 23:36:00.00 5.358725E-02 3.441540E+02 3.442075E+02 9.360531E+11
(160,272,15) 8.501061E-05 1.956566E-04 4.137706E+00 6.806066E+00
Found Error: ** Line: 1014 Source: ROMS/Utility/wrt_his.F

WRT_HIS - error while writing variable: temp
into history NetCDF file for time record: 237
Found Error: 03 Line: 170 Source: ROMS/Nonlinear/output.F
Found Error: 03 Line: 630 Source: ROMS/Nonlinear/main3d.F
Found Error: 03 Line: 320 Source: ROMS/Drivers/nl_ocean.h

Elapsed CPU time (seconds):

Node # 4 CPU: 19598.898
Node # 1 CPU: 19595.944
Node # 3 CPU: 19595.562
Node # 2 CPU: 19591.462
Node # 0 CPU: 19583.648
Total: 1252693.224

2. And:

2000 2012-03-15 05:33:20.00 NaN NaN NaN NaN
(000,000,00) 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00
Found Error: 01 Line: 351 Source: ROMS/Nonlinear/main3d.F

CFL report:

By the way, the CFL of my grid is very small. Sine think like this:
Minimum barotropic Courant Number = 3.08716765E-04
Maximum barotropic Courant Number = 4.23914573E-03
Maximum Coriolis Courant Number = 9.21212949E-05

Do you know how to fix these? please help.

Thanks
Barack99
Barack

Post Reply