Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • nemo/nemo
  • sparonuz/nemo
  • hatfield/nemo
  • extdevs/nemo
4 results
Show changes
Showing
with 131 additions and 364 deletions
......@@ -12,7 +12,7 @@
<variable id="info_level" type="int">10</variable>
<variable id="using_server" type="bool">false</variable>
<variable id="using_oasis" type="bool">false</variable>
<variable id="oasis_codes_id" type="string" >oceanx</variable>
<variable id="oasis_codes_id" type="string">oceanx</variable>
</variable_definition>
</context>
......
!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
!! NEMO/OCE Configuration namelist : overwrite default values defined in SHARED/namelist_ref
!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
!! STATION_ASF configuration, PAPA forcing
!! C1D - SAS - OCE configuration !!
!!======================================================================
!! *** Domain & Run management namelists *** !!
!! !!
......@@ -10,22 +10,19 @@
!! namcfg parameters of the configuration (default: user defined GYRE)
!! namwad Wetting and drying (default: OFF)
!! namtsd data: temperature & salinity (default: OFF)
!! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T)
!! namc1d 1D configuration options (ln_c1d =T)
!! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T)
!! namc1d_uvd 1D data (currents) (ln_c1d =T)
!!======================================================================
!
!-----------------------------------------------------------------------
&namusr_def ! STATION_ASF user defined namelist
&namusr_def ! C1D user defined namelist
!-----------------------------------------------------------------------
rn_dept1 = 1.0 ! depth (m) at which the prescribed SST is taken == depth of first T point! (IMPORTANT for warm-layer impact, the deeper, the more pronounced!)
! ! [PAPA station = 1 m]
rn_bathy = 1. ! depth in meters
! rn_dept1 = 1.0 ! depth (m) at which the prescribed SST is taken == depth of first T point! (IMPORTANT for warm-layer impact, the deeper, the more pronounced!)
/
!-----------------------------------------------------------------------
&namrun ! parameters of the run
!-----------------------------------------------------------------------
cn_exp = 'STATION_ASF-ECMWF_PAPA' ! experience name
cn_exp = 'C1D_SASOCE' ! experience name
nn_it000 = 1 ! first time step
nn_itend = 8760 ! last time step => 3 years (including 1 leap!) at dt=3600s
nn_date0 = 20180101 ! date at nit_0000 (format yyyymmdd) used if ln_rstart=F or (ln_rstart=T and nn_rstctl=0 or 1)
......@@ -33,37 +30,30 @@
!
nn_stock = 8760 ! 1 year at dt=3600s / frequency of creation of a restart file (modulo referenced to 1)
nn_write = 8760 ! 1 year at dt=3600s / frequency of write in the output file (modulo referenced to nn_it000)
ln_top = .false. ! Consider (T) or bypass (F) the TOP routines when the key_top is activated
/
!-----------------------------------------------------------------------
&namdom ! time and space domain / STATION_ASF
&namdom ! time and space domain
!-----------------------------------------------------------------------
ln_linssh = .true. ! =T linear free surface ==>> model level are fixed in time
rn_Dt = 3600. ! time step for the dynamics and tracer => frequency of atmospheric forcing
ln_meshmask = .false.
!
ln_c1d = .true. ! Single column domain (1x1pt) (T => fill namc1d)
/
!-----------------------------------------------------------------------
&namcfg ! parameters of the configuration (default: use namusr_def in namelist_cfg)
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namc1d ! 1D configuration options / STATION_ASF (ln_c1d =T default: PAPA station)
&namc1d ! 1D configuration options (ln_c1d =T default: PAPA station)
!-----------------------------------------------------------------------
rn_lat1d = 50.1 ! Column latitude [PAPA station]
rn_lon1d = 215.1 ! Column longitude [PAPA station]
/
!-----------------------------------------------------------------------
&namc1d_dyndmp ! U & V newtonian damping (ln_c1d =T default: OFF)
!-----------------------------------------------------------------------
ln_dyndmp = .false. ! add a damping term (T) or not (F)
/
!-----------------------------------------------------------------------
&namc1d_uvd ! data: U & V currents (ln_c1d =T default: OFF)
!-----------------------------------------------------------------------
! ! =T read U-V fields for:
ln_uvd_init = .false. ! ocean initialisation
ln_uvd_dyndmp = .false. ! U-V restoring
cn_dir = './' ! root directory for the U-V data location
cn_dir = './SAS/' ! root directory for the U-V data location
!___________!_________________________!___________________!___________!_____________!________!___________!__________________!__________!_______________!
! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights filename ! rotation ! land/sea mask !
! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! ! pairing ! filename !
......@@ -74,8 +64,6 @@
!!======================================================================
!! *** Surface Boundary Condition namelists *** !!
!! !!
!! STATION_ASF test-case !!
!! !!
!! namsbc surface boundary condition manager (default: NO selection)
!! namsbc_flx flux formulation (ln_flx =T)
!! namsbc_blk Bulk formulae formulation (ln_blk =T)
......@@ -88,22 +76,17 @@
!! namsbc_apr Atmospheric Pressure (ln_apr_dyn =T)
!! namsbc_wave external fields from wave model (ln_wave =T)
!! namberg iceberg floats (ln_icebergs=T)
!! namsbc_fwb freshwater-budget adjustment (nn_fwb > 0)
!!======================================================================
!
!-----------------------------------------------------------------------
&namsbc ! Surface Boundary Condition manager (default: NO selection)
!-----------------------------------------------------------------------
nn_fsbc = 1 !!LOLO! frequency of SBC module call
nn_fsbc = 1 ! frequency of SBC module call
ln_blk = .true. ! Bulk formulation (T => fill namsbc_blk )
!
nn_ice = 0 !LOLO ! =0 no ice boundary condition
! ! =1 use observed ice-cover ( => fill namsbc_iif )
! ! =2 or 3 for SI3 and CICE, respectively
!
ln_dm2dc = .false. !#lolo daily mean to diurnal cycle on short wave
/
!-----------------------------------------------------------------------
&namsbc_blk ! namsbc_blk generic Bulk formula / STATION_ASF (ln_blk =T)
&namsbc_blk ! namsbc_blk generic Bulk formula (ln_blk =T)
!-----------------------------------------------------------------------
! ! bulk algorithm :
ln_NCAR = .false. ! "NCAR" algorithm (Large and Yeager 2008)
......@@ -118,11 +101,9 @@
ln_skin_wl = .true. ! use the warm-layer parameterization
!
ln_humi_sph = .false. ! humidity "sn_humi" is specific humidity [kg/kg]
ln_humi_dpt = .false. ! humidity "sn_humi" is dew-point temperature [K]
ln_humi_rlh = .true. ! humidity "sn_humi" is relative humidity [%]
ln_tair_pot = .false. ! air temperature read in "sn_tair" is already POTENTIAL TEMPERATURE, NOT ABSOLUTE (ECMWF => ln_tair_pot=.false.)
!
cn_dir = './' ! root directory for the bulk data location
cn_dir = './SAS/' ! root directory for the bulk data location
!___________!_________________________!___________________!___________!_____________!________!___________!______________________________________!__________!_______________!
! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights filename ! rotation ! land/sea mask !
! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! ! pairing ! filename !
......@@ -145,11 +126,11 @@
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namsbc_sas ! Stand-Alone Surface boundary condition / STATION_ASF
&namsbc_sas ! Stand-Alone Surface module: ocean data (SAS_SRC only)
!-----------------------------------------------------------------------
l_sasread = .true. ! =T Read in file ; =F set all to 0. (see sbcssm)
!
cn_dir = './' ! root directory for the ocean data location
cn_dir = './SAS/' ! root directory for the ocean data location
!___________!_________________________!___________________!___________!_____________!________!___________!__________________!__________!_______________!
! ! file name ! frequency (hours) ! variable ! time interp.! clim ! 'yearly'/ ! weights filename ! rotation ! land/sea mask !
! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! ! pairing ! filename !
......@@ -179,8 +160,8 @@
!! *** Top/Bottom boundary condition *** !!
!! !!
!! namdrg top/bottom drag coefficient (default: NO selection)
!! namdrg_top top friction (ln_OFF=F & ln_isfcav=T)
!! namdrg_bot bottom friction (ln_OFF=F)
!! namdrg_top top friction (ln_drg_OFF=F & ln_isfcav=T)
!! namdrg_bot bottom friction (ln_drg_OFF=F)
!! nambbc bottom temperature boundary condition (default: OFF)
!! nambbl bottom boundary layer scheme (default: OFF)
!!======================================================================
......@@ -232,7 +213,6 @@
!! namhsb Heat and salt budgets (default: OFF)
!! namdiu Cool skin and warm layer models (default: OFF)
!! namdiu Cool skin and warm layer models (default: OFF)
!! namflo float parameters (default: OFF)
!! nam_diaharm Harmonic analysis of tidal constituents (default: OFF)
!! nam_diadct transports through some sections (default: OFF)
!! nam_diatmb Top Middle Bottom Output (default: OFF)
......
../../SHARED/namelist_ref
\ No newline at end of file
......@@ -2,7 +2,7 @@ MODULE usrdef_hgr
!!======================================================================
!! *** MODULE usrdef_hgr ***
!!
!! === C1D_PAPA configuration ===
!! === C1D configuration ===
!!
!! User defined : mesh and Coriolis parameter of a user configuration
!!======================================================================
......@@ -27,8 +27,7 @@ MODULE usrdef_hgr
PUBLIC usr_def_hgr ! called in domhgr.F90
!!----------------------------------------------------------------------
!! NEMO/OCE 4.0 , NEMO Consortium (2018)
!! $Id: usrdef_hgr.F90 10072 2018-08-28 15:21:50Z nicolasmartin $
!! NEMO/OCE 5.0, NEMO Consortium (2024)
!! Software governed by the CeCILL license (see ./LICENSE)
!!----------------------------------------------------------------------
CONTAINS
......@@ -46,9 +45,8 @@ CONTAINS
!!
!! ** Method : set all intent(out) argument to a proper value
!!
!! Here C1D_PAPA configuration :
!! Rectangular 3x3 domain
!! - Located at 150E-50N
!! Here C1D configuration :
!! Rectangular 1x1 domain
!! - a constant horizontal resolution
!!
!! ** Action : - define longitude & latitude of t-, u-, v- and f-points (in degrees)
......@@ -101,6 +99,10 @@ CONTAINS
!
! !== Coriolis parameter ==!
kff = 0 ! indicate to compute Coriolis parameter afterward
IF( .FALSE.) THEN ! just to avoid compilation warning...
pff_f(1,1) = -1._wp
pff_t(1,1) = -1._wp
ENDIF
!
END SUBROUTINE usr_def_hgr
......
......@@ -2,7 +2,7 @@ MODULE usrdef_nam
!!======================================================================
!! *** MODULE usrdef_nam ***
!!
!! === C1D_ASICS configuration ===
!! === C1D configuration ===
!!
!! User defined : set the domain characteristics of a user configuration
!!======================================================================
......@@ -13,8 +13,8 @@ MODULE usrdef_nam
!! usr_def_nam : read user defined namelist and set global domain size
!! usr_def_hgr : initialize the horizontal mesh
!!----------------------------------------------------------------------
USE oce , ONLY: l_SAS
USE dom_oce , ONLY: nimpp, njmpp ! ocean space and time domain
USE dom_oce , ONLY: ln_zco, ln_zps, ln_sco ! flag of type of coordinate
USE par_oce ! ocean space and time domain
USE phycst ! physical constants
!
......@@ -31,9 +31,10 @@ MODULE usrdef_nam
INTEGER, PUBLIC :: nn_GYRE ! 1/nn_GYRE = the resolution chosen in degrees and thus defining the horizontal domain size
REAL(wp), PUBLIC:: rn_bathy ! Depth in meters for 1D configuration
!! * Substitutions
# include "read_nml_substitute.h90"
!!----------------------------------------------------------------------
!! NEMO/OCE 4.0 , NEMO Consortium (2018)
!! $Id: usrdef_nam.F90 12377 2020-02-12 14:39:06Z acc $
!! NEMO/OCE 5.0, NEMO Consortium (2024)
!! Software governed by the CeCILL license (see ./LICENSE)
!!----------------------------------------------------------------------
CONTAINS
......@@ -62,8 +63,7 @@ CONTAINS
NAMELIST/namusr_def/ rn_bathy
!!----------------------------------------------------------------------
!
READ ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 )
902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namusr_def in configuration namelist' )
READ_NML_(numnam_cfg,cfg,namusr_def,.TRUE.)
!
IF(lwm) WRITE( numond, namusr_def )
!
......@@ -73,7 +73,11 @@ CONTAINS
! Global Domain size: C1D domain is 1 x 1 grid-points x 75 or vertical levels
kpi = 1
kpj = 1
kpk = 75
IF( .NOT.l_sas ) THEN
kpk = 75
ELSE
kpk = 2
ENDIF
! ! Set the lateral boundary condition of the global domain
ldIperio = .TRUE. ; ldJperio = .TRUE. ! C1D configuration : 1x1 basin with cyclic Est-West and Norht-South condition
ldNFold = .FALSE. ; cdNFtype = '-'
......@@ -81,16 +85,12 @@ CONTAINS
! ! control print
IF(lwp) THEN
WRITE(numout,*) ' '
WRITE(numout,*) 'usr_def_nam : read the user defined namelist (namusr_def) in namelist_cfg'
WRITE(numout,*) 'usr_def_nam : read the user defined namelist (namusr_def) in namelist_cfg'
WRITE(numout,*) '~~~~~~~~~~~ '
WRITE(numout,*) ' Namelist namusr_def : C1 case'
WRITE(numout,*) ' type of vertical coordinate : '
WRITE(numout,*) ' z-coordinate flag ln_zco = ', ln_zco
WRITE(numout,*) ' z-partial-step coordinate flag ln_zps = ', ln_zps
WRITE(numout,*) ' s-coordinate flag ln_sco = ', ln_sco
WRITE(numout,*) ' C1D domain = 1 x 1 x 75 grid-points '
WRITE(numout,*) ' resulting global domain size : jpiglo = ', kpi
WRITE(numout,*) ' jpjglo = ', kpj
WRITE(numout,*) ' Namelist namusr_def : C1D case'
WRITE(numout,*) ' C1D domain = ',kpi,' x ',kpj,' x ',kpk,' grid-points'
WRITE(numout,*) ' resulting global domain size : Ni0glo = ', kpi
WRITE(numout,*) ' Nj0glo = ', kpj
WRITE(numout,*) ' jpkglo = ', kpk
WRITE(numout,*) ' '
ENDIF
......
......@@ -2,11 +2,12 @@ MODULE usrdef_zgr
!!======================================================================
!! *** MODULE usrdef_zgr ***
!!
!! === C1D_PAPA configuration ===
!! === C1D configuration ===
!!
!! User defined : vertical coordinate system of a user configuration
!!======================================================================
!! History : 4.0 ! 2016-06 (R. Bourdalle-Badie) Original code
!! 4.3 ! 2023-01 (S. Techene,G. Madec) New zps : depth and w-level scale factors are horizontally uniform
!!----------------------------------------------------------------------
!!----------------------------------------------------------------------
......@@ -32,32 +33,31 @@ MODULE usrdef_zgr
!! * Substitutions
# include "do_loop_substitute.h90"
!!----------------------------------------------------------------------
!! NEMO/OCE 4.0 , NEMO Consortium (2018)
!! $Id: usrdef_zgr.F90 13295 2020-07-10 18:24:21Z acc $
!! NEMO/OCE 5.0, NEMO Consortium (2024)
!! Software governed by the CeCILL license (see ./LICENSE)
!!----------------------------------------------------------------------
CONTAINS
CONTAINS
SUBROUTINE usr_def_zgr( ld_zco , ld_zps , ld_sco , ld_isfcav, & ! type of vertical coordinate
& k_top , k_bot , & ! top & bottom ocean level
& pdept_1d, pdepw_1d, pe3t_1d , pe3w_1d , & ! 1D reference vertical coordinate
& pe3t , pe3u , pe3v , pe3f , & ! 3D t-level vertical scale factors
& pdept , pdepw , & ! 3D t & w-points depth
& pe3t , pe3u , pe3v , pe3f , & ! vertical scale factors
& pe3w , pe3uw , pe3vw , & ! - - -
& k_top , k_bot ) ! top & bottom ocean level
& pe3w , pe3uw , pe3vw ) ! 3D w-level vertical scale factors
!!---------------------------------------------------------------------
!! *** ROUTINE usr_def_zgr ***
!!
!! ** Purpose : User defined the vertical coordinates
!!
!!----------------------------------------------------------------------
LOGICAL , INTENT(out) :: ld_zco, ld_zps, ld_sco ! vertical coordinate flags
LOGICAL , INTENT(out) :: ld_isfcav ! under iceshelf cavity flag
REAL(wp), DIMENSION(:) , INTENT(out) :: pdept_1d, pdepw_1d ! 1D grid-point depth [m]
REAL(wp), DIMENSION(:) , INTENT(out) :: pe3t_1d , pe3w_1d ! 1D grid-point depth [m]
REAL(wp), DIMENSION(:,:,:), INTENT(out) :: pdept, pdepw ! grid-point depth [m]
REAL(wp), DIMENSION(:,:,:), INTENT(out) :: pe3t , pe3u , pe3v , pe3f ! vertical scale factors [m]
REAL(wp), DIMENSION(:,:,:), INTENT(out) :: pe3w , pe3uw, pe3vw ! i-scale factors
INTEGER , DIMENSION(:,:) , INTENT(out) :: k_top, k_bot ! first & last ocean level
LOGICAL , INTENT(out) :: ld_zco, ld_zps, ld_sco ! vertical coordinate flags
LOGICAL , INTENT(out) :: ld_isfcav ! under iceshelf cavity flag
INTEGER , DIMENSION(:,:) , INTENT(out) :: k_top, k_bot ! first & last ocean level
REAL(wp), DIMENSION(:) , INTENT(out) :: pdept_1d, pdepw_1d ! 1D grid-point depth [m]
REAL(wp), DIMENSION(:) , INTENT(out) :: pe3t_1d , pe3w_1d ! 1D grid-point depth [m]
REAL(wp), DIMENSION(:,:,:), OPTIONAL, INTENT(out) :: pe3t , pe3u , pe3v , pe3f ! t-level vertical scale factors [m]
REAL(wp), DIMENSION(:,:,:), OPTIONAL, INTENT(out) :: pdept, pdepw ! grid-point depth [m]
REAL(wp), DIMENSION(:,:,:), OPTIONAL, INTENT(out) :: pe3w , pe3uw, pe3vw ! w-level vertical scale factors [m]
!
INTEGER :: ji, jj, jk ! dummy indices
INTEGER :: ik ! local integers
......@@ -142,40 +142,43 @@ CONTAINS
! !* bottom ocean compute from the depth of grid-points
k_bot(:,:) = jpkm1
DO jk = jpkm1, 1, -1
ze3min = 0.1_wp * pe3t_1d (jk)
WHERE( zht(:,:) < pdepw_1d(jk) + ze3min ) k_bot(:,:) = jk-1
ze3min = 0.1_wp * pe3t_1d (jk)
WHERE( zht(:,:) < pdepw_1d(jk) + ze3min ) k_bot(:,:) = MAX( 1 , jk-1)
END DO
!
! !* vertical coordinate system
DO jk = 1, jpk ! initialization to the reference z-coordinate
pdept(:,:,jk) = pdept_1d(jk)
pdepw(:,:,jk) = pdepw_1d(jk)
pe3t (:,:,jk) = pe3t_1d (jk)
pe3u (:,:,jk) = pe3t_1d (jk)
pe3v (:,:,jk) = pe3t_1d (jk)
pe3f (:,:,jk) = pe3t_1d (jk)
!!st : new zps framework toward penalization only fluxed at t-level are affected by scale factor change
#if defined key_vco_3d
pdept(:,:,jk) = pdept_1d(jk)
pdepw(:,:,jk) = pdepw_1d(jk)
pe3w (:,:,jk) = pe3w_1d (jk)
pe3uw(:,:,jk) = pe3w_1d (jk)
pe3vw(:,:,jk) = pe3w_1d (jk)
#endif
END DO
! bottom scale factors and depth at T- and W-points
DO_2D( 1, 1, 1, 1 )
ik = k_bot(ji,jj)
pdepw(ji,jj,ik+1) = MIN( zht(ji,jj) , pdepw_1d(ik+1) )
pe3t (ji,jj,ik ) = pdepw(ji,jj,ik+1) - pdepw(ji,jj,ik)
!!st pdepw(ji,jj,ik+1) = MIN( zht(ji,jj) , pdepw_1d(ik+1) )
pe3t (ji,jj,ik ) = MIN( zht(ji,jj) , pdepw_1d(ik+1) )- pdepw_1d(ik)
pe3t (ji,jj,ik+1) = pe3t (ji,jj,ik )
!
pdept(ji,jj,ik ) = pdepw(ji,jj,ik ) + pe3t (ji,jj,ik ) * 0.5_wp
pdept(ji,jj,ik+1) = pdepw(ji,jj,ik+1) + pe3t (ji,jj,ik+1) * 0.5_wp
pe3w (ji,jj,ik+1) = pdept(ji,jj,ik+1) - pdept(ji,jj,ik) ! = pe3t (ji,jj,ik )
!!st pdept(ji,jj,ik ) = pdepw(ji,jj,ik ) + pe3t (ji,jj,ik ) * 0.5_wp
!!st pdept(ji,jj,ik+1) = pdepw(ji,jj,ik+1) + pe3t (ji,jj,ik+1) * 0.5_wp
!!st pe3w (ji,jj,ik+1) = pdept(ji,jj,ik+1) - pdept(ji,jj,ik) ! = pe3t (ji,jj,ik )
END_2D
! ! bottom scale factors and depth at U-, V-, UW and VW-points
! ! usually Computed as the minimum of neighbooring scale factors
pe3u (:,:,:) = pe3t(:,:,:) ! HERE C1D configuration :
pe3v (:,:,:) = pe3t(:,:,:) ! e3 increases with k-index
pe3f (:,:,:) = pe3t(:,:,:) ! so e3 minimum of (i,i+1) points is (i) point
pe3uw(:,:,:) = pe3w(:,:,:) ! in j-direction e3v=e3t and e3f=e3v
pe3vw(:,:,:) = pe3w(:,:,:) ! ==>> no need of lbc_lnk calls
!!st pe3uw(:,:,:) = pe3w(:,:,:) ! in j-direction e3v=e3t and e3f=e3v
!!st pe3vw(:,:,:) = pe3w(:,:,:) ! ==>> no need of lbc_lnk calls
!
!
END SUBROUTINE usr_def_zgr
......
bld::tool::fppkeys key_xios key_linssh key_vco_1d3d key_si3 key_top
MODULE usrdef_nam
!!======================================================================
!! *** MODULE usrdef_nam ***
!!
!! === C1D_PAPA configuration ===
!!
!! User defined : set the domain characteristics of a user configuration
!!======================================================================
!! History : 4.0 ! 2016-03 (S. Flavoni, G. Madec) Original code
!!----------------------------------------------------------------------
!!----------------------------------------------------------------------
!! usr_def_nam : read user defined namelist and set global domain size
!! usr_def_hgr : initialize the horizontal mesh
!!----------------------------------------------------------------------
USE dom_oce , ONLY: nimpp, njmpp ! ocean space and time domain
USE dom_oce , ONLY: ln_zco, ln_zps, ln_sco ! flag of type of coordinate
USE par_oce ! ocean space and time domain
USE phycst ! physical constants
!
USE in_out_manager ! I/O manager
USE lib_mpp ! MPP library
IMPLICIT NONE
PRIVATE
PUBLIC usr_def_nam ! called in nemogcm.F90 module
! !!* namusr_def namelist *!!
LOGICAL, PUBLIC :: ln_bench ! =T benchmark test with gyre: the gridsize is constant (no need to adjust timestep or viscosity)
INTEGER, PUBLIC :: nn_GYRE ! 1/nn_GYRE = the resolution chosen in degrees and thus defining the horizontal domain size
REAL(wp), PUBLIC:: rn_bathy ! Depth in meters for 1D configuration
!!----------------------------------------------------------------------
!! NEMO/OCE 4.0 , NEMO Consortium (2018)
!! $Id: usrdef_nam.F90 15023 2021-06-18 14:35:25Z gsamson $
!! Software governed by the CeCILL license (see ./LICENSE)
!!----------------------------------------------------------------------
CONTAINS
SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
!!----------------------------------------------------------------------
!! *** ROUTINE dom_nam ***
!!
!! ** Purpose : read user defined namelist and define the domain size
!!
!! ** Method : read in namusr_def containing all the user specific namelist parameter
!!
!! Here C1D configuration
!!
!! ** input : - namusr_def namelist found in namelist_cfg
!!----------------------------------------------------------------------
CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name
INTEGER , INTENT(out) :: kk_cfg ! configuration resolution
INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes
LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity
LOGICAL , INTENT(out) :: ldNFold ! North pole folding
CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F
!
INTEGER :: ios ! Local integer
!!
NAMELIST/namusr_def/ rn_bathy
!!----------------------------------------------------------------------
!
READ ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 )
902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namusr_def in configuration namelist' )
!
IF(lwm) WRITE( numond, namusr_def )
!
cd_cfg = 'C1D' ! name & resolution (not used)
kk_cfg = 0
! Global Domain size: C1D domain is 1 x 1 grid-points x 75 or vertical levels
kpi = 1
kpj = 1
kpk = 75
! ! Set the lateral boundary condition of the global domain
ldIperio = .TRUE. ; ldJperio = .TRUE. ! C1D configuration : 1x1 basin with cyclic Est-West and Norht-South condition
ldNFold = .FALSE. ; cdNFtype = '-'
!
! ! control print
IF(lwp) THEN
WRITE(numout,*) ' '
WRITE(numout,*) 'usr_def_nam : read the user defined namelist (namusr_def) in namelist_cfg'
WRITE(numout,*) '~~~~~~~~~~~ '
WRITE(numout,*) ' Namelist namusr_def : C1 case'
WRITE(numout,*) ' type of vertical coordinate : '
WRITE(numout,*) ' z-coordinate flag ln_zco = ', ln_zco
WRITE(numout,*) ' z-partial-step coordinate flag ln_zps = ', ln_zps
WRITE(numout,*) ' s-coordinate flag ln_sco = ', ln_sco
WRITE(numout,*) ' C1D domain = 1 x 1 x 75 grid-points '
WRITE(numout,*) ' resulting global domain size : jpiglo = ', kpi
WRITE(numout,*) ' jpjglo = ', kpj
WRITE(numout,*) ' jpkglo = ', kpk
WRITE(numout,*) ' '
ENDIF
!
END SUBROUTINE usr_def_nam
!!======================================================================
END MODULE usrdef_nam
bld::tool::fppkeys key_xios key_linssh
......@@ -4,7 +4,7 @@
==============================================================================================
-->
<context id="nemo">
<!-- $id$ -->
<variable_definition>
<!-- Year/Month/Day of time origin for NetCDF files; defaults to 1800-01-01 -->
<variable id="ref_year" type="int"> 1900 </variable>
......@@ -19,12 +19,12 @@
</variable_definition>
<!-- Fields definition -->
<field_definition src="./field_def_nemo-oce.xml"/> <!-- NEMO ocean dynamics -->
<field_definition src="./field_def_nemo-pisces.xml"/> <!-- NEMO ocean dynamics -->
<field_definition src="./field_def_nemo-oce.xml"/> <!-- NEMO ocean dynamics -->
<field_definition src="./field_def_bfm.xml"/> <!-- BFM BGC dynamics -->
<!-- Files definition -->
<file_definition src="./file_def_nemo.xml"/> <!-- NEMO ocean dynamics -->
<file_definition src="./file_def_nemo.xml"/> <!-- NEMO ocean dynamics -->
<file_definition src="./file_def_bfm.xml"/> <!-- BFM BGC dynamics -->
<!-- Axis definition -->
<axis_definition src="./axis_def_nemo.xml"/>
......@@ -34,6 +34,5 @@
<!-- Grids definition -->
<grid_definition src="./grid_def_nemo.xml"/>
</context>
......@@ -9,28 +9,28 @@
<file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">
<file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
<file_group id="oce_1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
<file_group id="1h" output_freq="1h" output_level="10" enabled=".TRUE."/> <!-- 1h files -->
<file_group id="2h" output_freq="2h" output_level="10" enabled=".TRUE."/> <!-- 2h files -->
<file_group id="3h" output_freq="3h" output_level="10" enabled=".TRUE."/> <!-- 3h files -->
<file_group id="4h" output_freq="4h" output_level="10" enabled=".TRUE."/> <!-- 4h files -->
<file_group id="6h" output_freq="6h" output_level="10" enabled=".TRUE."/> <!-- 6h files -->
<file_group id="oce_1h" output_freq="1h" output_level="10" enabled=".TRUE."/> <!-- 1h files -->
<file_group id="oce_2h" output_freq="2h" output_level="10" enabled=".TRUE."/> <!-- 2h files -->
<file_group id="oce_3h" output_freq="3h" output_level="10" enabled=".TRUE."/> <!-- 3h files -->
<file_group id="oce_4h" output_freq="4h" output_level="10" enabled=".TRUE."/> <!-- 4h files -->
<file_group id="oce_6h" output_freq="6h" output_level="10" enabled=".TRUE."/> <!-- 6h files -->
<file_group id="1d" output_freq="1d" output_level="10" enabled=".TRUE."/> <!-- 1d files -->
<file_group id="3d" output_freq="3d" output_level="10" enabled=".TRUE."/> <!-- 3d files -->
<file_group id="5d" output_freq="5d" output_level="10" enabled=".TRUE."/> <!-- 5d files -->
<file_group id="oce_1d" output_freq="1d" output_level="10" enabled=".TRUE."/> <!-- 1d files -->
<file_group id="oce_3d" output_freq="3d" output_level="10" enabled=".TRUE."/> <!-- 3d files -->
<file_group id="oce_5d" output_freq="5d" output_level="10" enabled=".TRUE."/> <!-- 5d files -->
<file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
<file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
<file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
<file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
<file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
<file_group id="oce_1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
<file_group id="oce_2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
<file_group id="oce_3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
<file_group id="oce_4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
<file_group id="oce_6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
<file_group id="1y" output_freq="1y" output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
<file_group id="2y" output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
<file_group id="5y" output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
<file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
<file_group id="oce_1y" output_freq="1y" output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
<file_group id="oce_2y" output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
<file_group id="oce_5y" output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
<file_group id="oce_10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
</file_definition>
......@@ -10,22 +10,20 @@
!! namcfg parameters of the configuration (default: user defined GYRE)
!! namwad Wetting and drying (default: OFF)
!! namtsd data: temperature & salinity (default: OFF)
!! namcrs coarsened grid (for outputs and/or TOP) (ln_crs =T)
!! namc1d 1D configuration options (ln_c1d =T)
!! namc1d_dyndmp 1D newtonian damping applied on currents (ln_c1d =T)
!! namc1d_uvd 1D data (currents) (ln_c1d =T)
!!======================================================================
!
!-----------------------------------------------------------------------
&namrun ! parameters of the run
!-----------------------------------------------------------------------
cn_exp = "GYRE" ! experience name
nn_it000 = 1 ! first time step
nn_itend = 4320 ! last time step
nn_leapy = 30 ! Leap year calendar (1) or not (0)
nn_stock = 4320 ! frequency of creation of a restart file (modulo referenced to 1)
nn_write = 60 ! frequency of write in the output file (modulo referenced to nn_it000)
nn_istate = 0 ! output the initial state (1) or not (0)
cn_exp = "GYRE_BFM" ! experience name
nn_date0 = 20000101 ! date at nit_0000 (format yyyymmdd) used if ln_rstart=F or (ln_rstart=T and nn_rstctl=0 or 1)
nn_it000 = 1 ! first time step
nn_itend = 4320 ! last time step
nn_leapy = 30 ! Leap year calendar (1) or not (0)
nn_stock = 4320 ! frequency of creation of a restart file (modulo referenced to 1)
nn_write = 60 ! frequency of write in the output file (modulo referenced to nn_it000)
nn_istate = 0 ! output the initial state (1) or not (0)
/
!-----------------------------------------------------------------------
&namcfg ! parameters of the configuration (default: user defined GYRE)
......@@ -46,9 +44,10 @@
!-----------------------------------------------------------------------
&namdom ! time and space domain
!-----------------------------------------------------------------------
ln_linssh = .true. ! =T linear free surface ==>> model level are fixed in time
!
rn_Dt = 7200. ! time step for the dynamics
!
ln_meshmask = .false. ! =T create a mesh file
/
!!======================================================================
......@@ -226,13 +225,10 @@
!! *** Diagnostics namelists *** !!
!! !!
!! namtrd dynamics and/or tracer trends (default: OFF)
!! namhsb Heat and salt budgets (default: OFF)
!! namdiu Cool skin and warm layer models (default: OFF)
!! namdiu Cool skin and warm layer models (default: OFF)
!! namflo float parameters (default: OFF)
!! nam_diadct transports through some sections (default: OFF)
!! nam_dia25h 25h Mean Output (default: OFF)
!! namnc4 netcdf4 chunking and compression settings ("key_netcdf4")
!! namnc4 netcdf4 chunking and compression settings
!!======================================================================
!!======================================================================
......@@ -245,10 +241,14 @@
!-----------------------------------------------------------------------
&nammpp ! Massively Parallel Processing
!-----------------------------------------------------------------------
nn_hls = 1 ! halo width (applies to both rows and columns)
nn_comm = 1 ! comm choice
/
!-----------------------------------------------------------------------
&namctl ! Control prints (default: OFF)
!-----------------------------------------------------------------------
sn_cfctl%l_runstat = .FALSE. ! switches and which areas produce reports with the proc integer settings.
ln_timing = .false. ! timing by routine write out in timing.output file
/
!-----------------------------------------------------------------------
&namsto ! Stochastic parametrization of EOS (default: OFF)
......
......@@ -3,12 +3,14 @@
!-----------------------------------------------------------------------
&namtrc_run ! run information
!-----------------------------------------------------------------------
ln_top_euler = .true. ! use Euler time-stepping for TOP
ln_rsttr = .false.
/
!-----------------------------------------------------------------------
&namtrc ! tracers definition
!-----------------------------------------------------------------------
ln_trcdta = .false. ! Initialisation from data input file (T) or not (F)
jp_bgc = 1 ! Modified runtime by BFM interface
ln_my_trc = .true.
ln_trcdta = .false. ! Initialisation from data input file (T) or not (F)
!
! ! name ! title of the field ! units ! initial data from file or not !
sn_tracer(1) = 'DUMMY ' , 'Dummy tracer ' , 'dummy-units' , .false.
......@@ -23,9 +25,8 @@
/
!-----------------------------------------------------------------------
&namtrc_adv ! advection scheme for passive tracer (default: NO selection)
ln_trcadv_fct = .true. ! FCT scheme
nn_fct_h = 2 ! =2/4, horizontal 2nd / 4th order
nn_fct_v = 2 ! =2/4, vertical 2nd / COMPACT 4th order
ln_trcadv_fct = .false.
ln_trcadv_mus = .true.
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
......@@ -34,8 +35,13 @@
ln_trcldf_tra = .true. ! use active tracer setting
/
!-----------------------------------------------------------------------
&namtrc_snk ! Sedimentation of particles
!-----------------------------------------------------------------------
/
!-----------------------------------------------------------------------
&namtrc_rad ! treatment of negative concentrations
!-----------------------------------------------------------------------
ln_trcrad = .true.
/
!-----------------------------------------------------------------------
&namtrc_dmp ! passive tracer newtonian damping
......@@ -44,6 +50,7 @@
!-----------------------------------------------------------------------
&namtrc_ice ! Representation of sea ice growth & melt effects
!-----------------------------------------------------------------------
nn_ice_tr = -1
/
!-----------------------------------------------------------------------
&namtrc_trd ! diagnostics on tracer trends ('key_trdtrc')
......@@ -52,6 +59,12 @@
!----------------------------------------------------------------------
&namtrc_bc ! data for boundary conditions
!-----------------------------------------------------------------------
cn_dir_sbc = './'
cn_dir_cbc = './'
cn_dir_obc = './'
ln_rnf_ctl = .false.
rn_sbc_time = 86400.
rn_cbc_time = 86400.
/
!----------------------------------------------------------------------
&namtrc_bdy ! Setup of tracer boundary conditions
......
#! /bin/sh
### This is an example of a runscript for the LSF queueing system
#BSUB -a poe
#BSUB -J GYRE_BFM # Name of the job.
#BSUB -o GYRE_BFM_%J.out # Appends std output to file %J.out.
#BSUB -e GYRE_BFM_%J.err # Appends std error to file %J.out.
#BSUB -P nemo
#BSUB -q poe_short # queue
#BSUB -n 4 # Number of CPUs
set -evx
export MP_WAIT_MODE=poll
export MP_POLLING_INTERVAL=30000000
export MP_SHARED_MEMORY=yes
export MP_EUILIB=us
export MP_EUIDEVICE=sn_all
export LDR_CNTRL=TEXTPSIZE=64K@STACKPSIZE=64K@DATAPSIZE=64K
export MP_TASK_AFFINITY=core
EXP="EXP00"
workdir="TO_BE_SET_BY_USER"
execdir=`pwd`
if [ ! -d ${workdir} ] ; then
mkdir -p ${workdir}
fi
cd ${workdir}
rm -rf *
# Copy files to exp folder
cp ${execdir}/opa ./opa.x
cp ${execdir}/* ./
# Launch the model
mpirun.lsf opa.x
-----------------------------------------------------------------------
Coupling with the Biogeochemical Flux Model (BFM)
-----------------------------------------------------------------------
Author: M. Vichi, BFM system team and NEMO system team
INFO HELPDESK: info@bfm-community.eu
WEB SITE: www.bfm-community.eu
REVISION DATE: October 2013
Please address any technical query to the BFM System Team
bfm_st@lists.cmcc.it
-----------------------------------------------------------------------
-----------------------------------------------------------------------
What is the BFM?
-----------------------------------------------------------------------
The Biogeochemical Flux Model (BFM) is a numerical model for the
simulation of the dynamics of major biogeochemical properties
in marine ecosystems. The BFM is open source software freely available
under the GNU Public License. The model can be used in standalone mode
to simulate a 0-D system or coupled with other OGCM.
The coupling with NEMO is maintained by CMCC as part of the
NEMO system team activity
-----------------------------------------------------------------------
How to get the BFM code
-----------------------------------------------------------------------
The code can be downloaded from http://www.bfm-community.eu after
the registration of a new user. Follow the instructions on how to
install the code. It is recommended to run the STANDALONE test cases
before using the NEMO-BFM coupled system.
-----------------------------------------------------------------------
Compile NEMO with the BFM
-----------------------------------------------------------------------
NEMO-BFM is compiled from the BFM configuration script relying on the
NEMO FCM compilation environment. This is done to allow BFM users to
use new configurations in NEMO that are not part of the NEMO
standard distribution code.
The BFM configuration shipped with NEMO is GYRE_BFM (see next section)
Make sure that the BFMDIR variable is defined in your environment
and define the variable NEMODIR pointing to the root of NEMO source code
It is assumed here that you have expanded the bfm in /home/user/bfm
and the root of this NEMO directory in /home/user/nemo then
and that you have already adjusted the appropriate ARCHFILE that
is used for the NEMO compilation with makenemo in ../../ARCH
Execute the following commands:
>> export BFMDIR=/home/user/bfm
>> export NEMODIR=/home/user/nemo
>> cd $BFMDIR/build
>> ./bfm_config.sh -gcd -p GYRE_BFM
The script will generate (-g) the BFM code, then launch
makenemo for compilation (-c) and create the run directory
(-d) in $BFMDIR/run.
to get information on how to use the BFM configuration script run
>> ./bfm_config.sh -h
-----------------------------------------------------------------------
Standard test case
-----------------------------------------------------------------------
The distributed standard test case is GYRE_BFM, a version of GYRE
with a full-blown BFM. It is a demnstration simulation and it is not
meant to produce any published result.
GYRE_BFM runs with analytical input data only.
The namelists for the BFM are not distributed with NEMO but are
generated directly by the BFM, in directory $BFMDIR/run/gyre_bfm.
The generation of the BFM namelist also copy the required NEMO
namelist and namelist_top files to this directory.
This is why there are no namelist files found in the standard
run directory $NEMODIR/NEMOGCM/CONFIG/GYRE_BFM/EXP00
Note for expert users:
If a user prefers to work in the NEMO directory than she has to
copy the generated namelists there
>> cp $BFMDIR/run/gyre_bfm/* $NEMODIR/NEMOGCM/CONFIG/GYRE_BFM/EXP00
Once the BFM code has been generated the first time, the code can be
also rebuilt with the standard NEMO command:
>> ./makenemo -n GYRE_BFM -m ARCHFILE -e $BFMDIR/src/nemo
-----------------------------------------------------------------------
Other examples
-----------------------------------------------------------------------
Other couplings with NEMO are available in $BFMDIR/build/configurations.
Run the command
>> ./bfm_config.sh -P
to get a list of available presets
Please refer to the README file in each directory for more information.