some suggestion with history file and average file

Cool Findings and Plots

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
susonic
Posts: 171
Joined: Tue Aug 21, 2007 5:44 pm
Location: UST21 / Korea
Contact:

some suggestion with history file and average file

#1 Unread post by susonic »

Hi all,

So far in ROMS we can store the variables on history file and average file with turning on/off the switches in ocean.in.
And both output files are operated by only one switch.

I think it would be better if we have each switches on each file(history and average respectively)
so that we can store detailed time varying 2D variable such as zeta and u,vbar throughout whole domain
more frequently in history file without 3d variable which will lead us to reduce the output file size.
And we can store the rest 3d fields on average file with longer time interval.

Best,

-Peter
Joonho Lee

mathieu

Re: some suggestion with history file and average file

#2 Unread post by mathieu »

I asked to do something like that some years ago and it was refused for understandable reasons: ROMS is already sufficiently complex.
For your needs a workable solution is the following: have a a perl script that run in an infinite loop and check if a file his_0044.nc and his_0045.nc exist. If so then his_0044.nc will not be changed any more and one uses ncks to select in his_0044.nc the variables that one wants at the time wanted time resolution. Then destroy the file.
By using this you will achieve the goal with minimal programming.

User avatar
susonic
Posts: 171
Joined: Tue Aug 21, 2007 5:44 pm
Location: UST21 / Korea
Contact:

Re: some suggestion with history file and average file

#3 Unread post by susonic »

Hi Mathieu,

Thanks for the reply.
Sorry. I might give you a wrong idea.

What I want to do is
I want to store 2d variable(zeta, ubar,vbar) frequently(say hourly or daily) without 3d variable(temperature, salinity, u, v)
on history file.
And I want to store 3d vaiable with longer time step(say 10day or month) on average file.

Since ROMS is storing the data on history/average file with the same switch(TURE/FALSE) in ocean.in file,
if I store the hourly data on history file without 3d variable(turning off switch for 3d variable)
ROMS is storing the same variable on average file(no 3d variable on average file).

I was wondering whether they can make each switch for the history and average file in ocean.in file.

Regards,

-Peter
Joonho Lee

User avatar
shchepet
Posts: 188
Joined: Fri Nov 14, 2003 4:57 pm

Re: some suggestion with history file and average file

#4 Unread post by shchepet »

What I want to do is I want to store 2d variables (zeta, ubar,vbar)
frequently (say hourly or daily) without 3d variables (temperature,
salinity, u, v) on history file. And I want to store 3d vaiable with
longer time step(say 10day or month) on average file.
This is possible "as is" with the existing code by noting that naturally
ROMS creates three streams of output data: "history", "restart", and "averages".

So you have to specify "history" output frequent enough for the 2D data,
but set "T" only for zeta,ubar, and vbar; output for all other fields
set to "F" in the input file.

Then store 3D fields (instantaneous snapshots) as "restart" files.
Here you do not have flexibility what to select and what not: model
simply stores everything mathematically necessary to specify initial
conditions, and nothing else. This means 2D and 3D prognostic
variables.

As for averages, again you can choose what to output and how often,
but again, the time interval for averaging (hence output) is the same
for all variables. So you just pick 3D variables only.

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

Re: some suggestion with history file and average file

#5 Unread post by kate »

Anything is possible with enough coding. I had a need for 3-hourly averages of surface fields and daily averages of the 3-D fields. I just added another output type and copied everything from the averages output. Go with Sasha's suggestion if it does what you need.

User avatar
susonic
Posts: 171
Joined: Tue Aug 21, 2007 5:44 pm
Location: UST21 / Korea
Contact:

Re: some suggestion with history file and average file

#6 Unread post by susonic »

Thanks Shchepetkin and Kate,

Storing 3D data in restart file can be an alternative solution but it is only a snapshot(not a average).
And we don't have split option for the restart file as the history or average file does.
So it will store all variables in one file which will give us one huge file.
(FYI, mine is long term simulation-more than 10 year)


Would you make it clear this part, Dr.Shchepetkin?
So you just pick 3D variables only
As far as I know, ROMS is storing average data field according to
history data switches in ocean.in file.
Then how can ROMS store 2d variable in history file and
3d variable in average file in one simulation?
Joonho Lee

magaesco
Posts: 10
Joined: Wed Sep 01, 2010 8:01 pm
Location: ESPOL

Re: some suggestion with history file and average file

#7 Unread post by magaesco »

Hi ROMS community,

I have a doubt about the history files, I've run succesfully the model for interannual simulations (three months) and when I read the attributes of roms_avg_$TIME$.nc I noticed that I have values for only one date (How I expected an averaged file per month), but the attributes of roms_his_$TIME$.nc I can see there are two dates, so I supposes that my history file contents values every 15 days (so I have two different times), but I want the history file with only one date like roms_avg_$TIME$.nc. My question is how and where can I configure for getting my history file with one time??...
Should I change my time step parameters of history???

Thanks for advances,

Maga

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

Re: some suggestion with history file and average file

#8 Unread post by kate »

The parameters are in input file: Output_Frequency_Parameters. For one history record per file, set NHIS and NDEFHIS to be the same.

Post Reply