Why ROMS does not read the provided swflux?

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
yj7054
Posts: 18
Joined: Mon Sep 24, 2018 7:40 pm
Location: CSIRO - Hobart Site

Why ROMS does not read the provided swflux?

#1 Unread post by yj7054 »

Dear all,

I want to force my model using surface flux directly, so I turn off BULK_FLUXES. And I also turn on SRELAXATION, SOLAR_SOURCE. The model read sustr, svstr, swrad and shflux but does not read swflux which I also provided.

According to the get_data.F, swflux should be read after definding SRELAXATION:

Code: Select all

#  if defined NL_BULK_FLUXES && !defined BULK_FLUXES
         (read EminusP)
#  elif !(defined ANA_SSFLUX || defined FRC_COUPLING || \
          defined EMINUSP    || defined SRELAXATION)
         (read swflux)
#  endif
I am confused why the model doesn't read swflux and keep running. Did I forget to turn on (or off) some CPP? (all the CPP I used are listed below)

Kind Regards,
yj7054

Code: Select all

 ANA_BSFLUX          Analytical kinematic bottom salinity flux.
 ANA_BTFLUX          Analytical kinematic bottom temperature flux.
 ASSUMED_SHAPE       Using assumed-shape arrays.
 AVERAGES            Writing out time-averaged nonlinear model fields.
 !BOUNDARY_ALLGATHER Using mpi_allreduce in mp_boundary routine.
 !COLLECT_ALL...     Using mpi_isend/mpi_recv in mp_collect routine.
 CURVGRID            Orthogonal curvilinear grid.
 DJ_GRADPS           Parabolic Splines density Jacobian (Shchepetkin, 2002).
 DOUBLE_PRECISION    Double precision arithmetic numerical kernel.
 KANTHA_CLAYSON      Kantha and Clayson stability function formulation.
 MASKING             Land/Sea masking.
 MIX_ISO_TS          Mixing of tracers along isopycnal surfaces.
 MIX_GEO_UV          Mixing of momentum along geopotential surfaces.
 MPI                 MPI distributed-memory configuration.
 MY25_MIXING         Mellor/Yamada Level-2.5 mixing closure.
 NONLINEAR           Nonlinear Model.
 NONLIN_EOS          Nonlinear Equation of State for seawater.
 N2S2_HORAVG         Horizontal smoothing of buoyancy and shear.
 PERFECT_RESTART     Processing perfect restart variables.
 POWER_LAW           Power-law shape time-averaging barotropic filter.
 PROFILE             Time profiling activated .
 K_GSCHEME           Third-order upstream advection of TKE fields.
 RADIATION_2D        Use tangential phase speed in radiation conditions.
 REDUCE_ALLGATHER    Using mpi_allgather in mp_reduce routine.
 !RST_SINGLE         Double precision fields in restart NetCDF file.
 SALINITY            Using salinity.
 SRELAXATION         Surface salinity relaxation as surface flux.
 SOLAR_SOURCE        Solar Radiation Source Term.
 SOLVE3D             Solving 3D Primitive Equations.
 TS_U3HADVECTION     Third-order upstream horizontal advection of tracers.
 TS_C4VADVECTION     Fourth-order centered vertical advection of tracers.
 TS_DIF2             Harmonic mixing of tracers.
 UV_ADV              Advection of momentum.
 UV_COR              Coriolis term.
 UV_U3HADVECTION     Third-order upstream horizontal advection of 3D momentum.
 UV_C4VADVECTION     Fourth-order centered vertical advection of momentum.
 UV_QDRAG            Quadratic bottom stress.
 UV_VIS2             Harmonic mixing of momentum.
 VAR_RHO_2D          Variable density barotropic mode.

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

Re: Why ROMS does not read the provided swflux?

#2 Unread post by wilkin »

Code: Select all

#  if defined NL_BULK_FLUXES && !defined BULK_FLUXES
         (read EminusP)
#  elif !(defined ANA_SSFLUX || defined FRC_COUPLING || \
          defined EMINUSP    || defined SRELAXATION)
         (read swflux)
#  endif
|| is a logical "OR", and since defined SRELAXATION is "TRUE" the expression in () is TRUE, and the "!" is a logical "NOT", so the expression after elif is FALSE.

SRELAXTION says set the surface salt flux by relaxation to a defined salinity field, therefore ROMS has no need of swflux for the surface salt/freshwater flux. That's why it is not read.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

yj7054
Posts: 18
Joined: Mon Sep 24, 2018 7:40 pm
Location: CSIRO - Hobart Site

Re: Why ROMS does not read the provided swflux?

#3 Unread post by yj7054 »

Thank you very much!

I misunderstood the logic. It is a stupid question, sorry.

Post Reply