HIS and AVG output variable selection

Suggest improvements/optimizations to the ROMS code.

Moderators: arango, robertson

Post Reply
Message
Author
rsignell
Posts: 124
Joined: Fri Apr 25, 2003 9:22 pm
Location: USGS

HIS and AVG output variable selection

#1 Unread post by rsignell »

I'd like to see variables intended for HISTORY, AVERAGES or TIME SERIES files to ALL be controlled from the ocean.in file.

I just realized that in my recently completed run, I don't have the wind stress in the NetCDF averages file because I forgot to compile the code with #define AVERAGES_FLUXES in the cppdefs.h file.

So not only do I have to rerun the model, I have to recompile the code.

The control of output variables in the HISTORY files are nicely controlled by switches in the ocean.in file, but the control of output variables in the AVERAGES files are controlled by variables defined in the cppdefs.h file. I don't think there is a good reason for this, is there?

Thanks,
Rich

User avatar
wilkin
Posts: 875
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

#2 Unread post by wilkin »

Rich,

mod_average.F declares the arrays that accumulate the various average quantities. If these quantities aren't required by a user, then it doesn't make sense to allocate the memory (which is considerable because there are many 3D arrays).

The easiest way to control unnecessary array allocation at compile time is with a CPP define.

To handle this more robustly would require quite a bit of recoding - even if only to make changes that would allow a test to trap the case that a user requested quantities in ocean.in but forgot to activate the CPP define. But this is the sort of mistake one makes once and remembers thereafter. So I can live with it the way it is.

John.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Post Reply