Doubts about header file:

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
edwardrivera
Posts: 11
Joined: Wed Apr 24, 2013 11:08 am
Location: CariCOOS

Doubts about header file:

#1 Unread post by edwardrivera »

For my simulation I have two files for forcing, one has the following variables and the other one has tidal forcing from OTPS. My questions is having these variables (below) which analytical options I need to have define in order to run the simulation.

variables:
double sustr(ndfd_time, eta_u, xi_u) ;
sustr:long_name = "Kinematic wind stress, u-component (m2 s-2)" ;
sustr:units = "Newton meter-2" ;
sustr:time = "ndfd_time" ;
double svstr(ndfd_time, eta_v, xi_v) ;
svstr:long_name = "Kinematic wind stress, v-component (m2 s-2)" ;
svstr:units = "Newton2 meter-2" ;
svstr:time = "ndfd_time" ;
double ndfd_time(ndfd_time) ;
ndfd_time:long_name = "sea surface observation time" ;
ndfd_time:units = "days since 2014-01-10 01:00:00" ;

This is my header file:

/* Options for Model configuration */
#define SOLVE3D /* Solving 3D Primitive equations */
#define MASKING /* Land/sea masking */
#define SPHERICAL /* Analytical spherical grid */
#define SPLINES /* Parabolic splines reconstruction of vertical derivatives */
#undef AVERAGES /* Writing out time-averaged data */
#define PROFILE /* Use time profiling */
#define STATIONS /* Writing out station data */

#define UV_ADV /* Advection terms */
#define UV_COR /* Coriolis terms */
#undef UV_C4ADVECTION /* 4th-order centered advection */
#undef UV_SADVECTION /* Splines vertical advection */
#define UV_VIS2 /* Harmonic horizontal mixing */
#define UV_QDRAG /* Quadratic bottom friciton */

#undef TS_C4HADVECTION /* 4th-order centered horizontal advection */
#define TS_U3HADVECTION /* 3th-order upstream horizontal advection */
#define TS_C4VADVECTION /* 4th_order centered horizontal advection */
#define TS_DIF2 /* Turn ON Harmonic horizontal mixing */
#define SALINITY /* Salinity */
#define NONLIN_EOS /* Nonlinear equation of state */

#define DJ_GRADPS /* Splines density Jacobian */

#define ANA_BSFLUX /* Analytical bottom salinity flux */
#define ANA_BTFLUX /* Analytical bottom temperature flux */

#define MIX_S_UV /* Mixing along constant S-surfaces */
#undef MIX_GEO_UV /* Mixing along geopotential (constant Z) surfaces */

#define MIX_GEO_TS /* Mixing along geopotential (cosntant Z) surfaces */

#define GLS_MIXING /* Generic Length-Scale mixing */
#ifdef GLE_MIXING

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

Re: Doubts about header file:

#2 Unread post by wilkin »

The ROMS default is to read surface forcing data from netcdf files unless instructed otherwise by setting "analytical" options
#define ANA_SMFLUX
#define ANA_STFLUX
which will force compiling of analytical configuration files in directory ROMS/Functionals such as ana_smflux.h and ana_stflux.h which the user should customize for the application. Recommended practice is to copy the relevant ana_*.h files to your project directory and make the changes there, thereby shadowing the version in the code trunk (but this is up to you how you do it).

In your case, your netcdf file has surface momentum fluxes (sustr, svstr) but no heat flux, and you have not defined ANA_STFLUX. So when this runs ROMS will exit at the very start saying it was unable to find the heat flux in the forcing file. It will report the name of the last file in the list it searched, which could be the tides file which is a bit confusing but ROMS can't possibly know where you meant to put the forcing but didn't.

Depending on what you want to do with heat fluxes and solar radiation, you may also want to #define SOLAR_SOURCE and #define ANA_SRFLUX and configure ana_srflux.h
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Post Reply