The wet_dry switch disrupts the Kuroshio Current

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
xiaoju
Posts: 3
Joined: Thu Dec 21, 2023 1:11 am
Location: Ocean University of China

The wet_dry switch disrupts the Kuroshio Current

#1 Unread post by xiaoju »

Hello everyone,

I am using the ROMS model to build a hydrodynamic model of the East China Sea (Bohai, Yellow and East China Seas). When the WET_DRY switch is not turned on, the model can run normally for four years, and the shape of the Kuroshio Current is normal. However, due to the complex topography of the coastal areas of China, turning on the WET_DRY switch may make the simulation of the Yangtze River freshwater plume more accurate. Therefore, I turned on the WET_DRY switch, but after turning it on, the shape of the Kuroshio Current became chaotic from the first time step, and many vortices appeared around several small islands. I checked the bathymetry of the Kuroshio Current area, and the minimum water depth is still over 30 meters, so there should be no change in wet and dry grids. I don't understand why the Kuroshio Current becomes chaotic after turning on the WET_DRY switch. I wonder if anyone has encountered a similar situation and could give me some advice. Thank you very much.

Below are my h file, in file, and the results of the fourth year with and without the WET_DRY switch turned on.

COAWST version:

Code: Select all


ROMS/TOMS Framework: Jul 31, 2019
===================

Copyright (c) 2002-2019 The ROMS/TOMS Group
  Licensed under a MIT/X style license
  See License_ROMS.txt

svn: $HeadURL: https://www.myroms.org/svn/src/trunk/ROMS/Version $
svn: $LastChangedBy: arango $
svn: $LastChangedRevision: 980 $
svn: $LastChangedDate: 2019-07-31 11:36:21 -0400 (Wed, 31 Jul 2019) $

.h file:
 /*
 * ** svn $Id: sandy.h 25 2007-04-09 23:43:58Z jcwarner $
 * *******************************************************************************
 * ** Copyright (c) 2002-2007 The ROMS/TOMS Group                               **
 * **   Licensed under a MIT/X style license                                    **
 * **   See License_ROMS.txt                                                    **
 * *******************************************************************************
 * **
 * ** Options for Sandy Test.
 * **
 * ** Application flag:   BYECS_6km
 * */

#define ROMS_MODEL
#undef NESTING
#undef WRF_MODEL
#undef SWAN_MODEL
#undef WW3_MODEL

#ifdef NESTING
#  undef ONE_WAY
#  undef NESTING_DEBUG
#  define NO_CORRECT_TRACER
#  define TIME_INTERP_FLUX
#endif

#undef MCT_LIB
#if defined ROMS_MODEL && defined WRF_MODEL
#  define MCT_INTERP_OC2AT
#endif
#if defined WRF_MODEL && (defined SWAN_MODEL || defined WW3_MODEL)
#  define MCT_INTERP_WV2AT
#endif
#if defined ROMS_MODEL && (defined SWAN_MODEL || defined WW3_MODEL)
#  define MCT_INTERP_OC2WV
#endif
#if defined WRF_MODEL && (defined SWAN_MODEL || defined WW3_MODEL)
#  define DRAGLIM_DAVIS
#  define COARE_TAYLOR_YELLAND
#endif

#ifdef ROMS_MODEL
/* Physics + numerics */
#  define UV_ADV  /*使用对流项*/
#  define UV_COR  /*使用科氏力*/

/* Grid and Initial */
#  define MASKING  /*使用掩膜(海陆分界)*/

#  define SOLVE3D  /*使用三维斜压方程组*/
#  define CURVGRID  /*使用曲线网格*/
#  define NONLIN_EOS  /*使用非线性的状态方程*/
#  define SALINITY  /*使用非定常盐度*/
#  define DJ_GRADPS  /*Density Jacobian 使用样条算法,减少sigma坐标带来的水平压力误差*/
/*#  define WET_DRY                 /* different!!!!! use to activate wetting and drying*/

#  define SPLINES_SWITCH
#  ifdef SPLINES_SWITCH
#    define SPLINES_VDIFF
#    define SPLINES_VVISC
#    define RI_SPLINES
#  endif

#  define TS_MPDATA
#  ifdef TS_MPDATA
#    undef TS_U3HADVECTION
#    undef TS_C4VADVECTION
#  else
#    define TS_U3HADVECTION
#    define TS_C4VADVECTION
#  endif

#  define UV_VIS2  /*水平动量使用谐波混合*/
#  define MIX_S_UV  /*混合沿定常S平面*/
#  define UV_SMAGORINSKY

#  ifndef UV_VIS2
#    define UV_VIS4
#  endif
#  ifndef MIX_S_UV
#    define MIX_GEO_UV
#  endif

#  define TS_DIF2  /*tracer使用谐波混合*/
#  undef MIX_S_TS  /*混合沿定常S平面,change on 20251004 */
#  define TS_SMAGORINSKY

#  ifndef TS_DIF2
#    define TS_VIS4
#  endif
#  ifndef MIX_S_TS
#    define MIX_GEO_TS
#  endif



/* Forcing */
#  ifdef SOLVE3D
#    define ANA_BTFLUX  /*底层无热通量*/
#    define ANA_BSFLUX  /*底层无水通量*/
#  endif
/*#  define ANA_INITIAL  /*初始场使用解析解*/
/*#  define ANA_SMFLUX  /*使用解析公式计算表面动量通量(风应力)*/
/*#  define ANA_STFLUX  /*使用解析公式计算表面热通量*/
/*#  define ANA_SSFLUX  /*使用解析公式计算表面淡水通量*/


#  ifdef WRF_MODEL
#    define ATM2OCN_FLUXES
#    ifndef ATM2OCN_FLUXES
#      define BULK_FLUXES
#      define NL_BULK_FLUXES
#      define COOL_SKIN
#      define WIND_MINUS_CURRENT
#    endif
#  else
#    define BULK_FLUXES
#    define NL_BULK_FLUXES
#    define COOL_SKIN
#    define WIND_MINUS_CURRENT
#  endif

#  define ATM_PRESS
#  define EMINUSP
#  define EMINUSP_SSH
#  define SOLAR_SOURCE
#  define LIMIT_STFLX_COOLING
#  undef QCORRECTION  /*热通量修正*/
#  undef SCORRECTION  /*淡水通量修正*/


/* #  define LIMIT_STFLX_WARMING */
/*#  define LIMIT_STFLX_COOLING
/*#  define LIMIT_SSFLX_COOLING */




/* wave */
#  undef SSW_BBL              /* Sherwood et al. BBL closure */

#  ifdef SSW_BBL
#    define SSW_CALC_ZNOT     /* Computing bottom roughness internally */
#    undef SSW_LOGINT         /* Logarithmic interpolation of (Ur,Vr) */
#    define SSW_CALC_UB       /* Computing bottom orbital velocity internally */
#    undef SSW_FORM_DRAG_COR  /* Activate form drag coefficient */
#    undef SSW_ZOBIO          /* Biogenic bedform roughness from ripples */
#    undef SSW_ZOBL           /* Bedload roughness for ripples */
#    undef SSW_ZORIP          /* Bedform roughness from ripples */
#  else
#    define UV_QDRAG  /*二次底摩擦方案*/
#  endif




/* Turbulence closure */
#  define MY25_MIXING  /*使用MY25混合方案(模拟潮汐现象显著eg.渤海黄海)*/
#  undef GLS_MIXING  /*使用通用的混合方案(模拟海口)*/
#  undef LMD_MIXING
#  undef AKLIMIT

#  ifdef AKLIMIT
#    define LIMIT_VDIFF
#    define LIMIT_VVISC
#  endif

#  ifdef MY25_MIXING
#    define KANTHA_CLAYSON /*使用Kantha-Clayson混合方案*/
#    define N2S2_HORAVG  /*浮力/剪切的水平平滑,保障模拟的稳定性*/
/*#    define RI_SPLINES
#    define Canuto A*/
#  endif

