some question about define UV_SMAGORINSKY and TP_SMAGORINSKY

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
juanjuan_yao
Posts: 2
Joined: Tue Oct 12, 2010 9:12 pm
Location: Xiamen University,FUjian,China

some question about define UV_SMAGORINSKY and TP_SMAGORINSKY

#1 Unread post by juanjuan_yao »

dear everyone:
I'm a new user. I'm trying to find whether there really badly False diffusion in the advection. So I define UV_SMAGORINSKY, TP_SMAGORINSKY, MIX_S_UV and MIX_S_TS to do the experiment. Here is my CPP options:
# define SOLVE3D
# define UV_COR
# define UV_ADV
# define UV_QDRAG
# define UV_C4ADVECTION
# define DJ_GRADPS

# define CURVGRID
# define SPHERICAL
# define MASKING

# undef DIAGNOSTICS_TS
# define DIAGNOSTICS_UV
# define AVERAGES

# define SALINITY
# define NONLIN_EOS
# define SPLINES

# define SOLAR_SOURCE
# define QCORRECTION
# define DIURNAL_SRFLUX

# undef CLIMATOLOGY
# ifdef CLIMATOLOGY
# define ZCLIMATOLOGY
# undef M2CLIMATOLOGY
# undef M3CLIMATOLOGY
# define TCLIMATOLOGY
# undef M2CLM_NUDGING
# undef M3CLM_NUDGING
# define TCLM_NUDGING
# define ZCLM_NUDGING
# undef ROBUST_DIAG
# endif

# define ANA_BSFLUX
# define ANA_BTFLUX

# define TS_PSOURCE
# define UV_PSOURCE

# undef UV_U3ADV_SPLIT
# define TS_C2VADVECTION
# define UV_C2VADVECTION
# define UV_SMAGORINSKY /*SMAGORINSKY*/
# define TS_SMAGORINSKY /*MIX_S*/
# define MIX_S_UV
# define MIX_S_TS

# undef BODYFORCE
# undef BVF_MIXING
# define MY25_MIXING
# undef LMD_MIXING

# ifdef LMD_MIXING
# define LMD_RIMIX
# define LMD_CONVEC
# define LMD_SKPP
# define LMD_BKPP
# define LMD_NONLOCAL
# define LMD_DDMIX
# endif

# define RAMP_TIDES
# define SSH_TIDES
# define ADD_FSOBC
# define UV_TIDES
# define ADD_M2OBC
# undef EQUILIBRIUM_TIDE
# define EAST_FSCHAPMAN

# define EAST_M2FLATHER
# define EAST_TCLAMPED
# define EAST_M3CLAMPED

# undef OUT_DOUBLE
# define RST_SINGLE


However, when I run the model, I can't find the above four terms in my log file. When I ncdump the res files, I can't find them in my cpp options neither.
:CPP_options = "tws, ADD_FSOBC, ADD_M2OBC, ANA_BSFLUX, ANA_BTFLUX, ASSUMED_SHAPE, AVERAGES, CURVGRID, DIAGNOSTICS_UV, DIFF_3DCOEF, DIURNAL_SRFLUX, DJ_GRADPS, DOUBLE_PRECISION, EAST_FSCHAPMAN, EAST_M2FLATHER, EAST_M3CLAMPED, EAST_TCLAMPED, MASKING, MPI, MY25_MIXING, NONLINEAR, NONLIN_EOS, POWER_LAW, PROFILE, QCORRECTION, K_GSCHEME, RAMP_TIDES, RST_SINGLE, SALINITY, SOLAR_SOURCE, SOLVE3D, SPLINES, SPHERICAL, SPONGE, SSH_TIDES, TS_C4HADVECTION, TS_C2VADVECTION, TS_PSOURCE, UV_ADV, UV_COR, UV_C4ADVECTION, UV_QDRAG, UV_PSOURCE, UV_TIDES, VAR_RHO_2D, VISC_3DCOEF" ;

So I am just wondering how could it happenning?

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

Re: some question about define UV_SMAGORINSKY and TP_SMAGORI

#2 Unread post by kate »

