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!
can't write to average file after restarted
Re: can't write to average file after restarted
I don't know that variable "temp2". I assume it wrote "temp" just fine before the restart and in the history file?
Re: can't write to average file after restarted
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!
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!
Re: can't write to average file after restarted
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))
Re: can't write to average file after restarted
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:Is this immediately after restart or some averaging time later? The first averages write after the restart?
I will check this later, and keep you posted. Thanks very much.kate wrote:You might ask ROMS to print that error code for you, something like:Code: Select all
PRINT *, trim(nf90_strerror(status))
Re: can't write to average file after restarted
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?
- arango
- Site Admin
- Posts: 1356
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: can't write to average file after restarted
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
ticket. Thank you for reporting this issue. Please update.
![Arrow :arrow:](./images/smilies/icon_arrow.gif)
Re: can't write to average file after restarted
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
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