#  ifdef GLS_MIXING
#    define KANTHA_CLAYSON /*使用Kantha-Clayson混合方案*/
#    define N2S2_HORAVG  /*浮力/剪切的水平平滑,保障模拟的稳定性*/
/*#    define RI_SPLINES
#    define Canuto A*/
#    undef CRAIG_BANNER
#    undef CHARNOK
#  endif

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




/* tide */
#  define TIDAL

#  ifdef TIDAL
#    undef LTIDES
#    ifdef LTIDES
#      define FILTERED
#      define SSH_TIDES
#      define UV_TIDES
#      define RAMP_TIDES
#      define TIDES_ASTRO
#      define POT_TIDES
#      define UV_LDRAG
#      define UV_DRAG_GRID
#      define ANA_DRAG
#      define DRAG_LIMITER
#      undef UV_QDRAG
#    else
#      define SSH_TIDES  /*使用潮汐强迫*/
#      define UV_TIDES  /*使用潮流强迫*/
#      define RAMP_TIDES
#      ifdef SSH_TIDES
#        define ADD_FSOBC
#        undef ANA_FSOBC
#      else
#        define ANA_FSOBC
#      endif
#      ifdef UV_TIDES
#        define ADD_M2OBC
#        undef ANA_M2OBC
#      else
#        ifdef SSH_TIDES
#          define FSOBC_REDUCED 
#        else
#          define ANA_M2OBC
#        endif
#      endif
#    endif
#  endif

#  define RADIATION_2D

/* Input & Output */
#  undef PNETCDF
#  ifdef PNETCDF
#    undef PARALLEL_IN
#    define PARALLEL_OUT
#  endif
#  define AVERAGES  /*输出控制,按时间平均来输出变量*/
#  define PERFECT_RESTART
#  define RST_SINGLE
#  undef DIAGNOSTICS
#  undef DIAGNOSTICS_TS
#  undef DIAGNOSTICS_UV
#  undef STATIONS


#endif





.in file:
!
!  ROMS/TOMS Standard Input parameters.
!
!svn $Id: ocean_upwelling.in 877 2017-11-15 04:04:42Z arango $
!========================================================= Hernan G. Arango ===
!  Copyright (c) 2002-2018 The ROMS/TOMS Group                                !
!    Licensed under a MIT/X style license                                     !
!    See License_ROMS.txt                                                     !
!==============================================================================
!                                                                             !
! Input parameters can be entered in ANY order, provided that the parameter   !
! KEYWORD (usually, upper case) is typed correctly followed by "="  or "=="   !
! symbols. Any comment lines are allowed and must begin with an exclamation   !
! mark (!) in column one.  Comments may appear to the right of a parameter    !
! specification to improve documentation.  Comments are ignored during        !
! reading.  Blank lines are also allowed and ignored. Continuation lines in   !
! a parameter specification are allowed if preceded by a backslash (\).  In   !
! some instances, more than one value is required for a parameter.  If fewer  !
! values are provided, the last value is assigned for the entire parameter    !
! array.  The multiplication symbol (*),  without blank spaces in between,    !
! is allowed for a parameter specification. For example, in two grids nested  !
! application:                                                                !
!                                                                             !
!    AKT_BAK == 2*1.0d-6  2*5.0d-6              ! m2/s                        !
!                                                                             !
! indicates that the first two entries of array AKT_BAK,  in fortran column-  !
! major order, will have the same value of "1.0d-6" for grid 1,  whereas the  !
! next two entries will have the same value of "5.0d-6" for grid 2.           !
!                                                                             !
! In multiple levels of nesting or multiple connected domains step-ups,       !
! "Ngrids" entries are expected for some of these parameters. In such case,   !
! the order of the entries for a parameter is critical. It must follow the    !
! same order (1:Ngrids) as in the state variable declaration. The USER may    !
! follow the above guidelines for specifying his/her values. These parameters !
! are marked by "==" plural symbol after the KEYWORD.                         !
!                                                                             !
! Multiple NetCDF files are allowed for input field(s). It is useful when     !
! splitting input data (climatology,  boundary,  forcing) time records into   !
! several files (say monthly, annual, etc.). In this case, each multiple      !
! filename entry lines need to end with the vertical bar (|) symbol. For      !
! example:                                                                    !
!                                                                             !
!    NFFILES == 6                          ! number of forcing files          !
!                                                                             !
!    FRCNAME == my_lwrad_year1.nc |                                           !
!               my_lwrad_year2.nc \                                           !
!               my_swrad_year1.nc |                                           !
!               my_swrad_year2.nc \                                           !
!               my_winds_year1.nc |                                           !
!               my_winds_year2.nc \                                           !
!               my_Pair_year1.nc  |                                           !
!               my_Pair_year2.nc  \                                           !
!               my_Qair_year1.nc  |                                           !
!               my_Qair_year2.nc  \                                           !
!               my_Tair_year1.nc  |                                           !
!               my_Tair_year2.nc                                              !
!                                                                             !
! Notice that NFFILES is 6 and not 12. There are 6 uniquely different fields  !
! in the file list,  we  DO NOT  count file entries followed by the vertical  !
! bar symbol.  This is because  multiple file  entries are processed in ROMS  !
! with derived type structures.                                               !
!                                                                             !
!==============================================================================
!
! Application title.

       TITLE = BYECS_6km

! C-preprocessing Flag.

    MyAppCPP = BYECS_6km

! Input variable information file name.  This file needs to be processed
! first so all information arrays can be initialized properly.

     VARNAME = /data/home/xiayujie/Code/ROMS/External/varinfo.dat

! Number of nested grids.

      Ngrids =  1

! Number of grid nesting layers.  This parameter is used to allow refinement
! and composite grid combinations.

  NestLayers =  1

! Number of grids in each nesting layer [1:NestLayers].

GridsInLayer =  1

! Grid dimension parameters. See notes below in the Glossary for how to set
! these parameters correctly.

          Lm == 279           ! Number of I-direction INTERIOR RHO-points
          Mm == 405           ! Number of J-direction INTERIOR RHO-points
           N == 20            ! Number of vertical levels

        Nbed =  0             ! Number of sediment bed layers

         NAT =  2             ! Number of active tracers (usually, 2)
         NPT =  0             ! Number of inactive passive tracers
         NCS =  0             ! Number of cohesive (mud) sediment tracers
         NNS =  0             ! Number of non-cohesive (sand) sediment tracers

! Domain decomposition parameters for serial, distributed-memory or
! shared-memory configurations used to determine tile horizontal range
! indices (Istr,Iend) and (Jstr,Jend), [1:Ngrids].

      NtileI == 8                             ! I-direction partition
      NtileJ == 12                             ! J-direction partition

! Set lateral boundary conditions keyword. Notice that a value is expected
! for each boundary segment per nested grid for each state variable.
!
! Each tracer variable requires [1:4,1:NAT+NPT,Ngrids] values. Otherwise,
! [1:4,1:Ngrids] values are expected for other variables. The boundary
! order is: 1=west, 2=south, 3=east, and 4=north. That is, anticlockwise
! starting at the western boundary.
!
! The keyword is case insensitive and usually has three characters. However,
! it is possible to have compound keywords, if applicable. For example, the
! keyword "RadNud" implies radiation boundary condition with nudging. This
! combination is usually used in active/passive radiation conditions.
!
!   Keyword    Lateral Boundary Condition Type
!
!   Cha        Chapman_implicit (free-surface)
!   Che        Chapman_explicit (free-surface)
!   Cla        Clamped
!   Clo        Closed
!   Fla        Flather (2D momentum)                  _____N_____     j=Mm
!   Gra        Gradient                              |     4     |
!   Nes        Nested (refinement)                   |           |
!   Nud        Nudging                             1 W           E 3
!   Per        Periodic                              |           |
!   Rad        Radiation                             |_____S_____|
!   Red        Reduced Physics (2D momentum)               2          j=1
!   Shc        Shchepetkin (2D momentum)            i=1         i=Lm
!
!                   W       S       E       N
!                   e       o       a       o
!                   s       u       s       r
!                   t       t       t       t
!                           h               h
!
!                   1       2       3       4

   LBC(isFsur) ==   Clo     Cha     Cha     Cha         ! free-surface
   LBC(isUbar) ==   Clo     Fla     Fla     Fla         ! 2D U-momentum
   LBC(isVbar) ==   Clo     Fla     Fla     Fla         ! 2D V-momentum
   LBC(isUvel) ==   Clo     Cla     Cla     Cla         ! 3D U-momentum
   LBC(isVvel) ==   Clo     Cla     Cla     Cla         ! 3D V-momentum
   LBC(isMtke) ==   Clo     Gra     Gra     Gra         ! mixing TKE

   LBC(isTvar) ==   Clo     RadNud     RadNud     RadNud\     ! temperature
                    Clo     RadNud     RadNud     RadNud      ! salinity


