Dear All:
I set NTSAVG in order to accumulate the output time-averaged and diagnostics data after two years. However, whatever number of NTSAVG is used, the output of average data is always recorded since the first time step every NAVG and filled with zeros.
Then, after NTSAVG (two years in my case) the model starts outputing the "real" average data.
I did some tests and the same occurs in the UPWELLING case.
My question is: That's what I would expect using NTSAVG or the model should be writting the AVERAGE data only after NTSAVG?
The output from diagnostic data (NTSDIA) has the same problem.
That's part of my model setup
Physical Parameters, Grid: 01
=============================
1556280 ntimes Number of timesteps for 3-D equations.
80.000 dt Timestep size (s) for 3-D equations.
30 ndtfast Number of timesteps for 2-D equations between
each 3D timestep.
1 ERstr Starting ensemble/perturbation run number.
1 ERend Ending ensemble/perturbation run number.
0 nrrec Number of restart records to read from disk.
F LcycleRST Switch to recycle time-records in restart file.
32400 nRST Number of timesteps between the writing of data
into restart fields.
10800 ninfo Number of timesteps between print of information
to standard output.
45 nSTA Number of timesteps between the writing of data
the stations file.
45 nFLT Number of timesteps between the writing of data
into floats file.
T ldefout Switch to create a new output NetCDF file(s).
10800 nHIS Number of timesteps between the writing fields
into history file.
388800 ndefHIS Number of timesteps between creation of new
history files.
1166400 ntsAVG Starting timestep for the accumulation of output
time-averaged data.
45 nAVG Number of timesteps between the writing of
time-averaged data into averages file.
32400 ndefAVG Number of timesteps between creation of new
time-averaged file.
1166400 ntsDIA Starting timestep for the accumulation of output
time-averaged diagnostics data.
45 nDIA Number of timesteps between the writing of
time-averaged data into diagnostics file.
32400 ndefDIA Number of timesteps between creation of new
diagnostic file.
Thanks a lot.
Carlos Teixeira
NTSAVG and NTSDIAG
Re: NTSAVG and NTSDIAG
Carlos,
I see your point. Quickly viewing the logic in Nonlinear/output.F, which is the subroutine that calls def_avg to create the averages file, we don't check if time is prior to NTSAVG - so the file is created at initialization no matter what.
The #ifdef AVERAGES block in output.F could be modified to hold off until iic(ng).ge.NTSAVG but I can foresee that we would need to code this carefully to catch instances like when NTSAVG is not a multiple of NAVG, etc., since this is going to create havoc with the multiple file numbering logic. And we need this all to work in reverse for HIS output for the AD and TL codes.
But thanks for bringing it to our attention.
John.
I see your point. Quickly viewing the logic in Nonlinear/output.F, which is the subroutine that calls def_avg to create the averages file, we don't check if time is prior to NTSAVG - so the file is created at initialization no matter what.
The #ifdef AVERAGES block in output.F could be modified to hold off until iic(ng).ge.NTSAVG but I can foresee that we would need to code this carefully to catch instances like when NTSAVG is not a multiple of NAVG, etc., since this is going to create havoc with the multiple file numbering logic. And we need this all to work in reverse for HIS output for the AD and TL codes.
But thanks for bringing it to our attention.
John.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
Re: NTSAVG and NTSDIAG
Hi John, thanks for your replay.
I looked into output.F when I got the zeros in my output and realize that the code didn´t check for NTSAVG, but I didn´t know if it was done in elsewhere. Thanks for explaining.
Anyway, since I want the averages results after two years of simulation I think it´s better to run the model for two years whith AVERAGES turned off and then Re-start the model from the last time step with AVERAGES on running the model for two more years.
I thinks that is going to do the job.
Cheers;
Carlos
I looked into output.F when I got the zeros in my output and realize that the code didn´t check for NTSAVG, but I didn´t know if it was done in elsewhere. Thanks for explaining.
Anyway, since I want the averages results after two years of simulation I think it´s better to run the model for two years whith AVERAGES turned off and then Re-start the model from the last time step with AVERAGES on running the model for two more years.
I thinks that is going to do the job.
Cheers;
Carlos
- arango
- Site Admin
- Posts: 1356
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: NTSAVG and NTSDIAG
I will check when I get the chance the logic for NTSAVG and NTSDIA to see if I can reproduce this behavior.
I have done this before during spin-up simulations. For example, you can run ROMS for two years without activating AVERAGES or DIAGNOSTICS_*. Make sure that you are saving the restart file at the appropriate time (say, end of year 2). You can even use perfect restart, if so desired. Then, you recompiled the code with AVERAGES and DIAGNOSTICS_* activated and start from the restart file. The restart file becomes your initial conditions. It is that simple. In cases like this I always use NAVG=NDIA and NDEFAVG=NDEFDIA.
I have done this before during spin-up simulations. For example, you can run ROMS for two years without activating AVERAGES or DIAGNOSTICS_*. Make sure that you are saving the restart file at the appropriate time (say, end of year 2). You can even use perfect restart, if so desired. Then, you recompiled the code with AVERAGES and DIAGNOSTICS_* activated and start from the restart file. The restart file becomes your initial conditions. It is that simple. In cases like this I always use NAVG=NDIA and NDEFAVG=NDEFDIA.