variables not reading

Facts, news, and guidance about ROMS software

Moderators: arango, robertson

Post Reply
Message
Author
francis
Posts: 21
Joined: Wed Jun 13, 2007 1:22 pm
Location: Indian National Center for Ocean Information Servi

variables not reading

#1 Unread post by francis »

Hi all,
I want to relax my surface salinity to climatology and others to evolve, so I used SRELAXATION. But it is not relaxing correctly when I see the sss output. When I tried to write net salt flux ssflux, it wrote nothing. I gave surface net fresh water flux in forcing file, sss, sst,tides,etc. But it is not reading the swflux. But everymonth model is reading SSS. How to relax it properly? I hereby giving my cppdefs.h options.
#define UV_ADV
#define UV_COR
#define UV_QDRAG
#define UV_VIS4
#define INLINE_2DIO
#define UV_C4ADVECTION
#define DJ_GRADPS
#define MIX_S_UV
#define TS_U3HADVECTION
#define TS_C4VADVECTION
#define TS_DIF2
#define MIX_S_TS
#define NONLIN_EOS
#define SALINITY
#define CURVGRID
#define SOLVE3D
#define MASKING
#define SPLINES
#define SOLAR_SOURCE
#define SRELAXATION
#define BULK_FLUXES
#ifdef BULK_FLUXES
# undef LONGWAVE
# undef EMINUSP
#endif
#define AVERAGES
#define AVERAGES_AKV
#define AVERAGES_FLUXES
#define NORTHERN_WALL
#define WESTERN_WALL
#undef SOUTHERN_WALL
#undef EASTERN_WALL
#define MY25_MIXING
# ifdef MY25_MIXING
# define N2S2_HORAVG
# define KANTHA_CLAYSON
# define K_C2ADVECTION
# endif
#undef LMD_MIXING
#ifdef LMD_MIXING
# define LMD_RIMIX
# define LMD_CONVEC
# define LMD_SKPP
# define LMD_BKPP
# define LMD_NONLOCAL
#endif
#define ANA_BSFLUX
#define ANA_BTFLUX
#undef TS_PSOURCE
#undef UV_PSOURCE
#define SSH_TIDES
#ifdef SSH_TIDES
# define ADD_FSOBC
# define SOUTH_FSCHAPMAN
# define EAST_FSCHAPMAN
#else
# define SOUTH_FSGRADIENT
#endif
#define UV_TIDES
#ifdef UV_TIDES
# define ADD_M2OBC
# define SOUTH_M2FLATHER
# define EAST_M2FLATHER
#else
# define SOUTH_M2RADIATION
#endif
#if defined SSH_TIDES || defined UV_TIDES
# define SOUTH_VOLCONS
# define EAST_VOLCONS
#else
# undef SOUTH_VOLCONS
#endif
#define SOUTH_TNUDGING
#define EAST_TNUDGING
#undef SOUTH_TRADIATION
#undef SOUTH_M3RADIATION
#undef SOUTH_M3NUDGING
#undef EAST_TRADIATION
#undef EAST_M3RADIATION
#undef EAST_M3NUDGING
Can anybody say why it is happening so?

With regards,
Francis.

nencio

Re: variables not reading

#2 Unread post by nencio »

Hi Francis,

from my understanding surface and bottom salt fluxes are computed in set_vbc.F.

There are 3 ways to compute the surface salt flux depending on the CPP options you pass. The model uses the swflux you pass from the forcing file in two cases:

1) when only SALINITY is defined;

2) when SALINITY and SCORRECTION are defined;

When you define SALINITY and SRELAXATION the model computes the surface salt flux multiplying the nudging time scale by the difference between the actual SSS and the SSS from the forcing file and the thickness of the first layer.

Hope this answer your question.

Cheers,
francesco

francis
Posts: 21
Joined: Wed Jun 13, 2007 1:22 pm
Location: Indian National Center for Ocean Information Servi

Re: variables not reading

#3 Unread post by francis »

Yes, u r right.
Thank u Nencio and I had given 0 nudging time scale in .in file, so it happened like that.

With best regards,
Francis.

pengjia
Posts: 10
Joined: Thu Aug 21, 2008 4:24 pm
Location: UMCP

Re: variables not reading

#4 Unread post by pengjia »

In set_vbc.F, you'll find the following code helps a lot:

# ifdef SALINITY
!
!-----------------------------------------------------------------------
! Multiply fresh water flux with surface salinity. If appropriate,
! apply correction.
!-----------------------------------------------------------------------
!
DO j=JstrR,JendR
DO i=IstrR,IendR
# if defined SCORRECTION
stflx(i,j,isalt)=stflx(i,j,isalt)*t(i,j,N(ng),nrhs,isalt)- &
& Tnudg(isalt,ng)*Hz(i,j,N(ng))* &
& (t(i,j,N(ng),nrhs,isalt)-sss(i,j))
# elif defined SRELAXATION
stflx(i,j,isalt)=-Tnudg(isalt,ng)*Hz(i,j,N(ng))* &
& (t(i,j,N(ng),nrhs,isalt)-sss(i,j))
# else
stflx(i,j,isalt)=stflx(i,j,isalt)*t(i,j,N(ng),nrhs,isalt)
# endif
btflx(i,j,isalt)=btflx(i,j,isalt)*t(i,j,1,nrhs,isalt)
END DO
END DO
# endif

Post Reply