! Ice boundary conditions

   LBC(isAice) ==   Per     Clo     Per     Clo         ! ice concentration
   LBC(isHice) ==   Per     Clo     Per     Clo         ! ice thickness
   LBC(isHsno) ==   Per     Clo     Per     Clo         ! snow thickness
   LBC(isTice) ==   Per     Clo     Per     Clo         ! ice temperature
   LBC(isApond)==   Per     Clo     Per     Clo         ! surface water
   LBC(isHpond)==   Per     Clo     Per     Clo         ! surface water
   LBC(isSig11)==   Per     Clo     Per     Clo         ! sigma-11
   LBC(isSig12)==   Per     Clo     Per     Clo         ! sigma-12
   LBC(isSig22)==   Per     Clo     Per     Clo         ! sigma-22
   LBC(isUice) ==   Per     Clo     Per     Clo         ! ice U-momentum
   LBC(isVice) ==   Per     Clo     Per     Clo         ! ice V-momentum

! Adjoint-based algorithms can have different lateral boundary
! conditions keywords.

ad_LBC(isFsur) ==   Per     Clo     Per     Clo         ! free-surface
ad_LBC(isUbar) ==   Per     Clo     Per     Clo         ! 2D U-momentum
ad_LBC(isVbar) ==   Per     Clo     Per     Clo         ! 2D U-momentum
ad_LBC(isUvel) ==   Per     Clo     Per     Clo         ! 3D U-momentum
ad_LBC(isVvel) ==   Per     Clo     Per     Clo         ! 3D V-momentum
ad_LBC(isMtke) ==   Per     Clo     Per     Clo         ! mixing TKE

ad_LBC(isTvar) ==   Per     Clo     Per     Clo \       ! temperature
                    Per     Clo     Per     Clo         ! salinity

! Set lateral open boundary edge volume conservation switch for
! nonlinear model and adjoint-based algorithms. Usually activated
! with radiation boundary conditions to enforce global mass
! conservation, except if tidal forcing is enabled. [1:Ngrids].

   VolCons(west)  ==  F                            ! western  boundary
   VolCons(east)  ==  F                            ! eastern  boundary
   VolCons(south) ==  F                            ! southern boundary
   VolCons(north) ==  F                            ! northern boundary

ad_VolCons(west)  ==  F                            ! western  boundary
ad_VolCons(east)  ==  F                            ! eastern  boundary
ad_VolCons(south) ==  F                            ! southern boundary
ad_VolCons(north) ==  F                            ! northern boundary

! Time-Stepping parameters.

      NTIMES == 350630   !1575360*60 !262560*360   !3150720*30   !167040 
!1050240*90
          DT == 360.0d0
     NDTFAST == 60

! Model iteration loops parameters.

       ERstr =  1
       ERend =  1
      Nouter =  1
      Ninner =  1
  Nintervals =  1

! Number of eigenvalues (NEV) and eigenvectors (NCV) to compute for the
! Lanczos/Arnoldi problem in the Generalized Stability Theory (GST)
! analysis. NCV must be greater than NEV (see documentation below).
         NEV =  2                               ! Number of eigenvalues
         NCV =  10                              ! Number of eigenvectors

! Input/Output parameters.

       NRREC == 0      !-1
   LcycleRST == F
        NRST == 2400    !1440*60   !2880*30   !240*360  !1day
        NSTA == 1
        NFLT == 1
       NINFO == 1

! Output history, quicksave, average, and diagnostic files parameters.

     LDEFOUT == T
        NHIS == 2400         !60      ! 1hour
     NDEFHIS == 87600         !525600   ! 1year
        NQCK == 0   !60*60 !10*360       ! 1hour
     NDEFQCK == 0   !1440*60  !240*360      ! 1day
      NTSAVG == 1
        NAVG == 240   !1440*60  !240*360      ! 1day
     NDEFAVG == 87600 !525600*60   !1051200*30   !87600*360 ! 1year
     !350400*90
      NTSDIA == 0
        NDIA == 0   !1440*60  !240*360      ! 1day
     NDEFDIA == 0   !1440*60  !240*360      ! 1day

! Output tangent linear and adjoint models parameters.

   LcycleTLM == F
        NTLM == 72
     NDEFTLM == 0
   LcycleADJ == F
        NADJ == 72
     NDEFADJ == 0
        NSFF == 72
        NOBC == 72

! GST output and check pointing restart parameters.

   LmultiGST =  F                               ! one eigenvector per file
     LrstGST =  F                               ! GST restart switch
  MaxIterGST =  500                             ! maximum number of iterations
        NGST =  10                              ! check pointing interval

! Relative accuracy of the Ritz values computed in the GST analysis.

    Ritz_tol =  1.0d-15

! Harmonic/biharmonic horizontal diffusion of tracer for nonlinear model
! and adjoint-based algorithms: [1:NAT+NPT,Ngrids].

        TNU2 == 3.5d0 3.5d0                    ! m2/s
        TNU4 == 2*0.0d0                         ! m4/s

     ad_TNU2 == 0.0d0  0.0d0                    ! m2/s
     ad_TNU4 == 0.0d0  0.0d0                    ! m4/s

! Harmonic/biharmonic, horizontal viscosity coefficient for nonlinear model
! and adjoint-based algorithms: [Ngrids].

       VISC2 == 35.0d0                           ! m2/s
       VISC4 == 0.0d0                           ! m4/s

    ad_VISC2 == 0.0d0                           ! m2/s
    ad_VISC4 == 0.0d0                           ! m4/s

! Logical switches (TRUE/FALSE) to increase/decrease horizontal viscosity
! and/or diffusivity in specific areas of the app                               lication domain (like
! sponge areas) for the desired application grid.                                                                                

    LuvSponge == F                              ! horizontal momentum
LtracerSponge == F F                            ! temperature, salinity, inert

! Vertical mixing coeffi cients for tracers in nonlinear model and
! basic state scale factor in adjoint-based algorithms: [1:NAT+NPT,Ngrids]

     AKT_BAK == 1.0d-6 1.0d-6                   ! m2/s

  ad_AKT_fac == 1.0d0  1.0d0                    ! nondimensional

! Vertical mixing coefficient for momentum for nonlinear model and
! basic state scale factor in adjoint-based algorithms: [Ngrids].

     AKV_BAK == 1.0d-5                          ! m2/s

  ad_AKV_fac == 1.0d0                           ! nondimensional

! Upper threshold values to limit vertical mixing coefficients computed
! from vertical mixing parameterizations. Although this is an engineering
! fix, the vertical mixing values inferred from ocean observations are
! rarely higher than this upper limit value.

   AKT_LIMIT == 1.0d-3 1.0d-3                   ! m2/s

   AKV_LIMIT == 1.0d-3                          ! m2/s

! Turbulent closure parameters.

     AKK_BAK == 5.0d-6                          ! m2/s
     AKP_BAK == 5.0d-6                          ! m2/s
      TKENU2 == 0.0d0                           ! m2/s
      TKENU4 == 0.0d0                           ! m4/s

