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
No results found
Show changes
Showing
with 1023 additions and 535 deletions
......@@ -418,5 +418,43 @@
<duplicate_scalar />
</axis>
</grid>
<grid id="grid_EqT" >
<domain id="EqT" />
</grid>
<!-- -->
<grid id="gznl_T_2D">
<domain id="ptr" />
</grid>
<!-- -->
<grid id="gznl_T_3D">
<domain id="ptr" />
<axis axis_ref="deptht" />
</grid>
<!-- -->
<grid id="gznl_W_2D">
<domain id="ptr" />
</grid>
<!-- -->
<grid id="gznl_W_3D">
<domain id="ptr" />
<axis axis_ref="depthw" />
</grid>
<grid id="vert_sum">
<domain id="grid_T"/>
<scalar>
<reduce_axis operation="sum" />
</scalar>
</grid>
<grid id="zoom_300">
<domain id="grid_T" />
<axis axis_ref="deptht300"/>
</grid>
<grid id="zoom_300_sum">
<domain id="grid_T" />
<scalar>
<reduce_axis operation="sum" />
</scalar>
</grid>
</grid_definition>
......@@ -24,10 +24,10 @@
jpl = 5 ! number of ice categories
nlay_i = 2 ! number of ice layers
nlay_s = 2 ! number of snow layers
ln_virtual_itd = .false. ! virtual ITD mono-category parameterization (jpl=1 only)
! i.e. enhanced thermal conductivity & virtual thin ice melting
ln_icedyn = .true. ! ice dynamics (T) or not (F)
ln_icethd = .true. ! ice thermo (T) or not (F)
ln_virtual_itd = .false., ! virtual ITD mono-category parameterization (jpl=1 only)
! i.e. enhan.false.ced thermal conductivity & virtual thin ice melting
ln_icedyn = .true., ! ice dynamics (T) or not (F)
ln_icethd = .true., ! ice thermo (T) or not (F)
rn_amax_n = 0.997 ! maximum tolerated ice concentration NH
rn_amax_s = 0.997 ! maximum tolerated ice concentration SH
cn_icerst_in = "restart_ice" ! suffix of ice restart name (input)
......@@ -38,9 +38,9 @@
!------------------------------------------------------------------------------
&namitd ! Ice discretization
!------------------------------------------------------------------------------
ln_cat_hfn = .true. ! ice categories are defined by a function following rn_himean**(-0.05)
ln_cat_hfn = .true., ! ice categories are defined by a function following rn_himean**(-0.05)
rn_himean = 2.0 ! expected domain-average ice thickness (m)
ln_cat_usr = .false. ! ice categories are defined by rn_catbnd below (m)
ln_cat_usr = .false., ! ice categories are defined by rn_catbnd below (m)
rn_catbnd = 0.,0.45,1.1,2.1,3.7,6.0
rn_himin = 0.1 ! minimum ice thickness (m) allowed
rn_himax = 99.0 ! maximum ice thickness (m) allowed
......@@ -48,14 +48,14 @@
!------------------------------------------------------------------------------
&namdyn ! Ice dynamics
!------------------------------------------------------------------------------
ln_dynALL = .true. ! dyn.: full ice dynamics (rheology + advection + ridging/rafting + correction)
ln_dynRHGADV = .false. ! dyn.: no ridge/raft & no corrections (rheology + advection)
ln_dynADV1D = .false. ! dyn.: only advection 1D (Schar & Smolarkiewicz 1996 test case)
ln_dynADV2D = .false. ! dyn.: only advection 2D w prescribed vel.(rn_uvice + advection)
ln_dynALL = .true., ! dyn.: full ice dynamics (rheology + advection + ridging/rafting + correction)
ln_dynRHGADV = .false., ! dyn.: no ridge/raft & no corrections (rheology + advection)
ln_dynADV1D = .false., ! dyn.: only advection 1D (Schar & Smolarkiewicz 1996 test case)
ln_dynADV2D = .false., ! dyn.: only advection 2D w prescribed vel.(rn_uvice + advection)
rn_uice = 0.5 ! prescribed ice u-velocity
rn_vice = 0.5 ! prescribed ice v-velocity
rn_ishlat = 2. ! lbc : free slip (0) ; partial slip (0-2) ; no slip (2) ; strong slip (>2)
ln_landfast_L16 = .false. ! landfast: parameterization from Lemieux 2016
ln_landfast_L16 = .false., ! landfast: parameterization from Lemieux 2016
rn_lf_depfra = 0.125 ! fraction of ocean depth that ice must reach to initiate landfast
! recommended range: [0.1 ; 0.25]
rn_lf_bfr = 15. ! maximum bottom stress per unit volume [N/m3]
......@@ -72,30 +72,30 @@
&namdyn_rdgrft ! Ice ridging/rafting
!------------------------------------------------------------------------------
! -- ice_rdgrft_strength -- !
ln_str_H79 = .true. ! ice strength param.: Hibler_79 => P = pstar*<h>*exp(-c_rhg*A)
ln_str_H79 = .true., ! ice strength param.: Hibler_79 => P = pstar*<h>*exp(-c_rhg*A)
rn_pstar = 2.0e+04 ! ice strength thickness parameter [N/m2]
rn_crhg = 20.0 ! ice strength conc. parameter (-)
ln_str_R75 = .false. ! ice strength param.: Rothrock_75 => P = fn of potential energy
ln_str_R75 = .false., ! ice strength param.: Rothrock_75 => P = fn of potential energy
rn_pe_rdg = 17.0 ! coef accouting for frictional dissipation
ln_str_CST = .false. ! ice strength param.: Constant
ln_str_CST = .false., ! ice strength param.: Constant
rn_str = 0.0 ! ice strength value
ln_str_smooth = .true. ! spatial smoothing of the ice strength
ln_str_smooth = .true., ! spatial smoothing of the ice strength
! -- ice_rdgrft -- !
ln_distf_lin = .true. ! redistribution function of ridged ice: linear (Hibler 1980)
ln_distf_exp = .false. ! redistribution function of ridged ice: exponential => not coded yet
ln_distf_lin = .true., ! redistribution function of ridged ice: linear (Hibler, 1980)
ln_distf_exp = .false., ! redistribution function of ridged ice: exponential (Lipscomb et al., 2007)
rn_murdg = 3.0 ! e-folding scale of ridged ice (m**.5)
rn_csrdg = 0.5 ! fraction of shearing energy contributing to ridging
! -- ice_rdgrft_prep -- !
ln_partf_lin = .false. ! Linear ridging participation function (Thorndike et al, 1975)
ln_partf_lin = .false., ! Linear ridging participation function (Thorndike et al., 1975)
rn_gstar = 0.15 ! fractional area of thin ice being ridged
ln_partf_exp = .true. ! Exponential ridging participation function (Lipscomb, 2007)
ln_partf_exp = .true., ! Exponential ridging participation function (Lipscomb et al., 2007)
rn_astar = 0.03 ! exponential measure of ridging ice fraction [set to 0.05 if hstar=100]
ln_ridging = .true. ! ridging activated (T) or not (F)
ln_ridging = .true., ! ridging activated (T) or not (F)
rn_hstar = 25.0 ! determines the maximum thickness of ridged ice [m] (Hibler, 1980)
rn_porordg = 0.3 ! porosity of newly ridged ice (Lepparanta et al., 1995)
rn_fsnwrdg = 0.5 ! snow volume fraction that survives in ridging
rn_fpndrdg = 1.0 ! pond fraction that survives in ridging (small a priori)
ln_rafting = .true. ! rafting activated (T) or not (F)
ln_rafting = .true., ! rafting activated (T) or not (F)
rn_hraft = 0.75 ! threshold thickness for rafting [m]
rn_craft = 5.0 ! squeezing coefficient used in the rafting function
rn_fsnwrft = 0.5 ! snow volume fraction that survives in rafting
......@@ -104,9 +104,9 @@
!------------------------------------------------------------------------------
&namdyn_rhg ! Ice rheology
!------------------------------------------------------------------------------
ln_rhg_EVP = .true. ! EVP rheology
ln_rhg_EAP = .false. ! EAP rheology
ln_aEVP = .true. ! adaptive rheology (Kimmritz et al. 2016 & 2017)
ln_rhg_EVP = .true., ! EVP rheology
ln_rhg_EAP = .false., ! EAP rheology
ln_aEVP = .true., ! adaptive rheology (Kimmritz et al. 2016 & 2017)
rn_creepl = 2.0e-9 ! creep limit [1/s]
rn_ecc = 2.0 ! eccentricity of the elliptical yield curve
nn_nevp = 100 ! number of EVP subcycles
......@@ -117,7 +117,7 @@
! = 1 check at the main time step (output xml: uice_cvg)
! = 2 check at both main and rheology time steps (additional output: ice_cvg.nc)
! this option 2 asks a lot of communications between cpu
ln_rhg_VP = .false. ! VP rheology
ln_rhg_VP = .false., ! VP rheology
nn_vp_nout = 10 ! number of outer iterations
nn_vp_ninn = 1500 ! number of inner iterations
nn_vp_chkcvg = 5 ! iteration step for convergence check
......@@ -125,8 +125,8 @@
!------------------------------------------------------------------------------
&namdyn_adv ! Ice advection
!------------------------------------------------------------------------------
ln_adv_Pra = .true. ! Advection scheme (Prather)
ln_adv_UMx = .false. ! Advection scheme (Ultimate-Macho)
ln_adv_Pra = .true., ! Advection scheme (Prather)
ln_adv_UMx = .false., ! Advection scheme (Ultimate-Macho)
nn_UMx = 5 ! order of the scheme for UMx (1-5 ; 20=centered 2nd order)
/
!------------------------------------------------------------------------------
......@@ -144,8 +144,8 @@
! = 0 Average N(cat) fluxes then apply the average over the N(cat) ice
! = 1 Average N(cat) fluxes then redistribute over the N(cat) ice using T-ice and albedo sensitivity
! = 2 Redistribute a single flux over categories
ln_cndflx = .false. ! Use conduction flux as surface boundary conditions (i.e. for Jules coupling)
ln_cndemulate = .false. ! emulate conduction flux (if not provided in the inputs)
ln_cndflx = .false., ! Use conduction flux as surface boundary conditions (i.e. for Jules coupling)
ln_cndemulate = .false., ! emulate conduction flux (if not provided in the inputs)
nn_qtrice = 0 ! Solar flux transmitted thru the surface scattering layer:
! = 0 Grenfell and Maykut 1977 (depends on cloudiness and is 0 when there is snow)
! = 1 Lebrun 2019 (equals 0.3 anytime with different melting/dry snw conductivities)
......@@ -153,26 +153,26 @@
!------------------------------------------------------------------------------
&namthd ! Ice thermodynamics
!------------------------------------------------------------------------------
ln_icedH = .true. ! activate ice thickness change from growing/melting (T) or not (F)
ln_icedA = .true. ! activate lateral melting param. (T) or not (F)
ln_icedO = .true. ! activate ice growth in open-water (T) or not (F)
ln_icedS = .true. ! activate brine drainage (T) or not (F)
ln_icedH = .true., ! activate ice thickness change from growing/melting (T) or not (F)
ln_icedA = .true., ! activate lateral melting param. (T) or not (F)
ln_icedO = .true., ! activate ice growth in open-water (T) or not (F)
ln_icedS = .true., ! activate brine drainage (T) or not (F)
!
ln_leadhfx = .true. ! heat in the leads is used to melt sea-ice before warming the ocean
ln_leadhfx = .true., ! heat in the leads is used to melt sea-ice before warming the ocean
/
!------------------------------------------------------------------------------
&namthd_zdf ! Ice heat diffusion
!------------------------------------------------------------------------------
ln_zdf_BL99 = .true. ! Heat diffusion follows Bitz and Lipscomb 1999
ln_cndi_U64 = .false. ! sea ice thermal conductivity: k = k0 + beta.S/T (Untersteiner, 1964)
ln_cndi_P07 = .true. ! sea ice thermal conductivity: k = k0 + beta1.S/T - beta2.T (Pringle et al., 2007)
ln_zdf_BL99 = .true., ! Heat diffusion follows Bitz and Lipscomb 1999
ln_cndi_U64 = .false., ! sea ice thermal conductivity: k = k0 + beta.S/T (Untersteiner, 1964)
ln_cndi_P07 = .true., ! sea ice thermal conductivity: k = k0 + beta1.S/T - beta2.T (Pringle et al., 2007)
rn_cnd_s = 0.31 ! thermal conductivity of the snow (0.31 W/m/K, Maykut and Untersteiner, 1971)
! Obs: 0.1-0.5 (Lecomte et al, JAMES 2013)
rn_kappa_i = 1.0 ! radiation attenuation coefficient in sea ice [1/m]
rn_kappa_s = 10.0 ! nn_qtrice = 0: radiation attenuation coefficient in snow [1/m]
rn_kappa_smlt = 7.0 ! nn_qtrice = 1: radiation attenuation coefficient in melting snow [1/m]
rn_kappa_sdry = 10.0 ! radiation attenuation coefficient in dry snow [1/m]
ln_zdf_chkcvg = .false. ! check convergence of heat diffusion scheme (outputs: tice_cvgerr, tice_cvgstp)
ln_zdf_chkcvg = .false., ! check convergence of heat diffusion scheme (outputs: tice_cvgerr, tice_cvgstp)
/
!------------------------------------------------------------------------------
&namthd_da ! Ice lateral melting
......@@ -189,7 +189,7 @@
&namthd_do ! Ice growth in open water
!------------------------------------------------------------------------------
rn_hinew = 0.1 ! thickness for new ice formation in open water (m), must be larger than rn_himin
ln_frazil = .false. ! Frazil ice parameterization (ice collection as a function of wind)
ln_frazil = .false., ! Frazil ice parameterization (ice collection as a function of wind)
rn_maxfraz = 1.0 ! maximum fraction of frazil ice collecting at the ice base
rn_vfraz = 0.417 ! thresold drift speed for frazil ice collecting at the ice bottom (m/s)
rn_Cfraz = 5.0 ! squeezing coefficient for frazil ice collecting at the ice bottom
......@@ -212,22 +212,25 @@
!------------------------------------------------------------------------------
&namthd_pnd ! Melt ponds
!------------------------------------------------------------------------------
ln_pnd = .true. ! activate melt ponds or not
ln_pnd_TOPO = .false. ! topographic melt ponds
ln_pnd_LEV = .true. ! level ice melt ponds
ln_pnd = .true., ! activate melt ponds or not
ln_pnd_TOPO = .false., ! topographic melt ponds
ln_pnd_LEV = .true., ! level ice melt ponds
rn_apnd_min = 0.15 ! minimum meltwater fraction contributing to pond growth (TOPO and LEV)
rn_apnd_max = 0.85 ! maximum meltwater fraction contributing to pond growth (TOPO and LEV)
rn_pnd_flush= 0.1 ! pond flushing efficiency (tuning parameter) (LEV)
ln_pnd_CST = .false. ! constant melt ponds
ln_pnd_CST = .false., ! constant melt ponds
rn_apnd = 0.2 ! prescribed pond fraction, at Tsu=0 degC
rn_hpnd = 0.05 ! prescribed pond depth, at Tsu=0 degC
ln_pnd_lids = .true. ! frozen lids on top of the ponds (only for ln_pnd_LEV)
ln_pnd_alb = .true. ! effect of melt ponds on ice albedo
ln_pnd_lids = .true., ! frozen lids on top of the ponds (only for ln_pnd_LEV)
ln_pnd_alb = .true., ! effect of melt ponds on ice albedo
nn_pnd_brsal = 0 ! brine salinity formulation 0 = Consistent expression with SI3
! (linear liquidus)
! 1 = used in GOSI9
/
!------------------------------------------------------------------------------
&namini ! Ice initialization
!------------------------------------------------------------------------------
ln_iceini = .true. ! activate ice initialization (T) or not (F)
ln_iceini = .true., ! activate ice initialization (T) or not (F)
nn_iceini_file = 0 ! 0 = Initialise sea ice based on SSTs
! 1 = Initialise sea ice from single category netcdf file
! 2 = Initialise sea ice from multi category restart file
......@@ -280,12 +283,12 @@
!------------------------------------------------------------------------------
&namdia ! Diagnostics
!------------------------------------------------------------------------------
ln_icediachk = .false. ! check online heat, mass & salt budgets
ln_icediachk = .false., ! check online heat, mass & salt budgets
! ! rate of ice spuriously gained/lost at each time step => rn_icechk=1 <=> 1.e-6 m/hour
rn_icechk_cel = 1. ! check at each gridcell (1.e-06m/h)=> stops the code if violated (and writes a file)
rn_icechk_glo = 1.e-04 ! check over the entire ice cover (1.e-10m/h)=> only prints warnings
ln_icediahsb = .false. ! output the heat, mass & salt budgets (T) or not (F)
ln_icectl = .false. ! ice points output for debug (T or F)
ln_icediahsb = .false., ! output the heat, mass & salt budgets (T) or not (F)
ln_icectl = .false., ! ice points output for debug (T or F)
iiceprt = 10 ! i-index for debug
jiceprt = 10 ! j-index for debug
/
This diff is collapsed.
......@@ -13,8 +13,8 @@
!-----------------------------------------------------------------------
&namtrc_run ! run information
!-----------------------------------------------------------------------
ln_top_euler = .false. ! use Euler time-stepping for TOP
ln_rsttr = .false. ! start from a restart file (T) or not (F)
ln_top_euler = .false., ! use Euler time-stepping for TOP
ln_rsttr = .false., ! start from a restart file (T) or not (F)
nn_rsttr = 0 ! restart control = 0 initial time step is not compared to the restart file value
! = 1 do not use the value in the restart file
! = 2 calendar parameters read in the restart file
......@@ -28,19 +28,19 @@
!-----------------------------------------------------------------------
jp_bgc = 0 ! Number of passive tracers of the BGC model
!
ln_pisces = .false. ! Run PISCES BGC model
ln_my_trc = .false. ! Run MY_TRC BGC model
ln_age = .false. ! Run the sea water age tracer
ln_cfc11 = .false. ! Run the CFC11 passive tracer
ln_cfc12 = .false. ! Run the CFC12 passive tracer
ln_sf6 = .false. ! Run the SF6 passive tracer
ln_c14 = .false. ! Run the Radiocarbon passive tracer
ln_pisces = .false., ! Run PISCES BGC model
ln_my_trc = .false., ! Run MY_TRC BGC model
ln_age = .false., ! Run the sea water age tracer
ln_cfc11 = .false., ! Run the CFC11 passive tracer
ln_cfc12 = .false., ! Run the CFC12 passive tracer
ln_sf6 = .false., ! Run the SF6 passive tracer
ln_c14 = .false., ! Run the Radiocarbon passive tracer
!
ln_trcdta = .false. ! Initialisation from data input file (T) or not (F)
ln_trcdmp = .false. ! add a damping termn (T) or not (F)
ln_trcdmp_clo = .false. ! damping term (T) or not (F) on closed seas
ln_trcbc = .false. ! Surface, Lateral or Open Boundaries conditions
ln_trcais = .false. ! Antarctic Ice Sheet nutrient supply
ln_trcdta = .false., ! Initialisation from data input file (T) or not (F)
ln_trcdmp = .false., ! add a damping termn (T) or not (F)
ln_trcdmp_clo = .false., ! damping term (T) or not (F) on closed seas
ln_trcbc = .false., ! Surface, Lateral or Open Boundaries conditions
ln_trcais = .false., ! Antarctic Ice Sheet nutrient supply
!
jp_dia3d = 0 ! Number of 3D diagnostic variables
jp_dia2d = 0 ! Number of 2D diagnostic variables
......@@ -66,25 +66,25 @@
!-----------------------------------------------------------------------
&namtrc_adv ! advection scheme for passive tracer (default: NO selection)
!-----------------------------------------------------------------------
ln_trcadv_OFF = .false. ! No passive tracer advection
ln_trcadv_cen = .false. ! 2nd order centered scheme
ln_trcadv_OFF = .false., ! No passive tracer advection
ln_trcadv_cen = .false., ! 2nd order centered scheme
nn_cen_h = 4 ! =2/4, horizontal 2nd order CEN / 4th order CEN
nn_cen_v = 4 ! =2/4, vertical 2nd order CEN / 4th order COMPACT
ln_trcadv_fct = .false. ! FCT scheme
ln_trcadv_fct = .false., ! 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_mus = .false. ! MUSCL scheme
ln_mus_ups = .false. ! use upstream scheme near river mouths
ln_trcadv_ubs = .false. ! UBS scheme
ln_trcadv_mus = .false., ! MUSCL scheme
ln_mus_ups = .false., ! use upstream scheme near river mouths
ln_trcadv_ubs = .false., ! UBS scheme
nn_ubs_v = 2 ! =2 , vertical 2nd order FCT
ln_trcadv_qck = .false. ! QUICKEST scheme
ln_trcadv_qck = .false., ! QUICKEST scheme
/
!-----------------------------------------------------------------------
&namtrc_ldf ! lateral diffusion scheme for passive tracer (default: NO selection)
!-----------------------------------------------------------------------
! ! Type of the operator:
ln_trcldf_OFF = .false. ! No explicit diffusion
ln_trcldf_tra = .false. ! use active tracer setting
ln_trcldf_OFF = .false., ! No explicit diffusion
ln_trcldf_tra = .false., ! use active tracer setting
! ! Coefficient (defined with namtra_ldf coefficient)
rn_ldf_multi = 1. ! multiplier of aht for TRC mixing coefficient
rn_fact_lap = 1. ! Equatorial enhanced zonal eddy diffusivity (lap only)
......@@ -92,7 +92,7 @@
!-----------------------------------------------------------------------
&namtrc_rad ! treatment of negative concentrations
!-----------------------------------------------------------------------
ln_trcrad = .true. ! artificially correct negative concentrations (T) or not (F)
ln_trcrad = .true., ! artificially correct negative concentrations (T) or not (F)
/
!-----------------------------------------------------------------------
&namtrc_snk ! Sedimentation of particles
......@@ -102,7 +102,7 @@
!-----------------------------------------------------------------------
&namtrc_dcy ! Diurnal cycle
!-----------------------------------------------------------------------
ln_trcdc2dm = .false. ! Diurnal cycle for TOP
ln_trcdc2dm = .false., ! Diurnal cycle for TOP
/
!-----------------------------------------------------------------------
&namtrc_opt ! light availability in the water column
......@@ -111,7 +111,7 @@
! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename !
sn_par = 'par.orca' , 24 , 'fr_par' , .true. , .true. , 'yearly' , '' , '' , ''
cn_dir = './' ! root directory for the location of the dynamical files
ln_varpar = .true. ! Read PAR from file
ln_varpar = .true., ! Read PAR from file
parlux = 0.43 ! Fraction of shortwave as PAR
light_loc = 'center' ! Light location in the water cell ('center', 'integral')
/
......@@ -138,8 +138,8 @@
nn_trd_trc = 5475 ! time step frequency and tracers trends
nn_ctls_trc = 0 ! control surface type in mixed-layer trends (0,1 or n<jpk)
rn_ucf_trc = 1 ! unit conversion factor (=1 -> /seconds ; =86400. -> /day)
ln_trdmld_trc_restart = .false. ! restart for ML diagnostics
ln_trdmld_trc_instant = .true. ! flag to diagnose trends of instantantaneous or mean ML T/S
ln_trdmld_trc_restart = .false.,! restart for ML diagnostics
ln_trdmld_trc_instant = .true., ! flag to diagnose trends of instantantaneous or mean ML T/S
ln_trdtrc( 1) = .true.
ln_trdtrc( 2) = .true.
ln_trdtrc(23) = .true.
......@@ -158,7 +158,7 @@
cn_dir_sbc = './' ! root directory for the location of SURFACE data files
cn_dir_cbc = './' ! root directory for the location of COASTAL data files
cn_dir_obc = './' ! root directory for the location of OPEN data files
ln_rnf_ctl = .false. ! Remove runoff dilution on tracers with absent river load
ln_rnf_ctl = .false., ! Remove runoff dilution on tracers with absent river load
rn_sbc_time = 86400. ! Time scaling factor for SBC data (seconds in a day)
rn_cbc_time = 86400. ! Time scaling factor for CBC data (seconds in a day)
! cn_tronam(1) = 'var1' ! Tracer-name to variable-name translation
......@@ -173,7 +173,7 @@
! = 0 NO damping of tracers at open boudaries
! = 1 Only for tracers forced with external data
! = 2 Damping applied to all tracers
ln_zintobc = .false. ! T if a vertical interpolation is required. Variables gdep[t] and e3[t] must exist in the file
ln_zintobc = .false., ! T if a vertical interpolation is required. Variables gdep[t] and e3[t] must exist in the file
! automatically defined to T if the number of vertical levels in bdy dta /= jpk
/
!-----------------------------------------------------------------------
......
......@@ -241,6 +241,7 @@ MODULE ice
REAL(wp), PUBLIC :: rn_hpnd !: prescribed pond depth (0<rn_hpnd<1)
LOGICAL, PUBLIC :: ln_pnd_lids !: Allow ponds to have frozen lids
LOGICAL , PUBLIC :: ln_pnd_alb !: melt ponds affect albedo
INTEGER , PUBLIC :: nn_pnd_brsal !: brine salinity formulation 0 = Consistent expression with SI3 (linear liquidus) ; 1 = used in GOSI9
! !!** ice-diagnostics namelist (namdia) **
LOGICAL , PUBLIC :: ln_icediachk !: flag for ice diag (T) or not (F)
......@@ -452,6 +453,11 @@ MODULE ice
REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qcn_ice_top !: Surface conduction flux (W/m2)
!
!!----------------------------------------------------------------------
!! * Only for atmospheric coupling
!!----------------------------------------------------------------------
REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: a_i_last_couple !: Ice fractional area at last coupling time
!
!!----------------------------------------------------------------------
!! NEMO/ICE 4.0 , NEMO Consortium (2018)
!! $Id: ice.F90 15388 2021-10-17 11:33:47Z clem $
!! Software governed by the CeCILL license (see ./LICENSE)
......@@ -550,6 +556,10 @@ CONTAINS
ii = ii + 1
ALLOCATE( t_si(jpi,jpj,jpl) , tm_si(jpi,jpj) , qcn_ice_bot(jpi,jpj,jpl) , qcn_ice_top(jpi,jpj,jpl) , STAT = ierr(ii) )
! * For atmospheric coupling
ii = ii + 1
ALLOCATE( a_i_last_couple(jpi,jpj,jpl) , STAT=ierr(ii) )
ice_alloc = MAXVAL( ierr(:) )
IF( ice_alloc /= 0 ) CALL ctl_stop( 'STOP', 'ice_alloc: failed to allocate arrays.' )
!
......
This diff is collapsed.
......@@ -26,6 +26,7 @@ MODULE icerst
!
USE in_out_manager ! I/O manager
USE iom ! I/O manager library
USE ioipsl , ONLY : ju2ymds ! for calendar
USE lib_mpp ! MPP library
USE lib_fortran ! fortran utilities (glob_sum + no signed zero)
......@@ -51,6 +52,9 @@ CONTAINS
!!----------------------------------------------------------------------
INTEGER, INTENT(in) :: kt ! number of iteration
!
INTEGER :: iyear, imonth, iday
REAL (wp) :: zsec
REAL (wp) :: zfjulday
CHARACTER(len=20) :: clkt ! ocean time-step define as a character
CHARACTER(len=50) :: clname ! ice output restart file name
CHARACTER(len=256) :: clpath ! full path to ice output restart file
......@@ -67,8 +71,15 @@ CONTAINS
& .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN
IF( nitrst <= nitend .AND. nitrst > 0 ) THEN
! beware of the format used to write kt (default is i8.8, that should be large enough...)
IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst
ELSE ; WRITE(clkt, '(i8.8)') nitrst
IF ( ln_rstdate ) THEN
zfjulday = fjulday + (2*nn_fsbc+1)*rdt / rday
IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday ) zfjulday = REAL(NINT(zfjulday),wp) ! avoid truncation error
CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec )
WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday
ELSE
IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst
ELSE ; WRITE(clkt, '(i8.8)') nitrst
ENDIF
ENDIF
! create the file
clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out)
......@@ -313,6 +324,11 @@ CONTAINS
ENDIF
ENDIF
! If this is a coupled model we need to pick up a_i for use as a_i_last_couple
IF (ln_cpl) then
a_i_last_couple = a_i
ENDIF
IF(.NOT.lrxios) CALL iom_delay_rst( 'READ', 'ICE', numrir ) ! read only ice delayed global communication variables
! ! ---------------------------------- !
ELSE ! == case of a simplified restart == !
......
......@@ -275,7 +275,7 @@ CONTAINS
CALL ice_istate( nit000, Kbb, Kmm, Kaa ) ! start from rest or read a file
ENDIF
CALL ice_var_glo2eqv
CALL ice_var_agg(1)
CALL ice_var_agg(2)
!
CALL ice_dyn_init ! set ice dynamics parameters
!
......
......@@ -32,14 +32,15 @@ MODULE icetab
!!----------------------------------------------------------------------
CONTAINS
SUBROUTINE tab_3d_2d( ndim1d, tab_ind, tab1d, tab2d )
SUBROUTINE tab_3d_2d( ndim1d, tab_ind, tab2d, tab3d )
!!----------------------------------------------------------------------
!! *** ROUTINE tab_2d_1d ***
!! *** ROUTINE tab_3d_2d ***
!!----------------------------------------------------------------------
INTEGER , INTENT(in ) :: ndim1d ! 1d size
INTEGER , DIMENSION(ndim1d) , INTENT(in ) :: tab_ind ! input index
REAL(wp), DIMENSION(jpi,jpj,jpl), INTENT(in ) :: tab2d ! input 2D field
REAL(wp), DIMENSION(ndim1d,jpl) , INTENT(inout) :: tab1d ! output 1D field
REAL(wp), DIMENSION(jpi,jpj,jpl), INTENT(in ) :: tab3d ! input 3D field
REAL(wp), DIMENSION(ndim1d,jpl) , INTENT(inout) :: tab2d ! output 2D field
!
INTEGER :: jl, jn, jid, jjd
!!----------------------------------------------------------------------
......@@ -47,7 +48,7 @@ CONTAINS
DO jn = 1, ndim1d
jid = MOD( tab_ind(jn) - 1 , jpi ) + 1
jjd = ( tab_ind(jn) - 1 ) / jpi + 1
tab1d(jn,jl) = tab2d(jid,jjd,jl)
tab2d(jn,jl) = tab3d(jid,jjd,jl)
END DO
END DO
END SUBROUTINE tab_3d_2d
......@@ -72,14 +73,14 @@ CONTAINS
END SUBROUTINE tab_2d_1d
SUBROUTINE tab_2d_3d( ndim1d, tab_ind, tab1d, tab2d )
SUBROUTINE tab_2d_3d( ndim1d, tab_ind, tab2d, tab3d )
!!----------------------------------------------------------------------
!! *** ROUTINE tab_2d_1d ***
!! *** ROUTINE tab_2d_3d ***
!!----------------------------------------------------------------------
INTEGER , INTENT(in ) :: ndim1d ! 1D size
INTEGER , DIMENSION(ndim1d) , INTENT(in ) :: tab_ind ! input index
REAL(wp), DIMENSION(ndim1d,jpl) , INTENT(in ) :: tab1d ! input 1D field
REAL(wp), DIMENSION(jpi,jpj,jpl), INTENT(inout) :: tab2d ! output 2D field
REAL(wp), DIMENSION(ndim1d,jpl) , INTENT(in ) :: tab2d ! input 2D field
REAL(wp), DIMENSION(jpi,jpj,jpl), INTENT(inout) :: tab3d ! output 3D field
!
INTEGER :: jl, jn, jid, jjd
!!----------------------------------------------------------------------
......@@ -87,7 +88,7 @@ CONTAINS
DO jn = 1, ndim1d
jid = MOD( tab_ind(jn) - 1 , jpi ) + 1
jjd = ( tab_ind(jn) - 1 ) / jpi + 1
tab2d(jid,jjd,jl) = tab1d(jn,jl)
tab3d(jid,jjd,jl) = tab2d(jn,jl)
END DO
END DO
END SUBROUTINE tab_2d_3d
......
......@@ -192,8 +192,8 @@ CONTAINS
! Snow melting
! ------------
! If heat still available (zq_top > 0)
! then all snw precip has been melted and we need to melt more snow
! Melt snow layers, starting with newly fallen snow layer 0
! and moving downward, until zq_top=0
DO jk = 0, nlay_s
DO ji = 1, npti
IF( zh_s(ji,jk) > 0._wp .AND. zq_top(ji) > 0._wp ) THEN
......@@ -216,10 +216,10 @@ CONTAINS
END DO
END DO
! Snow sublimation
!-----------------
! qla_ice is always >=0 (upwards), heat goes to the atmosphere, therefore snow sublimates
! comment: not counted in mass/heat exchange in iceupdate.F90 since this is an exchange with atm. (not ocean)
! Snow sublimation and deposition
!--------------------------------
! when evap_ice_1d > 0 (upwards) snow sublimates and snow thickness decreases
! when evap_ice_1d < 0 (downwards) deposition occurs and snow thickness increases
zdeltah (1:npti) = 0._wp ! total snow thickness that sublimates, < 0
zevap_rema(1:npti) = 0._wp
DO ji = 1, npti
......
......@@ -140,10 +140,10 @@ CONTAINS
!------------------------------------
! Diagnostics
!------------------------------------
CALL iom_put( 'dvpn_mlt', diag_dvpn_mlt ) ! input from melting
CALL iom_put( 'dvpn_lid', diag_dvpn_lid ) ! exchanges with lid
CALL iom_put( 'dvpn_drn', diag_dvpn_drn ) ! vertical drainage
CALL iom_put( 'dvpn_rnf', diag_dvpn_rnf ) ! runoff + overflow
IF( iom_use('dvpn_mlt' ) ) CALL iom_put( 'dvpn_mlt', diag_dvpn_mlt ) ! input from melting
IF( iom_use('dvpn_lid' ) ) CALL iom_put( 'dvpn_lid', diag_dvpn_lid ) ! exchanges with lid
IF( iom_use('dvpn_drn' ) ) CALL iom_put( 'dvpn_drn', diag_dvpn_drn ) ! vertical drainage
IF( iom_use('dvpn_rnf' ) ) CALL iom_put( 'dvpn_rnf', diag_dvpn_rnf ) ! runoff + overflow
!
DEALLOCATE( diag_dvpn_mlt , diag_dvpn_lid , diag_dvpn_drn , diag_dvpn_rnf )
DEALLOCATE( diag_dvpn_mlt_1d, diag_dvpn_lid_1d, diag_dvpn_drn_1d, diag_dvpn_rnf_1d )
......@@ -544,7 +544,7 @@ CONTAINS
! a_ip -> apond
! a_ip_frac -> apnd
CALL ctl_stop( 'STOP', 'icethd_pnd : topographic melt ponds are still an ongoing work' )
!CALL ctl_stop( 'STOP', 'icethd_pnd : topographic melt ponds are still an ongoing work' )
!---------------------------------------------------------------
! Initialise
......@@ -644,12 +644,6 @@ CONTAINS
!--------------------------
! Pond lid growth and melt
!--------------------------
! Mean surface temperature
zTavg = 0._wp
DO jl = 1, jpl
zTavg = zTavg + t_su(ji,jj,jl)*a_i(ji,jj,jl)
END DO
zTavg = zTavg / a_i(ji,jj,jl) !!! could get a division by zero here
DO jl = 1, jpl-1
......@@ -692,8 +686,8 @@ CONTAINS
! differential growth of base of surface floating ice layer
zdTice = MAX( - ( t_su(ji,jj,jl) - zTd ) , 0._wp ) ! > 0
zomega = rcnd_i * zdTice / zrhoi_L
zdHui = SQRT( 2._wp * zomega * rDt_ice + ( v_il(ji,jj,jl) / a_i(ji,jj,jl) )**2 ) &
- v_il(ji,jj,jl) / a_i(ji,jj,jl)
zdHui = SQRT( 2._wp * zomega * rDt_ice + ( v_il(ji,jj,jl) / a_ip(ji,jj,jl) )**2 ) &
- v_il(ji,jj,jl) / a_ip(ji,jj,jl)
zdvice = min( zdHui*a_ip(ji,jj,jl) , v_ip(ji,jj,jl) )
IF ( zdvice > epsi10 ) THEN
......@@ -1319,7 +1313,9 @@ CONTAINS
!-----------------------------------------------------------------
! brine salinity and liquid fraction
!-----------------------------------------------------------------
SELECT CASE( nn_pnd_brsal )
CASE( 0 )
DO k = 1, nlay_i
Sbr = - Tin(k) / rTmlt ! Consistent expression with SI3 (linear liquidus)
......@@ -1328,6 +1324,16 @@ CONTAINS
phi(k) = salin(k) / Sbr
END DO
CASE( 1 )
DO k = 1, nlay_i
Sbr = - 18.7 * Tin(k) - 0.519 * Tin(k)**2 - 0.00535 * Tin(k) **3
phi(k) = salin(k) / Sbr
END DO
END SELECT
!-----------------------------------------------------------------
! permeability
......@@ -1354,7 +1360,7 @@ CONTAINS
NAMELIST/namthd_pnd/ ln_pnd, ln_pnd_LEV , rn_apnd_min, rn_apnd_max, rn_pnd_flush, &
& ln_pnd_CST , rn_apnd, rn_hpnd, &
& ln_pnd_TOPO, &
& ln_pnd_lids, ln_pnd_alb
& ln_pnd_lids, ln_pnd_alb, nn_pnd_brsal
!!-------------------------------------------------------------------
!
READ ( numnam_ice_ref, namthd_pnd, IOSTAT = ios, ERR = 901)
......@@ -1379,6 +1385,7 @@ CONTAINS
WRITE(numout,*) ' Prescribed pond depth rn_hpnd = ', rn_hpnd
WRITE(numout,*) ' Frozen lids on top of melt ponds ln_pnd_lids = ', ln_pnd_lids
WRITE(numout,*) ' Melt ponds affect albedo or not ln_pnd_alb = ', ln_pnd_alb
WRITE(numout,*) ' Brine salinity formulation nn_pnd_brsal = ', nn_pnd_brsal
ENDIF
!
! !== set the choice of ice pond scheme ==!
......
......@@ -939,7 +939,7 @@ CONTAINS
ELSE
cnd_ice_1d(ji) = 2._wp * ztcond_i(ji,0) / zhi_ssl ! cnd_ice is capped by: cond_i/zhi_ssl
ENDIF
t1_ice_1d(ji) = isnow(ji) * t_s_1d(ji,1) + ( 1._wp - isnow(ji) ) * t_i_1d(ji,1)
t1_ice_1d(ji) = isnow_comb(ji) * t_s_1d(ji,1) + ( 1._wp - isnow_comb(ji) ) * t_i_1d(ji,1)
END DO
!
IF( k_cnd == np_cnd_EMU ) THEN
......
......@@ -103,7 +103,7 @@ CONTAINS
IF( iom_use('icethic' ) ) CALL iom_put( 'icethic', hm_i * zmsk00 ) ! ice thickness
IF( iom_use('snwthic' ) ) CALL iom_put( 'snwthic', hm_s * zmsk00 ) ! snw thickness
IF( iom_use('icebrv' ) ) CALL iom_put( 'icebrv' , bvm_i* 100. * zmsk00 ) ! brine volume
IF( iom_use('iceage' ) ) CALL iom_put( 'iceage' , om_i / rday * zmsk15 + zmiss_val * ( 1._wp - zmsk15 ) ) ! ice age
IF( iom_use('iceage' ) ) CALL iom_put( 'iceage' , om_i / rday * zmsk15 ) ! ice age
IF( iom_use('icehnew' ) ) CALL iom_put( 'icehnew', ht_i_new ) ! new ice thickness formed in the leads
IF( iom_use('snwvolu' ) ) CALL iom_put( 'snwvolu', vt_s * zmsksn ) ! snow volume
IF( iom_use('icefrb' ) ) THEN ! Ice freeboard
......@@ -118,14 +118,15 @@ CONTAINS
IF( iom_use('icehlid' ) ) CALL iom_put( 'icehlid', hm_il * zmsk00 ) ! melt pond lid depth
IF( iom_use('icevlid' ) ) CALL iom_put( 'icevlid', vt_il * zmsk00 ) ! melt pond lid total volume per unit area
! salt
IF( iom_use('icesalt' ) ) CALL iom_put( 'icesalt', sm_i * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) ! mean ice salinity
IF( iom_use('icesalt' ) ) CALL iom_put( 'icesalt', sm_i * zmsk00 ) ! mean ice salinity
IF( iom_use('icesalm' ) ) CALL iom_put( 'icesalm', st_i * rhoi * 1.0e-3 * zmsk00 ) ! Mass of salt in sea ice per cell area
IF( iom_use('iceepnd' ) ) CALL iom_put( 'iceepnd', SUM( a_ip_eff * a_i, dim=3 ) * zmsk00 ) ! melt pond total effective fraction per cell area
! heat
IF( iom_use('icetemp' ) ) CALL iom_put( 'icetemp', ( tm_i - rt0 ) * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) ! ice mean temperature
IF( iom_use('snwtemp' ) ) CALL iom_put( 'snwtemp', ( tm_s - rt0 ) * zmsksn + zmiss_val * ( 1._wp - zmsksn ) ) ! snw mean temperature
IF( iom_use('icettop' ) ) CALL iom_put( 'icettop', ( tm_su - rt0 ) * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) ! temperature at the ice surface
IF( iom_use('icetbot' ) ) CALL iom_put( 'icetbot', ( t_bo - rt0 ) * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) ! temperature at the ice bottom
IF( iom_use('icetsni' ) ) CALL iom_put( 'icetsni', ( tm_si - rt0 ) * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) ! temperature at the snow-ice interface
IF( iom_use('icetemp' ) ) CALL iom_put( 'icetemp', ( tm_i - rt0 ) * zmsk00 ) ! ice mean temperature
IF( iom_use('snwtemp' ) ) CALL iom_put( 'snwtemp', ( tm_s - rt0 ) * zmsksn ) ! snw mean temperature
IF( iom_use('icettop' ) ) CALL iom_put( 'icettop', ( tm_su - rt0 ) * zmsk00 ) ! temperature at the ice surface
IF( iom_use('icetbot' ) ) CALL iom_put( 'icetbot', ( t_bo - rt0 ) * zmsk00 ) ! temperature at the ice bottom
IF( iom_use('icetsni' ) ) CALL iom_put( 'icetsni', ( tm_si - rt0 ) * zmsk00 ) ! temperature at the snow-ice interface
IF( iom_use('icehc' ) ) CALL iom_put( 'icehc' , -et_i * zmsk00 ) ! ice heat content
IF( iom_use('snwhc' ) ) CALL iom_put( 'snwhc' , -et_s * zmsksn ) ! snow heat content
! momentum
......@@ -169,16 +170,16 @@ CONTAINS
! --- category-dependent fields --- !
IF( iom_use('icemask_cat' ) ) CALL iom_put( 'icemask_cat' , zmsk00l ) ! ice mask 0%
IF( iom_use('iceconc_cat' ) ) CALL iom_put( 'iceconc_cat' , a_i * zmsk00l ) ! area for categories
IF( iom_use('icethic_cat' ) ) CALL iom_put( 'icethic_cat' , h_i * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! thickness for categories
IF( iom_use('snwthic_cat' ) ) CALL iom_put( 'snwthic_cat' , h_s * zmsksnl + zmiss_val * ( 1._wp - zmsksnl ) ) ! snow depth for categories
IF( iom_use('icesalt_cat' ) ) CALL iom_put( 'icesalt_cat' , s_i * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! salinity for categories
IF( iom_use('iceage_cat' ) ) CALL iom_put( 'iceage_cat' , o_i / rday * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! ice age
IF( iom_use('icethic_cat' ) ) CALL iom_put( 'icethic_cat' , h_i * zmsk00l ) ! thickness for categories
IF( iom_use('snwthic_cat' ) ) CALL iom_put( 'snwthic_cat' , h_s * zmsksnl ) ! snow depth for categories
IF( iom_use('icesalt_cat' ) ) CALL iom_put( 'icesalt_cat' , s_i * zmsk00l ) ! salinity for categories
IF( iom_use('iceage_cat' ) ) CALL iom_put( 'iceage_cat' , o_i / rday * zmsk00l ) ! ice age
IF( iom_use('icetemp_cat' ) ) CALL iom_put( 'icetemp_cat' , ( SUM( t_i, dim=3 ) * r1_nlay_i - rt0 ) &
& * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! ice temperature
& * zmsk00l ) ! ice temperature
IF( iom_use('snwtemp_cat' ) ) CALL iom_put( 'snwtemp_cat' , ( SUM( t_s, dim=3 ) * r1_nlay_s - rt0 ) &
& * zmsksnl + zmiss_val * ( 1._wp - zmsksnl ) ) ! snow temperature
IF( iom_use('icettop_cat' ) ) CALL iom_put( 'icettop_cat' , ( t_su - rt0 ) * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! surface temperature
IF( iom_use('icebrv_cat' ) ) CALL iom_put( 'icebrv_cat' , bv_i * 100. * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! brine volume
& * zmsksnl ) ! snow temperature
IF( iom_use('icettop_cat' ) ) CALL iom_put( 'icettop_cat' , ( t_su - rt0 ) * zmsk00l ) ! surface temperature
IF( iom_use('icebrv_cat' ) ) CALL iom_put( 'icebrv_cat' , bv_i * 100. * zmsk00l ) ! brine volume
IF( iom_use('iceapnd_cat' ) ) CALL iom_put( 'iceapnd_cat' , a_ip * zmsk00l ) ! melt pond frac for categories
IF( iom_use('icevpnd_cat' ) ) CALL iom_put( 'icevpnd_cat' , v_ip * zmsk00l ) ! melt pond volume for categories
IF( iom_use('icehpnd_cat' ) ) CALL iom_put( 'icehpnd_cat' , h_ip * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! melt pond thickness for categories
......
......@@ -15,6 +15,7 @@ MODULE diahth
USE oce ! ocean dynamics and tracers
USE dom_oce ! ocean space and time domain
USE phycst ! physical constants
USE zdfmxl, ONLY: zdf_mxl_zint
!
USE in_out_manager ! I/O manager
USE lib_mpp ! MPP library
......@@ -292,6 +293,9 @@ CONTAINS
!
ENDIF
! Vertically-interpolated mixed-layer depth diagnostic
CALL zdf_mxl_zint( kt, Kmm )
!
IF( ln_timing ) CALL timing_stop('dia_hth')
!
......
MODULE diaprod
! Requires key_iom_put
# if defined key_xios
!!======================================================================
!! *** MODULE diaprod ***
!! Ocean diagnostics : write ocean product diagnostics
!!=====================================================================
!! History : 3.4 ! 2012 (D. Storkey) Original code
!! 4.0 ! 2019 (D. Storkey)
!!----------------------------------------------------------------------
!!----------------------------------------------------------------------
!! dia_prod : calculate and write out product diagnostics
!!----------------------------------------------------------------------
USE oce ! ocean dynamics and tracers
USE dom_oce ! ocean space and time domain
USE domvvl ! for thickness weighted diagnostics if key_vvl
USE eosbn2 ! equation of state (eos call)
USE phycst ! physical constants
USE lbclnk ! ocean lateral boundary conditions (or mpp link)
USE in_out_manager ! I/O manager
USE iom
USE ioipsl
USE lib_mpp ! MPP library
USE timing ! preformance summary
IMPLICIT NONE
PRIVATE
PUBLIC dia_prod ! routines called by step.F90
!! * Substitutions
# include "do_loop_substitute.h90"
!!----------------------------------------------------------------------
!! NEMO/OPA 3.4 , NEMO Consortium (2012)
!! $Id$
!! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
!!----------------------------------------------------------------------
CONTAINS
SUBROUTINE dia_prod( kt, Kmm )
!!---------------------------------------------------------------------
!! *** ROUTINE dia_prod ***
!!
!! ** Purpose : Write out product diagnostics (uT, vS etc.)
!!
!! ** Method : use iom_put
!! Product diagnostics are not thickness-weighted in this routine.
!! They should be thickness-weighted using XIOS if key_vvl is set.
!!----------------------------------------------------------------------
!!
INTEGER, INTENT( in ) :: kt ! ocean time-step index
INTEGER, INTENT( in ) :: Kmm ! ocean time level index
!!
INTEGER :: ji, jj, jk ! dummy loop indices
REAL(wp) :: zztmp, zztmpx, zztmpy !
!!
REAL(wp), POINTER, DIMENSION(:,:) :: z2d ! 2D workspace
REAL(wp), POINTER, DIMENSION(:,:,:) :: z3d ! 3D workspace
REAL(wp), POINTER, DIMENSION(:,:,:) :: zrhop ! potential density
!!----------------------------------------------------------------------
!
IF( ln_timing ) CALL timing_start('dia_prod')
!
ALLOCATE( z2d(jpi,jpj), z3d(jpi,jpj,jpk), zrhop(jpi,jpj,jpk) )
!
IF( iom_use("urhop") .OR. iom_use("vrhop") .OR. iom_use("wrhop") &
#if ! defined key_diaar5
& .OR. iom_use("rhop") &
#endif
& ) THEN
CALL eos( ts(:,:,:,:,Kmm), z3d, zrhop ) ! now in situ and potential density
zrhop(:,:,:) = zrhop(:,:,:)-1000.e0 ! reference potential density to 1000 to avoid precision issues in rhop2 calculation
zrhop(:,:,jpk) = 0._wp
#if ! defined key_diaar5
CALL iom_put( 'rhop', zrhop )
#else
! If key_diaar5 set then there is already an iom_put call to output rhop.
! Really should be a standard diagnostics option?
#endif
ENDIF
IF( iom_use("ut") ) THEN
z3d(:,:,:) = 0.e0
DO_3D( 0, 0, 0, 0, 1, jpk )
z3d(ji,jj,jk) = uu(ji,jj,jk,Kmm) * 0.5 * ( ts(ji,jj,jk,jp_tem,Kmm) + ts(ji+1,jj,jk,jp_tem,Kmm) )
END_3D
CALL iom_put( "ut", z3d ) ! product of temperature and zonal velocity at U points
ENDIF
IF( iom_use("vt") ) THEN
z3d(:,:,:) = 0.e0
DO_3D( 0, 0, 0, 0, 1, jpk )
z3d(ji,jj,jk) = vv(ji,jj,jk,Kmm) * 0.5 * ( ts(ji,jj,jk,jp_tem,Kmm) + ts(ji,jj+1,jk,jp_tem,Kmm) )
END_3D
CALL iom_put( "vt", z3d ) ! product of temperature and meridional velocity at V points
ENDIF
IF( iom_use("wt") ) THEN
z3d(:,:,:) = 0.e0
DO_2D( 0, 0, 0, 0 )
z3d(ji,jj,1) = ww(ji,jj,1) * ts(ji,jj,1,jp_tem,Kmm)
END_2D
DO_3D( 0, 0, 0, 0, 1, jpk )
z3d(ji,jj,jk) = ww(ji,jj,jk) * 0.5 * ( ts(ji,jj,jk-1,jp_tem,Kmm) + ts(ji,jj,jk,jp_tem,Kmm) )
END_3D
CALL iom_put( "wt", z3d ) ! product of temperature and vertical velocity at W points
ENDIF
IF( iom_use("us") ) THEN
z3d(:,:,:) = 0.e0
DO_3D( 0, 0, 0, 0, 1, jpk )
z3d(ji,jj,jk) = uu(ji,jj,jk,Kmm) * 0.5 * ( ts(ji,jj,jk,jp_sal,Kmm) + ts(ji+1,jj,jk,jp_sal,Kmm) )
END_3D
CALL iom_put( "us", z3d ) ! product of salinity and zonal velocity at U points
ENDIF
IF( iom_use("vs") ) THEN
z3d(:,:,:) = 0.e0
DO_3D( 0, 0, 0, 0, 1, jpk )
z3d(ji,jj,jk) = vv(ji,jj,jk,Kmm) * 0.5 * ( ts(ji,jj,jk,jp_sal,Kmm) + ts(ji,jj+1,jk,jp_sal,Kmm) )
END_3D
CALL iom_put( "vs", z3d ) ! product of salinity and meridional velocity at V points
ENDIF
IF( iom_use("ws") ) THEN
z3d(:,:,:) = 0.e0
DO_2D( 0, 0, 0, 0 )
z3d(ji,jj,1) = ww(ji,jj,1) * ts(ji,jj,1,jp_sal,Kmm)
END_2D
DO_3D( 0, 0, 0, 0, 1, jpk )
z3d(ji,jj,jk) = ww(ji,jj,jk) * 0.5 * ( ts(ji,jj,jk-1,jp_sal,Kmm) + ts(ji,jj,jk,jp_sal,Kmm) )
END_3D
CALL iom_put( "ws", z3d ) ! product of salinity and vertical velocity at W points
ENDIF
IF( iom_use("uv") ) THEN
z3d(:,:,:) = 0.e0
DO_3D( 0, 0, 0, 0, 1, jpk )
z3d(ji,jj,jk) = 0.25 * ( uu(ji-1,jj,jk,Kmm) + uu(ji,jj,jk,Kmm) ) * ( vv(ji,jj-1,jk,Kmm) + vv(ji,jj,jk,Kmm) )
END_3D
CALL iom_put( "uv", z3d ) ! product of zonal velocity and meridional velocity at T points
ENDIF
IF( iom_use("uw") ) THEN
z3d(:,:,:) = 0.e0
DO_2D( 0, 0, 0, 0 )
z3d(ji,jj,1) = 0.5 * ( ww(ji,jj,1) + ww(ji+1,jj,1) ) * uu(ji,jj,1,Kmm)
END_2D
DO_3D( 0, 0, 0, 0, 1, jpk )
z3d(ji,jj,jk) = 0.25 * ( ww(ji,jj,jk) + ww(ji+1,jj,jk) ) * ( uu(ji,jj,jk-1,Kmm) + uu(ji,jj,jk,Kmm) )
END_3D
CALL iom_put( "uw", z3d ) ! product of zonal velocity and vertical velocity at UW points
ENDIF
IF( iom_use("vw") ) THEN
z3d(:,:,:) = 0.e0
DO_2D( 0, 0, 0, 0 )
z3d(ji,jj,1) = 0.5 * ( ww(ji,jj,1) + ww(ji,jj+1,1) ) * vv(ji,jj,1,Kmm)
END_2D
DO_3D( 0, 0, 0, 0, 1, jpk )
z3d(ji,jj,jk) = 0.25 * ( ww(ji,jj,jk) + ww(ji,jj+1,jk) ) * ( vv(ji,jj,jk-1,Kmm) + vv(ji,jj,jk,Kmm) )
END_3D
CALL iom_put( "vw", z3d ) ! product of meriodional velocity and vertical velocity at VW points
ENDIF
IF( iom_use("urhop") ) THEN
z3d(:,:,:) = 0.e0
DO_3D( 0, 0, 0, 0, 1, jpk )
z3d(ji,jj,jk) = uu(ji,jj,jk,Kmm) * 0.5 * ( zrhop(ji,jj,jk) + zrhop(ji+1,jj,jk) )
END_3D
CALL iom_put( "urhop", z3d ) ! product of density and zonal velocity at U points
ENDIF
IF( iom_use("vrhop") ) THEN
z3d(:,:,:) = 0.e0
DO_3D( 0, 0, 0, 0, 1, jpk )
z3d(ji,jj,jk) = vv(ji,jj,jk,Kmm) * 0.5 * ( zrhop(ji,jj,jk) + zrhop(ji,jj+1,jk) )
END_3D
CALL iom_put( "vrhop", z3d ) ! product of density and meridional velocity at V points
ENDIF
IF( iom_use("wrhop") ) THEN
z3d(:,:,:) = 0.e0
DO_2D( 0, 0, 0, 0 )
z3d(ji,jj,1) = ww(ji,jj,1) * zrhop(ji,jj,1)
END_2D
DO_3D( 0, 0, 0, 0, 1, jpk )
z3d(ji,jj,jk) = ww(ji,jj,jk) * 0.5 * ( zrhop(ji,jj,jk-1) + zrhop(ji,jj,jk) )
END_3D
CALL iom_put( "wrhop", z3d ) ! product of density and vertical velocity at W points
ENDIF
!
DEALLOCATE( z2d, z3d, zrhop )
!
IF( ln_timing ) CALL timing_stop('dia_prod')
!
END SUBROUTINE dia_prod
#else
!!----------------------------------------------------------------------
!! Default option : NO diaprod
!!----------------------------------------------------------------------
LOGICAL, PUBLIC, PARAMETER :: lk_diaprod = .FALSE. ! coupled flag
CONTAINS
SUBROUTINE dia_prod( kt , Kmm) ! Empty routine
INTEGER :: kt, Kmm
!WRITE(*,*) 'dia_prod: You should not have seen this print! error?', kt
END SUBROUTINE dia_prod
#endif
!!======================================================================
END MODULE diaprod
......@@ -46,6 +46,7 @@ MODULE diawri
USE zdf_oce ! ocean vertical physics
USE zdfdrg ! ocean vertical physics: top/bottom friction
USE zdfmxl ! mixed layer
USE zdftke , ONLY: htau
USE zdfosm ! mixed layer
!
USE lbclnk ! ocean lateral boundary conditions (or mpp link)
......@@ -53,6 +54,7 @@ MODULE diawri
USE dia25h ! 25h Mean output
USE iom !
USE ioipsl !
USE eosbn2
#if defined key_si3
USE ice
......@@ -124,9 +126,33 @@ CONTAINS
REAL(wp):: ze3
REAL(wp), DIMENSION(A2D( 0)) :: z2d ! 2D workspace
REAL(wp), DIMENSION(A2D(nn_hls),jpk) :: z3d ! 3D workspace
CHARACTER(len=4),SAVE :: ttype , stype ! temperature and salinity type
!!----------------------------------------------------------------------
!
IF( ln_timing ) CALL timing_start('dia_wri')
!
IF( kt == nit000 ) THEN
IF( ln_TEOS10 ) THEN
IF ( iom_use("toce_pot") .OR. iom_use("soce_pra") .OR. iom_use("sst_pot") .OR. iom_use("sss_pra") &
& .OR. iom_use("sbt_pot") .OR. iom_use("sbs_pra") .OR. iom_use("sstgrad_pot") .OR. iom_use("sstgrad2_pot") &
& .OR. iom_use("tosmint_pot") .OR. iom_use("somint_pra")) THEN
CALL ctl_stop( 'diawri: potential temperature and practical salinity not available with ln_TEOS10' )
ELSE
ttype='con' ; stype='abs' ! teos-10 using conservative temperature and absolute salinity
ENDIF
ELSE IF ( ln_SEOS) THEN
ttype='seos' ; stype='seos' ! seos using Simplified Equation of state
ELSE
IF ( iom_use("toce_con") .OR. iom_use("soce_abs") .OR. iom_use("sst_con") .OR. iom_use("sss_abs") &
& .OR. iom_use("sbt_con") .OR. iom_use("sbs_abs") .OR. iom_use("sstgrad_con") .OR. iom_use("sstgrad2_con") &
& .OR. iom_use("tosmint_con") .OR. iom_use("somint_abs")) THEN
CALL ctl_stop( 'diawri: conservative temperature and absolute salinity not available with ln_EOS80' )
ELSE
ttype='pot' ; stype='pra' ! eos-80 using potential temperature and practical salinity
ENDIF
ENDIF
ENDIF
!
! Output the initial state and forcings
IF( ninist == 1 ) THEN
......@@ -207,25 +233,25 @@ CONTAINS
#endif
! --- tracers T&S --- !
CALL iom_put( "toce", ts(:,:,:,jp_tem,Kmm) ) ! 3D temperature
CALL iom_put( "sst", ts(:,:,1,jp_tem,Kmm) ) ! surface temperature
CALL iom_put( "toce_"//ttype, ts(:,:,:,jp_tem,Kmm) ) ! 3D temperature
CALL iom_put( "sst_"//ttype, ts(:,:,1,jp_tem,Kmm) ) ! surface temperature
IF ( iom_use("sbt") ) THEN
IF ( iom_use("sbt_"//ttype) ) THEN
DO_2D( 0, 0, 0, 0 )
ikbot = mbkt(ji,jj)
z2d(ji,jj) = ts(ji,jj,ikbot,jp_tem,Kmm)
END_2D
CALL iom_put( "sbt", z2d ) ! bottom temperature
CALL iom_put( "sbt_"//ttype, z2d ) ! bottom temperature
ENDIF
CALL iom_put( "soce", ts(:,:,:,jp_sal,Kmm) ) ! 3D salinity
CALL iom_put( "sss", ts(:,:,1,jp_sal,Kmm) ) ! surface salinity
IF ( iom_use("sbs") ) THEN
CALL iom_put( "soce_"//stype, ts(:,:,:,jp_sal,Kmm) ) ! 3D salinity
CALL iom_put( "sss_"//stype, ts(:,:,1,jp_sal,Kmm) ) ! surface salinity
IF ( iom_use("sbs_"//stype) ) THEN
DO_2D( 0, 0, 0, 0 )
ikbot = mbkt(ji,jj)
z2d(ji,jj) = ts(ji,jj,ikbot,jp_sal,Kmm)
END_2D
CALL iom_put( "sbs", z2d ) ! bottom salinity
CALL iom_put( "sbs_"//stype, z2d ) ! bottom salinity
ENDIF
IF( .NOT.lk_SWE ) CALL iom_put( "rhop", rhop(:,:,:) ) ! 3D potential density (sigma0)
......@@ -295,6 +321,7 @@ CONTAINS
CALL iom_put( "avt" , avt ) ! T vert. eddy diff. coef.
CALL iom_put( "avs" , avs ) ! S vert. eddy diff. coef.
CALL iom_put( "avm" , avm ) ! T vert. eddy visc. coef.
CALL iom_put( "htau" , htau ) ! htau scaling
IF( iom_use('logavt') ) CALL iom_put( "logavt", LOG( MAX( 1.e-20_wp, avt(:,:,:) ) ) )
IF( iom_use('logavs') ) CALL iom_put( "logavs", LOG( MAX( 1.e-20_wp, avs(:,:,:) ) ) )
......@@ -316,7 +343,7 @@ CONTAINS
ENDIF
ENDIF
IF ( iom_use("sstgrad") .OR. iom_use("sstgrad2") ) THEN
IF ( iom_use("sstgrad_"//ttype) .OR. iom_use("sstgrad2_"//ttype) ) THEN
DO_2D( 0, 0, 0, 0 ) ! sst gradient
zztmp = ts(ji,jj,1,jp_tem,Kmm)
zztmpx = ( ts(ji+1,jj,1,jp_tem,Kmm) - zztmp ) * r1_e1u(ji,jj) + ( zztmp - ts(ji-1,jj ,1,jp_tem,Kmm) ) * r1_e1u(ji-1,jj)
......@@ -324,12 +351,12 @@ CONTAINS
z2d(ji,jj) = 0.25_wp * ( zztmpx * zztmpx + zztmpy * zztmpy ) &
& * umask(ji,jj,1) * umask(ji-1,jj,1) * vmask(ji,jj,1) * vmask(ji,jj-1,1)
END_2D
CALL iom_put( "sstgrad2", z2d ) ! square of module of sst gradient
IF ( iom_use("sstgrad") ) THEN
CALL iom_put( "sstgrad2_"//ttype, z2d ) ! square of module of sst gradient
IF ( iom_use("sstgrad_"//ttype) ) THEN
DO_2D( 0, 0, 0, 0 )
z2d(ji,jj) = SQRT( z2d(ji,jj) )
END_2D
CALL iom_put( "sstgrad", z2d ) ! module of sst gradient
CALL iom_put( "sstgrad_"//ttype, z2d ) ! module of sst gradient
ENDIF
ENDIF
......@@ -456,19 +483,28 @@ CONTAINS
ENDIF
IF( iom_use("tosmint") ) THEN
IF( (.NOT.l_ldfeiv_time) .AND. ( iom_use('RossRad') .OR. iom_use('RossRadlim') &
& .OR. iom_use('Tclinic_recip') .OR. iom_use('RR_GS') &
& .OR. iom_use('aeiu_2d') .OR. iom_use('aeiv_2d') ) ) THEN
CALL ldf_eiv(kt, 75.0, z2d, z3d(:,:,1), Kmm)
CALL iom_put('aeiu_2d', z2d)
CALL iom_put('aeiv_2d', z3d(:,:,1))
ENDIF
IF( iom_use("tosmint_"//ttype) ) THEN
z2d(:,:) = 0._wp
DO_3D( 0, 0, 0, 0, 1, jpkm1 )
z2d(ji,jj) = z2d(ji,jj) + rho0 * e3t(ji,jj,jk,Kmm) * ts(ji,jj,jk,jp_tem,Kmm)
END_3D
CALL iom_put( "tosmint", z2d ) ! Vertical integral of temperature
CALL iom_put( "tosmint_"//ttype, z2d ) ! Vertical integral of temperature
ENDIF
IF( iom_use("somint") ) THEN
IF( iom_use("somint_"//stype) ) THEN
z2d(:,:) = 0._wp
DO_3D( 0, 0, 0, 0, 1, jpkm1 )
z2d(ji,jj) = z2d(ji,jj) + rho0 * e3t(ji,jj,jk,Kmm) * ts(ji,jj,jk,jp_sal,Kmm)
END_3D
CALL iom_put( "somint", z2d ) ! Vertical integral of salinity
CALL iom_put( "somint_"//stype, z2d ) ! Vertical integral of salinity
ENDIF
CALL iom_put( "bn2", rn2 ) ! Brunt-Vaisala buoyancy frequency (N^2)
......
......@@ -270,10 +270,10 @@ CONTAINS
!!----------------------------------------------------------------------
!
NAMELIST/namrun/ cn_ocerst_indir, cn_ocerst_outdir, nn_stocklist, ln_rst_list, &
& nn_no , cn_exp , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl , &
& nn_no , cn_exp , cn_ocerst_in, cn_ocerst_out, ln_rstart , ln_rstdate, nn_rstctl , &
& nn_it000, nn_itend , nn_date0 , nn_time0 , nn_leapy , nn_istate , &
& nn_stock, nn_write , ln_mskland , ln_clobber , nn_chunksz, ln_1st_euler , &
& ln_cfmeta, ln_xios_read, nn_wxios
& ln_cfmeta, ln_xios_read, nn_wxios, ln_rst_eos
NAMELIST/namdom/ ln_linssh, rn_Dt, rn_atfp, ln_crs, ln_c1d, ln_meshmask
NAMELIST/namtile/ ln_tile, nn_ltile_i, nn_ltile_j
#if defined key_netcdf4
......@@ -377,9 +377,11 @@ CONTAINS
WRITE(numout,*) ' frequency of output file nn_write = ', nn_write
#endif
WRITE(numout,*) ' mask land points ln_mskland = ', ln_mskland
WRITE(numout,*) ' date-stamp restart files ln_rstdate = ', ln_rstdate
WRITE(numout,*) ' additional CF standard metadata ln_cfmeta = ', ln_cfmeta
WRITE(numout,*) ' overwrite an existing file ln_clobber = ', ln_clobber
WRITE(numout,*) ' NetCDF chunksize (bytes) nn_chunksz = ', nn_chunksz
WRITE(numout,*) ' check restart equation of state ln_rst_eos = ', ln_rst_eos
IF( TRIM(Agrif_CFixed()) == '0' ) THEN
WRITE(numout,*) ' READ restart for a single file using XIOS ln_xios_read =', ln_xios_read
WRITE(numout,*) ' Write restart using XIOS nn_wxios = ', nn_wxios
......
......@@ -33,6 +33,9 @@ MODULE dommsk
USE iom ! IOM library
USE lbclnk ! ocean lateral boundary conditions (or mpp link)
USE lib_mpp ! Massively Parallel Processing library
USE iom ! For shlat2d
USE fldread ! for sn_shlat2d
IMPLICIT NONE
PRIVATE
......@@ -85,7 +88,11 @@ CONTAINS
INTEGER :: iktop, ikbot ! - -
INTEGER :: ios, inum
!!
NAMELIST/namlbc/ rn_shlat, ln_vorlat
REAL(wp) :: zshlat !: locally modified shlat for some strait
REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zshlat2d
LOGICAL :: ln_shlat2d
CHARACTER(len = 256) :: cn_shlat2d_file, cn_shlat2d_var
NAMELIST/namlbc/ rn_shlat, ln_vorlat, ln_shlat2d, cn_shlat2d_file, cn_shlat2d_var
NAMELIST/nambdy/ ln_bdy ,nb_bdy, ln_coords_file, cn_coords_file, &
& ln_mask_file, cn_mask_file, cn_dyn2d, nn_dyn2d_dta, &
& cn_dyn3d, nn_dyn3d_dta, cn_tra, nn_tra_dta, &
......@@ -110,12 +117,20 @@ CONTAINS
ENDIF
!
IF(lwp) WRITE(numout,*)
IF ( rn_shlat == 0. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral free-slip'
ELSEIF ( rn_shlat == 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral no-slip'
ELSEIF ( 0. < rn_shlat .AND. rn_shlat < 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral partial-slip'
ELSEIF ( 2. < rn_shlat ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral strong-slip'
ELSE
CALL ctl_stop( 'dom_msk: wrong value for rn_shlat (i.e. a negalive value). We stop.' )
IF ( ln_shlat2d ) THEN
IF(lwp) WRITE(numout,*) ' READ shlat as a 2D coefficient in a file '
ALLOCATE( zshlat2d(jpi,jpj) )
CALL iom_open(TRIM(cn_shlat2d_file), inum)
CALL iom_get (inum, jpdom_global, TRIM(cn_shlat2d_var), zshlat2d, 1) !
CALL iom_close(inum)
ELSE
IF ( rn_shlat == 0. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral free-slip'
ELSEIF ( rn_shlat == 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral no-slip'
ELSEIF ( 0. < rn_shlat .AND. rn_shlat < 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral partial-slip'
ELSEIF ( 2. < rn_shlat ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral strong-slip'
ELSE
CALL ctl_stop( 'dom_msk: wrong value for rn_shlat (i.e. a negalive value). We stop.' )
ENDIF
ENDIF
! Ocean/land mask at t-point (computed from ko_top and ko_bot)
......@@ -207,14 +222,26 @@ CONTAINS
! Lateral boundary conditions on velocity (modify fmask)
! ---------------------------------------
IF( rn_shlat /= 0._wp ) THEN ! Not free-slip lateral boundary condition
IF( rn_shlat /= 0._wp .or. ln_shlat2d ) THEN ! Not free-slip lateral boundary condition
!
IF ( ln_shlat2d ) THEN
DO_3D( 0, 0, 0, 0, 1, jpk )
IF( fmask(ji,jj,jk) == 0._wp ) THEN
fmask(ji,jj,jk) = zshlat2d(ji,jj) * MIN( 1._wp , MAX( umask(ji,jj,jk), umask(ji,jj+1,jk), &
& vmask(ji,jj,jk), vmask(ji+1,jj,jk) ) )
ENDIF
END_3D
ELSE
DO_3D( 0, 0, 0, 0, 1, jpk )
IF( fmask(ji,jj,jk) == 0._wp ) THEN
fmask(ji,jj,jk) = rn_shlat * MIN( 1._wp , MAX( umask(ji,jj,jk), umask(ji,jj+1,jk), &
& vmask(ji,jj,jk), vmask(ji+1,jj,jk) ) )
ENDIF
END_3D
END IF
!
IF( ln_shlat2d ) DEALLOCATE( zshlat2d )
!
DO_3D( 0, 0, 0, 0, 1, jpk )
IF( fmask(ji,jj,jk) == 0._wp ) THEN
fmask(ji,jj,jk) = rn_shlat * MIN( 1._wp , MAX( umask(ji,jj,jk), umask(ji,jj+1,jk), &
& vmask(ji,jj,jk), vmask(ji+1,jj,jk) ) )
ENDIF
END_3D
CALL lbc_lnk( 'dommsk', fmask, 'F', 1._wp ) ! Lateral boundary conditions on fmask
!
! CAUTION : The fmask may be further modified in dyn_vor_init ( dynvor.F90 ) depending on ln_vorlat
......@@ -224,7 +251,9 @@ CONTAINS
! User defined alteration of fmask (use to reduce ocean transport in specified straits)
! --------------------------------
!
CALL usr_def_fmask( cn_cfg, nn_cfg, fmask )
IF ( .not. ln_shlat2d ) THEN
CALL usr_def_fmask( cn_cfg, nn_cfg, fmask )
ENDIF
!
#if defined key_agrif
! Reset masks defining updated points over parent grids
......
......@@ -692,7 +692,7 @@ CONTAINS
!! - vertical interpolation: simple averaging
!!----------------------------------------------------------------------
REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in ) :: pe3_in ! input e3 to be interpolated
REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: pe3_out ! output interpolated e3
REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(out) :: pe3_out ! output interpolated e3
CHARACTER(LEN=*) , INTENT(in ) :: pout ! grid point of out scale factors
! ! = 'U', 'V', 'W, 'F', 'UW' or 'VW'
!
......
This diff is collapsed.