some suggestion with history file and average file

Cool Findings and Plots

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
susonic
Posts: 159
Joined: Tue Aug 21, 2007 5:44 pm
Location: Jeju National University
Contact:

some suggestion with history file and average file

#1 Post by susonic » Sat Apr 17, 2010 8:16 am

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

mathieu
Posts: 74
Joined: Fri Sep 17, 2004 2:22 pm
Location: Institut Rudjer Boskovic

Re: some suggestion with history file and average file

#2 Post by mathieu » Sun Apr 18, 2010 11:07 am

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: 159
Joined: Tue Aug 21, 2007 5:44 pm
Location: Jeju National University
Contact:

Re: some suggestion with history file and average file

#3 Post by susonic » Mon Apr 19, 2010 2:03 am

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

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

Re: some suggestion with history file and average file

#4 Post by shchepet » Tue Apr 20, 2010 8:38 pm

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: 3718
Joined: Wed Jul 02, 2003 5:29 pm
Location: IMS/UAF, USA

Re: some suggestion with history file and average file

#5 Post by kate » Tue Apr 20, 2010 10:23 pm

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: 159
Joined: Tue Aug 21, 2007 5:44 pm
Location: Jeju National University
Contact:

Re: some suggestion with history file and average file

#6 Post by susonic » Wed Apr 21, 2010 5:15 am

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?

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

Re: some suggestion with history file and average file

#7 Post by magaesco » Thu Mar 03, 2011 3:54 pm

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: 3718
Joined: Wed Jul 02, 2003 5:29 pm
Location: IMS/UAF, USA

Re: some suggestion with history file and average file

#8 Post by kate » Thu Mar 03, 2011 5:51 pm

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