! Generic length-scale turbulence closure parameters.

       GLS_P == 3.0d0                           ! K-epsilon
       GLS_M == 1.5d0
       GLS_N == -1.0d0
    GLS_Kmin == 7.6d-6
    GLS_Pmin == 1.0d-12

    GLS_CMU0 == 0.5477d0
      GLS_C1 == 1.44d0
      GLS_C2 == 1.92d0
     GLS_C3M == -0.4d0
     GLS_C3P == 1.0d0
    GLS_SIGK == 1.0d0
    GLS_SIGP == 1.30d0

! Constants used in surface turbulent kinetic energy flux computation.

  CHARNOK_ALPHA == 1400.0d0         ! Charnok surface roughness
 ZOS_HSIG_ALPHA == 0.5d0            ! roughness from wave amplitude
       SZ_ALPHA == 0.25d0           ! roughness from wave dissipation
      CRGBAN_CW == 100.0d0          ! Craig and Banner wave breaking

! Constants used in momentum stress computation.

        RDRG == 3.0d-04                    ! m/s
        RDRG2 == 1.5d-03                    ! nondimensional
     
         Zob == 0.02d0                     ! m
         Zos == 0.02d0                     ! m

! Height (m) of atmospheric measurements for Bulk fluxes parameterization.

      BLK_ZQ ==  2.0d0                     ! air humidity
      BLK_ZT ==  2.0d0                     ! air temperature
      BLK_ZW == 10.0d0                     ! winds

! Minimum depth for wetting and drying.

       DCRIT == 1.0d0                      ! m

! Various parameters.

       WTYPE == 4
     LEVSFRC == 15
     LEVBFRC == 1

! Set vertical, terrain-following coordinates transformation equation and
! stretching function (see below for details), [1:Ngrids].

  Vtransform == 2                          ! transformation equation
 Vstretching == 4                          ! stretching function

! Vertical S-coordinates parameters (see below for details), [1:Ngrids].

     THETA_S == 4.5d0                      ! surface stretching parameter
     THETA_B == 1.5d0                      ! bottom  stretching parameter
      TCLINE == 3.0d0                      ! critical depth (m)

! Mean Density and Brunt-Vaisala frequency.

        RHO0 =  1025.0d0                   ! kg/m3
     BVF_BAK =  1.0d-5                     ! 1/s2

! Time-stamp assigned for model initialization, reference time
! origin for tidal forcing, and model reference time for output
! NetCDF units attribute.

      DSTART =  0.0d0                      ! days
  TIDE_START =  0.0d0                      ! days
    TIME_REF =  20130101.0d0               ! yyyymmdd.dd

! Nudging/relaxation time scales, inverse scales will be computed
! internally, [1:Ngrids].

       TNUDG == 2*30.0d0                    ! days
       ZNUDG == 30.0d0                      ! days
      M2NUDG == 30.0d0                      ! days
      M3NUDG == 30.0d0                      ! days

! Nudging/relaxation time scale for surface salinity nudging, inverse
! scales will be computed internally, [1:Ngrids].

       TNUDG_SSS == 30.0d0                 ! days

! Threshold to trigger SSS correction toward climatolgy,
! needs SCORRECTION and SSSC_THRESHOLD defined

       SSS_MISMATCH_THRESHOLD = 0.2d0

! Factor between passive (outflow) and active (inflow) open boundary
! conditions, [1:Ngrids]. If OBCFAC > 1, nudging on inflow is stronger
! than on outflow (recommended).

      OBCFAC == 10.0d0                      ! nondimensional

! Linear equation of State parameters:

          R0 == 1027.0d0                   ! kg/m3
          T0 == 14.0d0                     ! Celsius
          S0 == 35.0d0                     ! nondimensional
       TCOEF == 1.7d-4                     ! 1/Celsius
       SCOEF == 0.0d0                      ! nondimensional

! Slipperiness parameter: 1.0 (free slip) or -1.0 (no slip)

      GAMMA2 == 1.0d0

! Logical switches (TRUE/FALSE) to activate horizontal momentum transport
! point Sources/Sinks (like river runoff transport) and mass point
! Sources/Sinks (like volume vertical influx), [1:Ngrids].

      LuvSrc == T                          ! horizontal momentum transport
       LwSrc == F                          ! volume vertical influx

! Logical switches (TRUE/FALSE) to activate tracers point Sources/Sinks
! (like river runoff) and to specify which tracer variables to consider:
! [1:NAT+NPT,Ngrids].  See glossary below for details.

  LtracerSrc == T T                        ! temperature, salinity, inert

! Logical switches (TRUE/FALSE) to read and process climatology fields.
! See glossary below for details.

     LsshCLM == F                          ! sea-surface height
      Lm2CLM == F                          ! 2D momentum
      Lm3CLM == F                          ! 3D momentum

  LtracerCLM == F F                        ! temperature, salinity, inert

! Logical switches (TRUE/FALSE) to nudge the desired climatology field(s).
! If not analytical climatology fields, users need to turn ON the logical
! switches above to process the fields from the climatology NetCDF file
! that are needed for nudging. See glossary below for details.

 LnudgeM2CLM == F                          ! 2D momentum
 LnudgeM3CLM == F                          ! 3D momentum

  LnudgeTCLM == F F                        ! temperature, salinity, inert

! Starting (DstrS) and ending (DendS) day for adjoint sensitivity forcing.
! DstrS must be less or equal to DendS. If both values are zero, their
! values are reset internally to the full range of the adjoint integration.

       DstrS == 0.0d0                      ! starting day
       DendS == 0.0d0                      ! ending day

! Starting and ending vertical levels of the 3D adjoint state variables
! whose sensitivity is required.

       KstrS == 1                          ! starting level
       KendS == 1                          ! ending level

! Logical switches (TRUE/FALSE) to specify the adjoint state variables
! whose sensitivity is required.

Lstate(isFsur) == F                        ! free-surface
Lstate(isUbar) == F                        ! 2D U-momentum
Lstate(isVbar) == F                        ! 2D V-momentum
Lstate(isUvel) == F                        ! 3D U-momentum
Lstate(isVvel) == F                        ! 3D V-momentum
Lstate(isWvel) == F                        ! 3D W-momentum

Lstate(isTvar) == F F                      ! NT tracers

! Logical switches (TRUE/FALSE) to specify the state variables for
! which Forcing Singular Vectors or Stochastic Optimals is required.

Fstate(isFsur) == F                        ! free-surface
Fstate(isUbar) == F                        ! 2D U-momentum
Fstate(isVbar) == F                        ! 2D V-momentum
Fstate(isUvel) == F                        ! 3D U-momentum
Fstate(isVvel) == F                        ! 3D V-momentum
Fstate(isTvar) == F F                      ! NT tracers

Fstate(isUstr) == T                        ! surface U-stress
Fstate(isVstr) == T                        ! surface V-stress
Fstate(isTsur) == F F                      ! NT surface tracers flux

! Stochastic Optimals time decorrelation scale (days) assumed for
! red noise processes.

      SO_decay == 2.0d0                    ! days

! Stochastic Optimals surface forcing standard deviation for
! dimensionalization.

SO_sdev(isFsur) == 1.0d0                   ! free-surface
SO_sdev(isUbar) == 1.0d0                   ! 2D U-momentum
SO_sdev(isVbar) == 1.0d0                   ! 2D V-momentum
SO_sdev(isUvel) == 1.0d0                   ! 3D U-momentum
SO_sdev(isVvel) == 1.0d0                   ! 3D V-momentum
SO_sdev(isTvar) == 1.0d0 1.0d0             ! NT tracers

SO_sdev(isUstr) == 1.0d0                   ! surface U-stress
SO_sdev(isVstr) == 1.0d0                   ! surface V-stress
SO_sdev(isTsur) == 1.0d0 1.0d0             ! NT surface tracers flux