You can confirm that these are indeed not defined by comparing say checkdefs.F with $SCRATCH_DIR/checkdefs.f90. What happens if you take away "/*SMAGORINSKY*/"?

juanjuan_yao
Posts: 2
Joined: Tue Oct 12, 2010 9:12 pm
Location: Xiamen University,FUjian,China

Re: some question about define UV_SMAGORINSKY and TP_SMAGORI

#3 Unread post by juanjuan_yao »

Hi Kate,
Thank you so much. I follow your advice to compare checkdefs.F with $SCRATCH_DIR/checkdefs.f90 and make sure that these are indeed not defined. I also read checkdefs.F and find out that if I want to define UV_SMAGORINSKY, I should also define UV_DIF2 or UV_DIF4. LIke wise, I should also define TS_DIF2 or TS_DIF4 for defining TS_SMAGORINSKY.
#if defined UV_SMAGORINSKY && (defined UV_DIF2 || defined UV_DIF4)
#if defined TS_SMAGORINSKY && (defined TS_DIF2 || defined TS_DIF4)

And for defining MIX_S_UV, UV_VIS2 or UV_VIS4 should be defined first; for defining MIX_S_TS, TS_DIF2 of TS_DIF4 should be defined first, too.
#if (defined TS_DIF2 || defined TS_DIF4) && defined SOLVE3D
# ifdef MIX_GEO_TS
IF (Master) WRITE (stdout,20) 'MIX_GEO_TS', &
& 'Mixing of tracers along geopotential surfaces.'
is=LEN_TRIM(Coptions)+1
Coptions(is:is+12)=' MIX_GEO_TS,'
# endif
# ifdef MIX_ISO_TS
IF (Master) WRITE (stdout,20) 'MIX_ISO_TS', &
& 'Mixing of tracers along isopycnal surfaces.'
is=LEN_TRIM(Coptions)+1
Coptions(is:is+12)=' MIX_ISO_TS,'
# endif
# ifdef MIX_S_TS
IF (Master) WRITE (stdout,20) 'MIX_S_TS', &
& 'Mixing of tracers along constant S-surfaces.'
is=LEN_TRIM(Coptions)+1
Coptions(is:is+10)=' MIX_S_TS,'
# endif
#endif

#if (defined UV_VIS2 || defined UV_VIS4) && defined SOLVE3D
# ifdef MIX_GEO_UV
IF (Master) WRITE (stdout,20) 'MIX_GEO_UV', &
& 'Mixing of momentum along geopotential surfaces.'
is=LEN_TRIM(Coptions)+1
Coptions(is:is+11)=' MIX_GEO_UV,'
# endif
# ifdef MIX_S_UV
IF (Master) WRITE (stdout,20) 'MIX_S_UV', &
& 'Mixing of momentum along constant S-surfaces.'
is=LEN_TRIM(Coptions)+1
Coptions(is:is+10)=' MIX_S_UV,'
# endif
#endif

So now I define in my CPP options as follows:
# define UV_DIF2
# define UV_SMAGORINSKY
# define TS_DIF2
# define TS_SMAGORINSKY
# define UV_VIS2
# define MIX_S_UV
# define MIX_S_TS
In this time, these four have been all defined. And when I run the model, everythings seems to be all right.
But I have another question: when searching for UV_DIF2 in ROMS source code, I can't find any useful information for it, expect for that " #if defined UV_SMAGORINSKY && (defined UV_DIF2 || defined UV_DIF4) " in checkdefs.F. So I want to know what's the difference between UV_DIF2 and UV_VIS2. Can I use them both?
Thanks!

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

Re: some question about define UV_SMAGORINSKY and TP_SMAGORI

#4 Unread post by kate »

juanjuan_yao wrote:But I have another question: when searching for UV_DIF2 in ROMS source code, I can't find any useful information for it, expect for that " #if defined UV_SMAGORINSKY && (defined UV_DIF2 || defined UV_DIF4) " in checkdefs.F. So I want to know what's the difference between UV_DIF2 and UV_VIS2. Can I use them both?
Thanks!
I'm betting it's a typo and should be just UV_VIS2. Hernan?

Post Reply