! Logical switches (TRUE/FALSE) to activate writing of fields into
! HISTORY output file.

Hout(idUvel) == F       ! u                  3D U-velocity
Hout(idVvel) == F       ! v                  3D V-velocity
Hout(idu3dE) == T       ! u_eastward         3D U-eastward  at RHO-points
Hout(idv3dN) == T       ! v_northward        3D V-northward at RHO-points
Hout(idWvel) == T       ! w                  3D W-velocity
Hout(idOvel) == F       ! omega              omega vertical velocity
Hout(idUbar) == F       ! ubar               2D U-velocity
Hout(idVbar) == F       ! vbar               2D V-velocity
Hout(idu2dE) == F       ! ubar_eastward      2D U-eastward  at RHO-points
Hout(idv2dN) == F       ! vbar_northward     2D V-northward at RHO-points
Hout(idFsur) == T       ! zeta               free-surface
Hout(idBath) == F       ! bath               time-dependent bathymetry

Hout(idTvar) == T T     ! temp, salt         temperature and salinity

Hout(idpthR) == F       ! z_rho              time-varying depths of RHO-points
Hout(idpthU) == F       ! z_u                time-varying depths of U-points
Hout(idpthV) == F       ! z_v                time-varying depths of V-points
Hout(idpthW) == F       ! z_w                time-varying depths of W-points

Hout(idUsms) == F       ! sustr              surface U-stress
Hout(idVsms) == F       ! svstr              surface V-stress
Hout(idUbms) == T       ! bustr              bottom U-stress
Hout(idVbms) == T       ! bvstr              bottom V-stress

Hout(idUbrs) == F       ! bustrc             bottom U-current stress
Hout(idVbrs) == F       ! bvstrc             bottom V-current stress
Hout(idUbws) == F       ! bustrw             bottom U-wave stress
Hout(idVbws) == F       ! bvstrw             bottom V-wave stress
Hout(idUbcs) == F       ! bustrcwmax         bottom max wave-current U-stress
Hout(idVbcs) == F       ! bvstrcwmax         bottom max wave-current V-stress

Hout(idUbot) == F       ! Ubot               bed wave orbital U-velocity
Hout(idVbot) == F       ! Vbot               bed wave orbital V-velocity
Hout(idUbur) == F       ! Ur                 bottom U-velocity above bed
Hout(idVbvr) == F       ! Vr                 bottom V-velocity above bed

Hout(idW2xx) == F       ! Sxx_bar            2D radiation stress, Sxx component
Hout(idW2xy) == F       ! Sxy_bar            2D radiation stress, Sxy component
Hout(idW2yy) == F       ! Syy_bar            2D radiation stress, Syy component
Hout(idU2rs) == F       ! Ubar_Rstress       2D radiation U-stress
Hout(idV2rs) == F       ! Vbar_Rstress       2D radiation V-stress
Hout(idU2Sd) == F       ! ubar_stokes        2D U-Stokes velocity
Hout(idV2Sd) == F       ! vbar_stokes        2D V-Stokes velocity

Hout(idW3xx) == F       ! Sxx                3D radiation stress, Sxx component
Hout(idW3xy) == F       ! Sxy                3D radiation stress, Sxy component
Hout(idW3yy) == F       ! Syy                3D radiation stress, Syy component
Hout(idW3zx) == F       ! Szx                3D radiation stress, Szx component
Hout(idW3zy) == F       ! Szy                3D radiation stress, Szy component
Hout(idU3rs) == F       ! u_Rstress          3D U-radiation stress
Hout(idV3rs) == F       ! v_Rstress          3D V-radiation stress
Hout(idU3Sd) == F       ! u_stokes           3D U-Stokes velocity
Hout(idV3Sd) == F       ! v_stokes           3D V-Stokes velocity

Hout(idWamp) == F       ! Hwave              wave height
Hout(idWlen) == F       ! Lwave              wave length
Hout(idWdir) == F       ! Dwave              wave direction
Hout(idWptp) == F       ! Pwave_top          wave surface period
Hout(idWpbt) == F       ! Pwave_bot          wave bottom period
Hout(idWorb) == F       ! Ub_swan            wave bottom orbital velocity
Hout(idWdis) == F       ! Wave_dissip        wave dissipation

Hout(idPair) == F       ! Pair               surface air pressure
Hout(idUair) == F       ! Uair               surface U-wind component
Hout(idVair) == F       ! Vair               surface V-wind component

Hout(idTsur) == F F     ! shflux, ssflux     surface net heat and salt flux
Hout(idLhea) == F       ! latent             latent heat flux
Hout(idShea) == F       ! sensible           sensible heat flux
Hout(idLrad) == F       ! lwrad              longwave radiation flux
Hout(idSrad) == F       ! swrad              shortwave radiation flux
Hout(idEmPf) == F       ! EminusP            E-P flux
Hout(idevap) == F       ! evaporation        evaporation rate
Hout(idrain) == F       ! rain               precipitation rate

Hout(idDano) == T       ! rho                density anomaly
Hout(idVvis) == F       ! AKv                vertical viscosity
Hout(idTdif) == F       ! AKt                vertical T-diffusion
Hout(idSdif) == F       ! AKs                vertical Salinity diffusion
Hout(idHsbl) == F       ! Hsbl               depth of surface boundary layer
Hout(idHbbl) == F       ! Hbbl               depth of bottom boundary layer
Hout(idMtke) == F       ! tke                turbulent kinetic energy
Hout(idMtls) == F       ! gls                turbulent length scale

! Logical switches (TRUE/FALSE) to activate writing of extra inert passive
! tracers other than biological and sediment tracers into the HISTORY
! output file. An inert passive tracer is one that it is only advected and
! diffused. Other processes are ignored. These tracers include, for example,
! dyes, pollutants, oil spills, etc. NPT values are expected. However, these
! switches can be activated using compact parameter specification.

 Hout(inert) == F F     ! dye_01, ...        inert passive tracers

! Logical switches (TRUE/FALSE) to activate writing of fields into
! QUICKSAVE output file.

Qout(idUvel) == F       ! u                  3D U-velocity
Qout(idVvel) == F       ! v                  3D V-velocity
Qout(idu3dE) == F       ! u_eastward         3D U-eastward  at RHO-points
Qout(idv3dN) == F       ! v_northward        3D V-northward at RHO-points
Qout(idWvel) == F       ! w                  3D W-velocity
Qout(idOvel) == F       ! omega              omega vertical velocity
Qout(idUbar) == F       ! ubar               2D U-velocity
Qout(idVbar) == F       ! vbar               2D V-velocity
Qout(idu2dE) == F       ! ubar_eastward      2D U-eastward  at RHO-points
Qout(idv2dN) == F       ! vbar_northward     2D V-northward at RHO-points
Qout(idFsur) == F       ! zeta               free-surface
Qout(idBath) == F       ! bath               time-dependent bathymetry

Qout(idTvar) == F F     ! temp, salt         temperature and salinity

Qout(idUsur) == F       ! u_sur              surface U-velocity
Qout(idVsur) == F       ! v_sur              surface V-velocity
Qout(idUsuE) == F       ! u_sur_eastward     surface U-eastward  velocity
Qout(idVsuN) == F       ! v_sur_northward    surface V-northward velocity

Qout(idsurT) == F F     ! temp_sur, salt_sur surface temperature and salinity

Qout(idpthR) == F       ! z_rho              time-varying depths of RHO-points
Qout(idpthU) == F       ! z_u                time-varying depths of U-points
Qout(idpthV) == F       ! z_v                time-varying depths of V-points
Qout(idpthW) == F       ! z_w                time-varying depths of W-points

Qout(idUsms) == F       ! sustr              surface U-stress
Qout(idVsms) == F       ! svstr              surface V-stress
Qout(idUbms) == F       ! bustr              bottom U-stress
Qout(idVbms) == F       ! bvstr              bottom V-stress

Qout(idUbrs) == F       ! bustrc             bottom U-current stress
Qout(idVbrs) == F       ! bvstrc             bottom V-current stress
Qout(idUbws) == F       ! bustrw             bottom U-wave stress
Qout(idVbws) == F       ! bvstrw             bottom V-wave stress
Qout(idUbcs) == F       ! bustrcwmax         bottom max wave-current U-stress
Qout(idVbcs) == F       ! bvstrcwmax         bottom max wave-current V-stress

Qout(idUbot) == F       ! Ubot               bed wave orbital U-velocity
Qout(idVbot) == F       ! Vbot               bed wave orbital V-velocity
Qout(idUbur) == F       ! Ur                 bottom U-velocity above bed
Qout(idVbvr) == F       ! Vr                 bottom V-velocity above bed

Qout(idW2xx) == F       ! Sxx_bar            2D radiation stress, Sxx component
Qout(idW2xy) == F       ! Sxy_bar            2D radiation stress, Sxy component
Qout(idW2yy) == F       ! Syy_bar            2D radiation stress, Syy component
Qout(idU2rs) == F       ! Ubar_Rstress       2D radiation U-stress
Qout(idV2rs) == F       ! Vbar_Rstress       2D radiation V-stress
Qout(idU2Sd) == F       ! ubar_stokes        2D U-Stokes velocity
Qout(idV2Sd) == F       ! vbar_stokes        2D V-Stokes velocity

Qout(idW3xx) == F       ! Sxx                3D radiation stress, Sxx component
Qout(idW3xy) == F       ! Sxy                3D radiation stress, Sxy component
Qout(idW3yy) == F       ! Syy                3D radiation stress, Syy component
Qout(idW3zx) == F       ! Szx                3D radiation stress, Szx component
Qout(idW3zy) == F       ! Szy                3D radiation stress, Szy component
Qout(idU3rs) == F       ! u_Rstress          3D U-radiation stress
Qout(idV3rs) == F       ! v_Rstress          3D V-radiation stress
Qout(idU3Sd) == F       ! u_stokes           3D U-Stokes velocity
Qout(idV3Sd) == F       ! v_stokes           3D V-Stokes velocity

Qout(idWamp) == F       ! Hwave              wave height
Qout(idWlen) == F       ! Lwave              wave length
Qout(idWdir) == F       ! Dwave              wave direction
Qout(idWptp) == F       ! Pwave_top          wave surface period
Qout(idWpbt) == F       ! Pwave_bot          wave bottom period
Qout(idWorb) == F       ! Ub_swan            wave bottom orbital velocity
Qout(idWdis) == F       ! Wave_dissip        wave dissipation

Qout(idPair) == F       ! Pair               surface air pressure
Qout(idUair) == F       ! Uair               surface U-wind component
Qout(idVair) == F       ! Vair               surface V-wind component

Qout(idTsur) == F F     ! shflux, ssflux     surface net heat and salt flux
Qout(idLhea) == F       ! latent             latent heat flux
Qout(idShea) == F       ! sensible           sensible heat flux
Qout(idLrad) == F       ! lwrad              longwave radiation flux
Qout(idSrad) == F       ! swrad              shortwave radiation flux
Qout(idEmPf) == F       ! EminusP            E-P flux
Qout(idevap) == F       ! evaporation        evaporation rate
Qout(idrain) == F       ! rain               precipitation rate

Qout(idDano) == F       ! rho                density anomaly
Qout(idVvis) == F       ! AKv                vertical viscosity
Qout(idTdif) == F       ! AKt                vertical T-diffusion
Qout(idSdif) == F       ! AKs                vertical Salinity diffusion
Qout(idHsbl) == F       ! Hsbl               depth of surface boundary layer
Qout(idHbbl) == F       ! Hbbl               depth of bottom boundary layer
Qout(idMtke) == F       ! tke                turbulent kinetic energy
Qout(idMtls) == F       ! gls                turbulent length scale

! Logical switches (TRUE/FALSE) to activate writing of extra inert passive
! tracers other than biological and sediment tracers into the QUICKSAVE
! output file. An inert passive tracer is one that it is only advected and
! diffused. Other processes are ignored. These tracers include, for example,
! dyes, pollutants, oil spills, etc. NPT values are expected. However, these
! switches can be activated using compact parameter specification.

 Qout(inert) == F       ! dye_01, ...        inert passive tracers
 Qout(Snert) == F F     ! dye_01, ...        surface inert passive tracers

! Logical switches (TRUE/FALSE) to activate writing of time-averaged
! fields into AVERAGE output file.

Aout(idUvel) == F       ! u                  3D U-velocity
Aout(idVvel) == F       ! v                  3D V-velocity
Aout(idu3dE) == T       ! u_eastward         3D U-eastward  at RHO-points
Aout(idv3dN) == T       ! v_northward        3D V-northward at RHO-points
Aout(idWvel) == T       ! w                  3D W-velocity
Aout(idOvel) == F       ! omega              omega vertical velocity
Aout(idUbar) == F       ! ubar               2D U-velocity
Aout(idVbar) == F       ! vbar               2D V-velocity
Aout(idu2dE) == F       ! ubar_eastward      2D U-eastward  at RHO-points
Aout(idv2dN) == F       ! vbar_northward     2D V-northward at RHO-points
Aout(idFsur) == T       ! zeta               free-surface

Aout(idTvar) == T T     ! temp, salt         temperature and salinity

Aout(idUsms) == F       ! sustr              surface U-stress
Aout(idVsms) == F       ! svstr              surface V-stress
Aout(idUbms) == T       ! bustr              bottom U-stress
Aout(idVbms) == T       ! bvstr              bottom V-stress

Aout(idW2xx) == F       ! Sxx_bar            2D radiation stress, Sxx component
Aout(idW2xy) == F       ! Sxy_bar            2D radiation stress, Sxy component
Aout(idW2yy) == F       ! Syy_bar            2D radiation stress, Syy component
Aout(idU2rs) == F       ! Ubar_Rstress       2D radiation U-stress
Aout(idV2rs) == F       ! Vbar_Rstress       2D radiation V-stress
Aout(idU2Sd) == F       ! ubar_stokes        2D U-Stokes velocity
Aout(idV2Sd) == F       ! vbar_stokes        2D V-Stokes velocity

Aout(idW3xx) == F       ! Sxx                3D radiation stress, Sxx component
Aout(idW3xy) == F       ! Sxy                3D radiation stress, Sxy component
Aout(idW3yy) == F       ! Syy                3D radiation stress, Syy component
Aout(idW3zx) == F       ! Szx                3D radiation stress, Szx component
Aout(idW3zy) == F       ! Szy                3D radiation stress, Szy component
Aout(idU3rs) == F       ! u_Rstress          3D U-radiation stress
Aout(idV3rs) == F       ! v_Rstress          3D V-radiation stress
Aout(idU3Sd) == F       ! u_stokes           3D U-Stokes velocity
Aout(idV3Sd) == F       ! v_stokes           3D V-Stokes velocity

Aout(idPair) == F       ! Pair               surface air pressure
Aout(idUair) == F       ! Uair               surface U-wind component
Aout(idVair) == F       ! Vair               surface V-wind component

Aout(idTsur) == F F     ! shflux, ssflux     surface net heat and salt flux
Aout(idLhea) == F       ! latent             latent heat flux
Aout(idShea) == F       ! sensible           sensible heat flux
Aout(idLrad) == F       ! lwrad              longwave radiation flux
Aout(idSrad) == F       ! swrad              shortwave radiation flux
Aout(idevap) == F       ! evaporation        evaporation rate
Aout(idrain) == F       ! rain               precipitation rate

Aout(idDano) == T       ! rho                density anomaly
Aout(idVvis) == F       ! AKv                vertical viscosity
Aout(idTdif) == F       ! AKt                vertical T-diffusion
Aout(idSdif) == F       ! AKs                vertical Salinity diffusion
Aout(idHsbl) == F       ! Hsbl               depth of surface boundary layer
Aout(idHbbl) == F       ! Hbbl               depth of bottom boundary layer

Aout(id2dRV) == F       ! pvorticity_bar     2D relative vorticity
Aout(id3dRV) == F       ! pvorticity         3D relative vorticity
Aout(id2dPV) == F       ! rvorticity_bar     2D potential vorticity
Aout(id3dPV) == F       ! rvorticity         3D potential vorticity

Aout(idu3dD) == F       ! u_detided          detided 3D U-velocity
Aout(idv3dD) == F       ! v_detided          detided 3D V-velocity
Aout(idu2dD) == F       ! ubar_detided       detided 2D U-velocity
Aout(idv2dD) == F       ! vbar_detided       detided 2D V-velocity
Aout(idFsuD) == F       ! zeta_detided       detided free-surface

Aout(idTrcD) == F F     ! temp_detided, ...  detided temperature and salinity

Aout(idHUav) == F       ! Huon               u-volume flux, Huon
Aout(idHVav) == F       ! Hvom               v-volume flux, Hvom
Aout(idUUav) == F       ! uu                 quadratic <u*u> term
Aout(idUVav) == F       ! uv                 quadratic <u*v> term
Aout(idVVav) == F       ! vv                 quadratic <v*v> term
Aout(idU2av) == F       ! ubar2              quadratic <ubar*ubar> term
Aout(idV2av) == F       ! vbar2              quadratic <vbar*vbar> term
Aout(idZZav) == F       ! zeta2              quadratic <zeta*zeta> term

Aout(idTTav) == F F     ! temp_2, ...        quadratic <t*t> tracer terms
Aout(idUTav) == F F     ! u_temp, ...        quadratic <u*t> tracer terms
Aout(idVTav) == F F     ! v_temp, ...        quadratic <v*t> tracer terms
Aout(iHUTav) == F F     ! Huon_temp, ...     tracer volume flux, <Huon*t>
Aout(iHVTav) == F F     ! Hvom_temp, ...     tracer volume flux, <Hvom*t>

! Logical switches (TRUE/FALSE) to activate writing of extra inert passive
! tracers other than biological and sediment tracers into the AVERAGE file.

 Aout(inert) == F F     ! dye_01, ...        inert passive tracers

! Logical switches (TRUE/FALSE) to activate writing of time-averaged,
! 2D momentum (ubar,vbar) diagnostic terms into DIAGNOSTIC output file.

Dout(M2rate) == F       ! ubar_accel, ...    acceleration
Dout(M2pgrd) == F       ! ubar_prsgrd, ...   pressure gradient
Dout(M2fcor) == F       ! ubar_cor, ...      Coriolis force
Dout(M2hadv) == F       ! ubar_hadv, ...     horizontal total advection
Dout(M2xadv) == F       ! ubar_xadv, ...     horizontal XI-advection
Dout(M2yadv) == F       ! ubar_yadv, ...     horizontal ETA-advection
Dout(M2hrad) == F       ! ubar_hrad, ...     horizontal total radiation stress
Dout(M2hvis) == F       ! ubar_hvisc, ...    horizontal total viscosity
Dout(M2xvis) == F       ! ubar_xvisc, ...    horizontal XI-viscosity
Dout(M2yvis) == F       ! ubar_yvisc, ...    horizontal ETA-viscosity
Dout(M2sstr) == F       ! ubar_sstr, ...     surface stress
Dout(M2bstr) == F       ! ubar_bstr, ...     bottom stress

! Logical switches (TRUE/FALSE) to activate writing of time-averaged,
! 3D momentum (u,v) diagnostic terms into DIAGNOSTIC output file.

Dout(M3rate) == F       ! u_accel, ...       acceleration
Dout(M3pgrd) == F       ! u_prsgrd, ...      pressure gradient
Dout(M3fcor) == F       ! u_cor, ...         Coriolis force
Dout(M3hadv) == F       ! u_hadv, ...        horizontal total advection
Dout(M3xadv) == F       ! u_xadv, ...        horizontal XI-advection
Dout(M3yadv) == F       ! u_yadv, ...        horizontal ETA-advection
Dout(M3vadv) == F       ! u_vadv, ...        vertical advection
Dout(M3hrad) == F       ! u_hrad, ...        horizontal total radiation stress
Dout(M3vrad) == F       ! u_vrad, ...        vertical radiation stress
Dout(M3hvis) == F       ! u_hvisc, ...       horizontal total viscosity
Dout(M3xvis) == F       ! u_xvisc, ...       horizontal XI-viscosity
Dout(M3yvis) == F       ! u_yvisc, ...       horizontal ETA-viscosity
Dout(M3vvis) == F       ! u_vvisc, ...       vertical viscosity

! Logical switches (TRUE/FALSE) to activate writing of time-averaged,
! active (temperature and salinity) and passive (inert) tracer diagnostic
! terms into DIAGNOSTIC output file: [1:NAT+NPT,Ngrids].

Dout(iTrate) == F F     ! temp_rate, ...     time rate of change
Dout(iThadv) == F F     ! temp_hadv, ...     horizontal total advection
Dout(iTxadv) == F F     ! temp_xadv, ...     horizontal XI-advection
Dout(iTyadv) == F F     ! temp_yadv, ...     horizontal ETA-advection
Dout(iTvadv) == F F     ! temp_vadv, ...     vertical advection
Dout(iThdif) == F F     ! temp_hdiff, ...    horizontal total diffusion
Dout(iTxdif) == F F     ! temp_xdiff, ...    horizontal XI-diffusion
Dout(iTydif) == F F     ! temp_ydiff, ...    horizontal ETA-diffusion
Dout(iTsdif) == F F     ! temp_sdiff, ...    horizontal S-diffusion
Dout(iTvdif) == F F     ! temp_vdiff, ...    vertical diffusion

! Generic User parameters, [1:NUSER].

       NUSER =  0
        USER =  0.d0

! NetCDF-4/HDF5 compression parameters for output files.

  NC_SHUFFLE =  1                 ! if non-zero, turn on shuffle filter
  NC_DEFLATE =  1                 ! if non-zero, turn on deflate filter
   NC_DLEVEL =  1                 ! deflate level [0-9]

! Input NetCDF file names, [1:Ngrids].

     GRDNAME == /data/home/xiayujie/BYECS_WYN/Data/grd/roms_grd_test14.nc
     ININAME == /data/home/xiayujie/BYECS_WYN/Data/ini/ini_2013_rs.nc
 !    ININAME == /data/home/xiayujie/BYECS_WYN/ECScase10/rst.nc
!     ININAME == ocean_ini.nc
     ITLNAME == ocean_itl.nc
     IRPNAME == ocean_irp.nc
     IADNAME == ocean_iad.nc
     FWDNAME == ocean_fwd.nc
     ADSNAME == ocean_ads.nc

! Nesting grids connectivity data: contact points information. This
! NetCDF file is special and complex. It is currently generated using
! the script "matlab/grid/contact.m" from the Matlab repository.

     NGCNAME =  ocean_ngc.nc

! Input lateral boundary conditions and climatology file names.  The
! USER has the option to split input data time records into several
! NetCDF files (see prologue instructions above). If so, use a single
! line per entry with a vertical bar (|) symbol after each entry,
! except the last one.

     NCLMFILES == 1                         ! number of climate files
     CLMNAME == ocean_clm.nc

     NBCFILES == 1                          ! number of boundary files
     BRYNAME == /data/home/xiayujie/BYECS_WYN/Data/bry/roms_bry_soda_2012_2017_rs.nc

! Input climatology nudging coefficients file name.

     NUDNAME == ocean_nud.nc

! Input Sources/Sinks forcing (like river runoff) file name.

     SSFNAME == /data/home/xiayujie/BYECS_WYN/Data/river/river_2009_2018_10rivers_case19_vshape.nc
!     SSFNAME == ocean_river.nc

! Input tidal forcing file name.

    TIDENAME == /data/home/xiayujie/BYECS_WYN/Data/tide/roms_tide_test_2013_2016.nc

! Input forcing NetCDF file name(s).
!
! The USER has the option to enter several sets of file names for each
! nested grid. For example, the USER may have different data for the
! wind products, heat fluxes, etc. Alternatively, if the all the forcing
! files are the same for nesting and the data is in its native resolution,
! we could enter only one set of files names and ROMS will replicate those
! files internally to the remaining grids using the plural KEYWORD protocol.
!
! The model will scan the files and will read the needed data from the first
! file in the list containing the forcing field. Therefore, the order of the
! filenames is critical. If using multiple forcing files per grid, first
! enter all the file names for grid one followed by two, and so on.  It is
! also possible to split input data time records into several NetCDF files
! (see Prolog instructions above). Use a single line per entry with a
! continuation (\) or a vertical bar (|) symbol after each entry, except
! the last one.

     NFFILES == 1                          ! number of unique forcing files

     FRCNAME == ocean_frc.nc
     FRCNAME == /data/home/xiayujie/BYECS_WYN/Data/frc/frc_2012_2017_rs.nc

! Output NetCDF file names, [1:Ngrids].

     DAINAME == ocean_dai.nc
     GSTNAME == ocean_gst.nc
     RSTNAME == Result/rst.nc
     HISNAME == Result/his.nc
     QCKNAME == Result/qck.nc
     TLMNAME == ocean_tlm.nc
     TLFNAME == ocean_tlf.nc
     ADJNAME == ocean_adj.nc
     AVGNAME == Result/avg.nc
     HARNAME == Result/har.nc
     DIANAME == Result/dia.nc
     STANAME == Result/sta.nc
     FLTNAME == Result/flt.nc

! Input ASCII parameter filenames.

     APARNAM =  ROMS/External/s4dvar.in
     SPOSNAM =  ROMS/External/stations.in
     FPOSNAM =  floats.in
     BPARNAM =  bioUMaine.in
     SPARNAM =  ROMS/External/sediment.in
     USRNAME =  ROMS/External/MyFile.dat
current result:
Turn off WET_DRY:Image
Turn on WET_DRY: Image

User avatar
arango
Site Admin
Posts: 1413
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: The wet_dry switch disrupts the Kuroshio Current

#2 Unread post by arango »

Why are you using WET_DRY in an application of this geographical scale and scope? Wetting/drying is intended for coastal applications (such as estuaries) with shallow topography, where the main emphasis is on inundation.

xiaoju
Posts: 3
Joined: Thu Dec 21, 2023 1:11 am
Location: Ocean University of China

Re: The wet_dry switch disrupts the Kuroshio Current

#3 Unread post by xiaoju »

Thank you for your reply. My research area includes the coastal waters of China and the Kuroshio region. Actually, enabling WET_DRY would improve the simulation effect for the shallow areas within 50 meters of the shore. However, I found that after enabling it, the Kuroshio region became incorrect, and there was no phenomenon of dry grids turning into wet grids in the Kuroshio region's water depth. So, I'm not sure about the cause of this result.

User avatar
arango
Site Admin
Posts: 1413
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: The wet_dry switch disrupts the Kuroshio Current

#4 Unread post by arango »

Not really, your grid (279,405,20) is TOO COARSE with a resolution around several kilometers and a DT=360 seconds to resolve the physics and dynamics of wetting/drying around 50 meters from the coast! If you want to study the effect of inundation, you need substantially smaller horizontal and vertical resolutions. It seems to me that there is a big misunderstanding about why do we need wetting and drying in an application. It involves a different set of physics. You are not going to resolve the dynamics of waves and currents.

xiaoju
Posts: 3
Joined: Thu Dec 21, 2023 1:11 am
Location: Ocean University of China

Re: The wet_dry switch disrupts the Kuroshio Current

#5 Unread post by xiaoju »

Sorry, perhaps my previous description was not very clear. What I meant is that enabling the wet_dry scheme may be useful in some coastal regions of China where the water depth is less than 50 m. In fact, there is a very large shoal in the nearshore area of China, where parts of the seabed may become exposed. Therefore, I attempted to enable the wet_dry option. However, after doing so, I found that the Kuroshio current in my simulation became incorrect.

I have read the paper “A wetting and drying scheme for ROMS” and I roughly understand how the wet_dry scheme works. As I understand it, the scheme reallocates several wet/dry-related arrays (such as rmask_wet, umask_wet, and vmask_wet) and applies a “flux allowed in but not out” algorithm to dry cells.

My question is whether this algorithm also affects the land_mask. For example, around small islands in the Kuroshio region: when the wet_dry scheme is not enabled, these island boundaries are treated as rigid boundaries. After enabling the wet_dry scheme, are they instead treated with the “flux allowed in but not out” algorithm,Although the water depth here is very deep, it will not turn the wet grid into a dry grid?

Or, more generally, after enabling the wet_dry option, are the governing equations (such as the momentum equations) effectively solved with a different formulation over the entire domain, which could explain why the simulation results in the Kuroshio region become different from the original run?

At this point, I have already concluded that the wet_dry option cannot be used in my simulation. My question here is mainly to understand the reason for this result. Thank you very much for your reply, and I would greatly appreciate any clarification on this issue.

User avatar
shchepet
Posts: 191
Joined: Fri Nov 14, 2003 4:57 pm

Re: The wet_dry switch disrupts the Kuroshio Current

#6 Unread post by shchepet »

Actually, while running wetting-and-drying in this configuration does not make any sense from the point of view of physics, mathematically this indicates that there is something very wrong with the code and/or WaD algorithm, and it needs to be investigated further. If the algorithm works correctly, it should do identically nothing in this setup: nothing should ever go dry. Yet, it obviously, fails to do so.

jcwarner
Posts: 1229
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: The wet_dry switch disrupts the Kuroshio Current

#7 Unread post by jcwarner »

yes i agree. the wet_dry should do nothing in this setup.
I am not sure what is going on. The version of code they are using is from 2019, but i dont remember a lot of changes to wet/dry since then.
Perhaps the user could look at the wet_dry masking and see if that reveals what is happening.
We have run wet_dry for many applications, coupled to wave models, for barrier island breaching during hurricanes, and it works as expected.

-j

User avatar
arango
Site Admin
Posts: 1413
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: The wet_dry switch disrupts the Kuroshio Current

#8 Unread post by arango »

Yes, John Warner, Sasha Shchepetkin, and I agree that activating wetting and drying in this application is not advisable. The Kuroshio Current system is highly complex to configure for a regional application. I suspect that the application grid you are using is not suitable for this region. A practical guideline for regional applications with open boundary conditions is to position the grid away from highly dynamic regimes or prominent topographic features to ensure accurate representation and numerical stability. Open boundaries are inherently ill-conditioned and require specialized configuration and boundary-condition data from a large-scale model to avoid spurious solutions.

I suspect that activating wetting and drying is impacting the northeastern corner of your domain because it is positioned too close to the coast, which alters the barotropic transport at each shallow-water equation sub-timestep (step2d algorithm). While it may appear that the issue stems from the WET_DRY option, the underlying problem is that the grid configuration is unsuitable for this region because of the lateral open boundary conditions. Attempting various adjustments to compensate for this grid choice is unlikely to yield satisfactory results. This situation highlights the importance of ocean modeling expertise. I recommend extending the grid eastward, increasing both horizontal and vertical resolutions, appropriately conditioning the bathymetry, and, if necessary, enhancing coastal resolution. Additionally, consider activating the nesting option with refined telescoping grids to get appropriate solutions in the target region.

:idea: My recommendation is to abandon this grid and try a new one following the guidelines that I mentioned above. After all, it is not about the ocean model but the modeler scientist :!:

Post Reply