Changeset 5296
- Timestamp:
- 2015-05-27T12:47:55+02:00 (9 years ago)
- Location:
- branches/2015/dev_r5177_CNRS4_stopar/NEMOGCM
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5177_CNRS4_stopar/NEMOGCM/CONFIG/SHARED/namelist_ref
r5147 r5296 50 50 !! *** Domain namelists *** 51 51 !!====================================================================== 52 !! namcfg parameters of the configuration 52 !! namcfg parameters of the configuration 53 53 !! namzgr vertical coordinate 54 54 !! namzgr_sco s-coordinate or hybrid z-s-coordinate … … 58 58 ! 59 59 !----------------------------------------------------------------------- 60 &namcfg ! parameters of the configuration 60 &namcfg ! parameters of the configuration 61 61 !----------------------------------------------------------------------- 62 62 cp_cfg = "default" ! name of the configuration … … 72 72 jperio = 0 ! lateral cond. type (between 0 and 6) 73 73 ! = 0 closed ; = 1 cyclic East-West 74 ! = 2 equatorial symmetric ; = 3 North fold T-point pivot 74 ! = 2 equatorial symmetric ; = 3 North fold T-point pivot 75 75 ! = 4 cyclic East-West AND North fold T-point pivot 76 76 ! = 5 North fold F-point pivot 77 77 ! = 6 cyclic East-West AND North fold F-point pivot 78 ln_use_jattr = .false. ! use (T) the file attribute: open_ocean_jstart, if present 78 ln_use_jattr = .false. ! use (T) the file attribute: open_ocean_jstart, if present 79 79 ! in netcdf input files, as the start j-row for reading 80 80 / … … 101 101 !!!!!!! SH94 stretching coefficients (ln_s_sh94 = .true.) 102 102 rn_theta = 6.0 ! surface control parameter (0<=theta<=20) 103 rn_bb = 0.8 ! stretching with SH94 s-sigma 103 rn_bb = 0.8 ! stretching with SH94 s-sigma 104 104 !!!!!!! SF12 stretching coefficient (ln_s_sf12 = .true.) 105 105 rn_alpha = 4.4 ! stretching with SF12 s-sigma … … 110 110 rn_zb_b = -0.2 ! offset for calculating Zb 111 111 !!!!!!!! Other stretching (not SH94 or SF12) [also uses rn_theta above] 112 rn_thetb = 1.0 ! bottom control parameter (0<=thetb<= 1) 112 rn_thetb = 1.0 ! bottom control parameter (0<=thetb<= 1) 113 113 / 114 114 !----------------------------------------------------------------------- … … 164 164 nn_baro = 30 ! Number of iterations of barotropic mode 165 165 ! during rn_rdt seconds. Only used if ln_bt_nn_auto=F 166 rn_bt_cmax = 0.8 ! Maximum courant number allowed if ln_bt_nn_auto=T 166 rn_bt_cmax = 0.8 ! Maximum courant number allowed if ln_bt_nn_auto=T 167 167 nn_bt_flt = 1 ! Time filter choice 168 168 ! = 0 None 169 169 ! = 1 Boxcar over nn_baro barotropic steps 170 ! = 2 Boxcar over 2*nn_baro " " 170 ! = 2 Boxcar over 2*nn_baro " " 171 171 / 172 172 !----------------------------------------------------------------------- … … 245 245 ln_rnf = .true. ! runoffs (T => fill namsbc_rnf) 246 246 nn_isf = 0 ! ice shelf melting/freezing (/=0 => fill namsbc_isf) 247 ! 0 =no isf 1 = presence of ISF 248 ! 2 = bg03 parametrisation 3 = rnf file for isf 247 ! 0 =no isf 1 = presence of ISF 248 ! 2 = bg03 parametrisation 3 = rnf file for isf 249 249 ! 4 = ISF fwf specified 250 250 ! option 1 and 4 need ln_isfcav = .true. (domzgr) … … 277 277 &namsbc_flx ! surface boundary condition : flux formulation 278 278 !----------------------------------------------------------------------- 279 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask ! 279 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask ! 280 280 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename ! 281 281 sn_utau = 'utau' , 24 , 'utau' , .false. , .false., 'yearly' , '' , '' , '' … … 320 320 ln_taudif = .false. ! HF tau contribution: use "mean of stress module - module of the mean stress" data 321 321 rn_zqt = 10. ! Air temperature and humidity reference height (m) 322 rn_zu = 10. ! Wind vector reference height (m) 322 rn_zu = 10. ! Wind vector reference height (m) 323 323 rn_pfac = 1. ! multiplicative factor for precipitation (total & snow) 324 324 rn_efac = 1. ! multiplicative factor for evaporation (0. or 1.) 325 rn_vfac = 0. ! multiplicative factor for ocean/ice velocity 325 rn_vfac = 0. ! multiplicative factor for ocean/ice velocity 326 326 ! in the calculation of the wind stress (0.=absolute winds or 1.=relative winds) 327 327 / … … 373 373 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask ! 374 374 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! filename ! 375 sn_usp = 'sas_grid_U' , 120 , 'vozocrtx' , .true. , .true. , 'yearly' , '' , '' , '' 375 sn_usp = 'sas_grid_U' , 120 , 'vozocrtx' , .true. , .true. , 'yearly' , '' , '' , '' 376 376 sn_vsp = 'sas_grid_V' , 120 , 'vomecrty' , .true. , .true. , 'yearly' , '' , '' , '' 377 377 sn_tem = 'sas_grid_T' , 120 , 'sosstsst' , .true. , .true. , 'yearly' , '' , '' , '' … … 422 422 / 423 423 !----------------------------------------------------------------------- 424 &namsbc_isf ! Top boundary layer (ISF) 424 &namsbc_isf ! Top boundary layer (ISF) 425 425 !----------------------------------------------------------------------- 426 426 ! ! file name ! frequency (hours) ! variable ! time interpol. ! clim ! 'yearly'/ ! weights ! rotation ! … … 499 499 ! Initial mass required for an iceberg of each class 500 500 rn_initial_mass = 8.8e7, 4.1e8, 3.3e9, 1.8e10, 3.8e10, 7.5e10, 1.2e11, 2.2e11, 3.9e11, 7.4e11 501 ! Proportion of calving mass to apportion to each class 501 ! Proportion of calving mass to apportion to each class 502 502 rn_distribution = 0.24, 0.12, 0.15, 0.18, 0.12, 0.07, 0.03, 0.03, 0.03, 0.02 503 503 ! Ratio between effective and real iceberg mass (non-dim) 504 ! i.e. number of icebergs represented at a point 504 ! i.e. number of icebergs represented at a point 505 505 rn_mass_scaling = 2000, 200, 50, 20, 10, 5, 2, 1, 1, 1 506 506 ! thickness of newly calved bergs (m) … … 511 511 rn_bits_erosion_fraction = 0. ! Fraction of erosion melt flux to divert to bergy bits 512 512 rn_sicn_shift = 0. ! Shift of sea-ice concn in erosion flux (0<sicn_shift<1) 513 ln_passive_mode = .false. ! iceberg - ocean decoupling 513 ln_passive_mode = .false. ! iceberg - ocean decoupling 514 514 nn_test_icebergs = 10 ! Create test icebergs of this class (-1 = no) 515 515 ! Put a test iceberg at each gridpoint in box (lon1,lon2,lat1,lat2) 516 516 rn_test_box = 108.0, 116.0, -66.0, -58.0 517 rn_speed_limit = 0. ! CFL speed limit for a berg 517 rn_speed_limit = 0. ! CFL speed limit for a berg 518 518 519 519 ! ! file name ! frequency (hours) ! variable ! time interp. ! clim ! 'yearly'/ ! weights ! rotation ! land/sea mask ! 520 520 ! ! ! (if <0 months) ! name ! (logical) ! (T/F ) ! 'monthly' ! filename ! pairing ! filename ! 521 521 sn_icb = 'calving' , -1 , 'calvingmask', .true. , .true. , 'yearly' , '' , '' , '' 522 523 cn_dir = './' 522 523 cn_dir = './' 524 524 / 525 525 … … 607 607 ! = 2, use tidal harmonic forcing data from files 608 608 ! = 3, use external data AND tidal harmonic forcing 609 cn_dyn3d = 'none' ! 609 cn_dyn3d = 'none' ! 610 610 nn_dyn3d_dta = 0 ! = 0, bdy data are equal to the initial state 611 611 ! = 1, bdy data are read in 'bdydata .nc' files 612 cn_tra = 'none' ! 612 cn_tra = 'none' ! 613 613 nn_tra_dta = 0 ! = 0, bdy data are equal to the initial state 614 614 ! = 1, bdy data are read in 'bdydata .nc' files 615 cn_ice_lim = 'none' ! 615 cn_ice_lim = 'none' ! 616 616 nn_ice_lim_dta = 0 ! = 0, bdy data are equal to the initial state 617 617 ! = 1, bdy data are read in 'bdydata .nc' files … … 622 622 ln_tra_dmp =.false. ! open boudaries conditions for tracers 623 623 ln_dyn3d_dmp =.false. ! open boundary condition for baroclinic velocities 624 rn_time_dmp = 1. ! Damping time scale in days 624 rn_time_dmp = 1. ! Damping time scale in days 625 625 rn_time_dmp_out = 1. ! Outflow damping time scale 626 626 nn_rimwidth = 10 ! width of the relaxation zone … … 675 675 rn_bfri2_max = 1.e-1 ! max. bottom drag coefficient (non linear case and ln_loglayer=T) 676 676 rn_bfeb2 = 2.5e-3 ! bottom turbulent kinetic energy background (m2/s2) 677 rn_bfrz0 = 3.e-3 ! bottom roughness [m] if ln_loglayer=T 677 rn_bfrz0 = 3.e-3 ! bottom roughness [m] if ln_loglayer=T 678 678 ln_bfr2d = .false. ! horizontal variation of the bottom friction coef (read a 2D mask file ) 679 679 rn_bfrien = 50. ! local multiplying factor of bfr (ln_bfr2d=T) … … 721 721 !----------------------------------------------------------------------- 722 722 nn_eos = -1 ! type of equation of state and Brunt-Vaisala frequency 723 ! =-1, TEOS-10 724 ! = 0, EOS-80 723 ! =-1, TEOS-10 724 ! = 0, EOS-80 725 725 ! = 1, S-EOS (simplified eos) 726 726 ln_useCT = .true. ! use of Conservative Temp. ==> surface CT converted in Pot. Temp. in sbcssm … … 820 820 &nam_vvl ! vertical coordinate options 821 821 !----------------------------------------------------------------------- 822 ln_vvl_zstar = .true. ! zstar vertical coordinate 822 ln_vvl_zstar = .true. ! zstar vertical coordinate 823 823 ln_vvl_ztilde = .false. ! ztilde vertical coordinate: only high frequency variations 824 824 ln_vvl_layer = .false. ! full layer vertical coordinate … … 1174 1174 ln_sst = .false. ! Logical switch for SST observations 1175 1175 ln_reysst = .false. ! ln_reysst Logical switch for Reynolds observations 1176 ln_ghrsst = .false. ! ln_ghrsst Logical switch for GHRSST observations 1176 ln_ghrsst = .false. ! ln_ghrsst Logical switch for GHRSST observations 1177 1177 1178 1178 ln_sstfb = .false. ! Logical switch for feedback SST data … … 1201 1201 sstfbfiles = 'sst_01.nc' 1202 1202 ! seaicefiles Sea Ice input observation file names 1203 seaicefiles = 'seaice_01.nc' 1203 seaicefiles = 'seaice_01.nc' 1204 1204 ! velavcurfiles Vel. cur. daily av. input file name 1205 1205 ! velhvcurfiles Vel. cur. high freq. input file name … … 1266 1266 rn_htrmax = 200.0 ! max. depth of transition range 1267 1267 / 1268 !----------------------------------------------------------------------- 1269 &namsto ! Stochastic parametrization of EOS 1270 !----------------------------------------------------------------------- 1271 ln_rststo = .false. ! start from mean parameter (F) or from restart file (T) 1272 ln_rstseed = .true. ! read seed of RNG from restart file 1273 cn_storst_in = "restart_sto" ! suffix of stochastic parameter restart file (input) 1274 cn_storst_out = "restart_sto" ! suffix of stochastic parameter restart file (output) 1275 1276 ln_sto_eos = .false. ! stochastic equation of state 1277 nn_sto_eos = 1 ! number of independent random walks 1278 rn_eos_stdxy = 1.4 ! random walk horz. standard deviation (in grid points) 1279 rn_eos_stdz = 0.7 ! random walk vert. standard deviation (in grid points) 1280 rn_eos_tcor = 1440.0 ! random walk time correlation (in timesteps) 1281 nn_eos_ord = 1 ! order of autoregressive processes 1282 nn_eos_flt = 0 ! passes of Laplacian filter 1283 rn_eos_lim = 2.0 ! limitation factor (default = 3.0) 1284 / -
branches/2015/dev_r5177_CNRS4_stopar/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90
r5147 r5296 30 30 !! eos_insitu_2d : Compute the in situ density for 2d fields 31 31 !! bn2 : Compute the Brunt-Vaisala frequency 32 !! eos_rab : generic interface of in situ thermal/haline expansion ratio 32 !! eos_rab : generic interface of in situ thermal/haline expansion ratio 33 33 !! eos_rab_3d : compute in situ thermal/haline expansion ratio 34 34 !! eos_rab_2d : compute in situ thermal/haline expansion ratio for 2d fields … … 42 42 USE in_out_manager ! I/O manager 43 43 USE lib_mpp ! MPP library 44 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 44 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 45 45 USE prtctl ! Print control 46 46 USE wrk_nemo ! Memory Allocation 47 USE lbclnk ! ocean lateral boundary conditions47 USE lbclnk ! ocean lateral boundary conditions 48 48 USE timing ! Timing 49 USE stopar ! Stochastic T/S fluctuations 50 USE stopts ! Stochastic T/S fluctuations 49 51 50 52 IMPLICIT NONE … … 60 62 END INTERFACE 61 63 ! 62 INTERFACE eos_fzp 64 INTERFACE eos_fzp 63 65 MODULE PROCEDURE eos_fzp_2d, eos_fzp_0d 64 66 END INTERFACE … … 78 80 ! !!! simplified eos coefficients 79 81 ! default value: Vallis 2006 80 REAL(wp) :: rn_a0 = 1.6550e-1_wp ! thermal expansion coeff. 81 REAL(wp) :: rn_b0 = 7.6554e-1_wp ! saline expansion coeff. 82 REAL(wp) :: rn_lambda1 = 5.9520e-2_wp ! cabbeling coeff. in T^2 83 REAL(wp) :: rn_lambda2 = 5.4914e-4_wp ! cabbeling coeff. in S^2 84 REAL(wp) :: rn_mu1 = 1.4970e-4_wp ! thermobaric coeff. in T 85 REAL(wp) :: rn_mu2 = 1.1090e-5_wp ! thermobaric coeff. in S 86 REAL(wp) :: rn_nu = 2.4341e-3_wp ! cabbeling coeff. in theta*salt 87 82 REAL(wp) :: rn_a0 = 1.6550e-1_wp ! thermal expansion coeff. 83 REAL(wp) :: rn_b0 = 7.6554e-1_wp ! saline expansion coeff. 84 REAL(wp) :: rn_lambda1 = 5.9520e-2_wp ! cabbeling coeff. in T^2 85 REAL(wp) :: rn_lambda2 = 5.4914e-4_wp ! cabbeling coeff. in S^2 86 REAL(wp) :: rn_mu1 = 1.4970e-4_wp ! thermobaric coeff. in T 87 REAL(wp) :: rn_mu2 = 1.1090e-5_wp ! thermobaric coeff. in S 88 REAL(wp) :: rn_nu = 2.4341e-3_wp ! cabbeling coeff. in theta*salt 89 88 90 ! TEOS10/EOS80 parameters 89 91 REAL(wp) :: r1_S0, r1_T0, r1_Z0, rdeltaS 90 92 91 93 ! EOS parameters 92 94 REAL(wp) :: EOS000 , EOS100 , EOS200 , EOS300 , EOS400 , EOS500 , EOS600 … … 106 108 REAL(wp) :: EOS022 107 109 REAL(wp) :: EOS003 , EOS103 108 REAL(wp) :: EOS013 109 110 REAL(wp) :: EOS013 111 110 112 ! ALPHA parameters 111 113 REAL(wp) :: ALP000 , ALP100 , ALP200 , ALP300 , ALP400 , ALP500 … … 122 124 REAL(wp) :: ALP012 123 125 REAL(wp) :: ALP003 124 126 125 127 ! BETA parameters 126 128 REAL(wp) :: BET000 , BET100 , BET200 , BET300 , BET400 , BET500 … … 149 151 REAL(wp) :: PEN002 , PEN102 150 152 REAL(wp) :: PEN012 151 153 152 154 ! ALPHA_PEN parameters 153 155 REAL(wp) :: APE000 , APE100 , APE200 , APE300 … … 279 281 & + rn_b0 * ( 1._wp - 0.5_wp*rn_lambda2*zs - rn_mu2*zh ) * zs & 280 282 & - rn_nu * zt * zs 281 ! 283 ! 282 284 prd(ji,jj,jk) = zn * r1_rau0 * ztm ! density anomaly (masked) 283 285 END DO … … 313 315 REAL(wp), DIMENSION(jpi,jpj,jpk ), INTENT(in ) :: pdep ! depth [m] 314 316 ! 315 INTEGER :: ji, jj, jk ! dummy loop indices 316 REAL(wp) :: zt , zh , zs , ztm ! local scalars 317 REAL(wp) :: zn , zn0, zn1, zn2, zn3 ! - - 317 INTEGER :: ji, jj, jk, jsmp, jdof ! dummy loop indices 318 REAL(wp) :: zt , zh , zstemp, zs , ztm ! local scalars 319 REAL(wp) :: zn , zn0, zn1, zn2, zn3 ! - - 320 REAL(wp), DIMENSION(:), ALLOCATABLE :: zn0_sto, zn_sto, zsign ! local vectors 318 321 !!---------------------------------------------------------------------- 319 322 ! … … 324 327 CASE( -1, 0 ) !== polynomial TEOS-10 / EOS-80 ==! 325 328 ! 326 DO jk = 1, jpkm1 327 DO jj = 1, jpj 328 DO ji = 1, jpi 329 ! 330 zh = pdep(ji,jj,jk) * r1_Z0 ! depth 331 zt = pts (ji,jj,jk,jp_tem) * r1_T0 ! temperature 332 zs = SQRT( ABS( pts(ji,jj,jk,jp_sal) + rdeltaS ) * r1_S0 ) ! square root salinity 333 ztm = tmask(ji,jj,jk) ! tmask 334 ! 335 zn3 = EOS013*zt & 336 & + EOS103*zs+EOS003 337 ! 338 zn2 = (EOS022*zt & 339 & + EOS112*zs+EOS012)*zt & 340 & + (EOS202*zs+EOS102)*zs+EOS002 341 ! 342 zn1 = (((EOS041*zt & 343 & + EOS131*zs+EOS031)*zt & 344 & + (EOS221*zs+EOS121)*zs+EOS021)*zt & 345 & + ((EOS311*zs+EOS211)*zs+EOS111)*zs+EOS011)*zt & 346 & + (((EOS401*zs+EOS301)*zs+EOS201)*zs+EOS101)*zs+EOS001 347 ! 348 zn0 = (((((EOS060*zt & 349 & + EOS150*zs+EOS050)*zt & 350 & + (EOS240*zs+EOS140)*zs+EOS040)*zt & 351 & + ((EOS330*zs+EOS230)*zs+EOS130)*zs+EOS030)*zt & 352 & + (((EOS420*zs+EOS320)*zs+EOS220)*zs+EOS120)*zs+EOS020)*zt & 353 & + ((((EOS510*zs+EOS410)*zs+EOS310)*zs+EOS210)*zs+EOS110)*zs+EOS010)*zt & 354 & + (((((EOS600*zs+EOS500)*zs+EOS400)*zs+EOS300)*zs+EOS200)*zs+EOS100)*zs+EOS000 355 ! 356 zn = ( ( zn3 * zh + zn2 ) * zh + zn1 ) * zh + zn0 357 ! 358 prhop(ji,jj,jk) = zn0 * ztm ! potential density referenced at the surface 359 ! 360 prd(ji,jj,jk) = ( zn * r1_rau0 - 1._wp ) * ztm ! density anomaly (masked) 329 ! Stochastic equation of state 330 IF ( ln_sto_eos ) THEN 331 ALLOCATE(zn0_sto(1:2*nn_sto_eos)) 332 ALLOCATE(zn_sto(1:2*nn_sto_eos)) 333 ALLOCATE(zsign(1:2*nn_sto_eos)) 334 DO jsmp = 1, 2*nn_sto_eos, 2 335 zsign(jsmp) = 1._wp 336 zsign(jsmp+1) = -1._wp 337 END DO 338 ! 339 DO jk = 1, jpkm1 340 DO jj = 1, jpj 341 DO ji = 1, jpi 342 ! 343 ! compute density (2*nn_sto_eos) times: 344 ! (1) for t+dt, s+ds (with the random TS fluctutation computed in sto_pts) 345 ! (2) for t-dt, s-ds (with the opposite fluctuation) 346 DO jsmp = 1, nn_sto_eos*2 347 zh = pdep(ji,jj,jk) * r1_Z0 ! depth 348 zt = pts (ji,jj,jk,jp_tem) * r1_T0 + pts_ran(ji,jj,jk,jp_tem,jdof) * zsign(jsmp) ! temperature 349 zstemp = pts (ji,jj,jk,jp_sal) + pts_ran(ji,jj,jk,jp_sal,jdof) * zsign(jsmp) 350 zs = SQRT( ABS( zstemp + rdeltaS ) * r1_S0 ) ! square root salinity 351 ztm = tmask(ji,jj,jk) ! tmask 352 ! 353 zn3 = EOS013*zt & 354 & + EOS103*zs+EOS003 355 ! 356 zn2 = (EOS022*zt & 357 & + EOS112*zs+EOS012)*zt & 358 & + (EOS202*zs+EOS102)*zs+EOS002 359 ! 360 zn1 = (((EOS041*zt & 361 & + EOS131*zs+EOS031)*zt & 362 & + (EOS221*zs+EOS121)*zs+EOS021)*zt & 363 & + ((EOS311*zs+EOS211)*zs+EOS111)*zs+EOS011)*zt & 364 & + (((EOS401*zs+EOS301)*zs+EOS201)*zs+EOS101)*zs+EOS001 365 ! 366 zn0_sto(jsmp) = (((((EOS060*zt & 367 & + EOS150*zs+EOS050)*zt & 368 & + (EOS240*zs+EOS140)*zs+EOS040)*zt & 369 & + ((EOS330*zs+EOS230)*zs+EOS130)*zs+EOS030)*zt & 370 & + (((EOS420*zs+EOS320)*zs+EOS220)*zs+EOS120)*zs+EOS020)*zt & 371 & + ((((EOS510*zs+EOS410)*zs+EOS310)*zs+EOS210)*zs+EOS110)*zs+EOS010)*zt & 372 & + (((((EOS600*zs+EOS500)*zs+EOS400)*zs+EOS300)*zs+EOS200)*zs+EOS100)*zs+EOS000 373 ! 374 zn_sto(jsmp) = ( ( zn3 * zh + zn2 ) * zh + zn1 ) * zh + zn0 375 END DO 376 ! 377 ! 378 ! compute stochastic density as the mean of the (2*nn_sto_eos) densities 379 prhop(ji,jj,jk) = 0._wp ; prd(ji,jj,jk) = 0._wp 380 DO jsmp = 1, nn_sto_eos*2 381 prhop(ji,jj,jk) = prhop(ji,jj,jk) + zn0_sto(jsmp) ! potential density referenced at the surface 382 ! 383 prd(ji,jj,jk) = prd(ji,jj,jk) + ( zn_sto(jsmp) * r1_rau0 - 1._wp ) ! density anomaly (masked) 384 END DO 385 prhop(ji,jj,jk) = 0.5_wp * prhop(ji,jj,jk) * ztm / nn_sto_eos 386 prd (ji,jj,jk) = 0.5_wp * prd (ji,jj,jk) * ztm / nn_sto_eos 387 END DO 361 388 END DO 362 389 END DO 363 END DO 390 DEALLOCATE(zn0_sto,zn_sto,zsign) 391 ! Non-stochastic equation of state 392 ELSE 393 DO jk = 1, jpkm1 394 DO jj = 1, jpj 395 DO ji = 1, jpi 396 ! 397 zh = pdep(ji,jj,jk) * r1_Z0 ! depth 398 zt = pts (ji,jj,jk,jp_tem) * r1_T0 ! temperature 399 zs = SQRT( ABS( pts(ji,jj,jk,jp_sal) + rdeltaS ) * r1_S0 ) ! square root salinity 400 ztm = tmask(ji,jj,jk) ! tmask 401 ! 402 zn3 = EOS013*zt & 403 & + EOS103*zs+EOS003 404 ! 405 zn2 = (EOS022*zt & 406 & + EOS112*zs+EOS012)*zt & 407 & + (EOS202*zs+EOS102)*zs+EOS002 408 ! 409 zn1 = (((EOS041*zt & 410 & + EOS131*zs+EOS031)*zt & 411 & + (EOS221*zs+EOS121)*zs+EOS021)*zt & 412 & + ((EOS311*zs+EOS211)*zs+EOS111)*zs+EOS011)*zt & 413 & + (((EOS401*zs+EOS301)*zs+EOS201)*zs+EOS101)*zs+EOS001 414 ! 415 zn0 = (((((EOS060*zt & 416 & + EOS150*zs+EOS050)*zt & 417 & + (EOS240*zs+EOS140)*zs+EOS040)*zt & 418 & + ((EOS330*zs+EOS230)*zs+EOS130)*zs+EOS030)*zt & 419 & + (((EOS420*zs+EOS320)*zs+EOS220)*zs+EOS120)*zs+EOS020)*zt & 420 & + ((((EOS510*zs+EOS410)*zs+EOS310)*zs+EOS210)*zs+EOS110)*zs+EOS010)*zt & 421 & + (((((EOS600*zs+EOS500)*zs+EOS400)*zs+EOS300)*zs+EOS200)*zs+EOS100)*zs+EOS000 422 ! 423 zn = ( ( zn3 * zh + zn2 ) * zh + zn1 ) * zh + zn0 424 ! 425 prhop(ji,jj,jk) = zn0 * ztm ! potential density referenced at the surface 426 ! 427 prd(ji,jj,jk) = ( zn * r1_rau0 - 1._wp ) * ztm ! density anomaly (masked) 428 END DO 429 END DO 430 END DO 431 ENDIF 364 432 ! 365 433 CASE( 1 ) !== simplified EOS ==! … … 681 749 ! 682 750 CALL lbc_lnk( pab(:,:,jp_tem), 'T', 1. ) ! Lateral boundary conditions 683 CALL lbc_lnk( pab(:,:,jp_sal), 'T', 1. ) 751 CALL lbc_lnk( pab(:,:,jp_sal), 'T', 1. ) 684 752 ! 685 753 CASE( 1 ) !== simplified EOS ==! … … 702 770 ! 703 771 CALL lbc_lnk( pab(:,:,jp_tem), 'T', 1. ) ! Lateral boundary conditions 704 CALL lbc_lnk( pab(:,:,jp_sal), 'T', 1. ) 772 CALL lbc_lnk( pab(:,:,jp_sal), 'T', 1. ) 705 773 ! 706 774 CASE DEFAULT … … 820 888 !! *** ROUTINE bn2 *** 821 889 !! 822 !! ** Purpose : Compute the local Brunt-Vaisala frequency at the 890 !! ** Purpose : Compute the local Brunt-Vaisala frequency at the 823 891 !! time-step of the input arguments 824 892 !! … … 827 895 !! N.B. N^2 is set one for all to zero at jk=1 in istate module. 828 896 !! 829 !! ** Action : pn2 : square of the brunt-vaisala frequency at w-point 897 !! ** Action : pn2 : square of the brunt-vaisala frequency at w-point 830 898 !! 831 899 !!---------------------------------------------------------------------- … … 844 912 DO ji = 1, jpi 845 913 zrw = ( fsdepw(ji,jj,jk ) - fsdept(ji,jj,jk) ) & 846 & / ( fsdept(ji,jj,jk-1) - fsdept(ji,jj,jk) ) 847 ! 848 zaw = pab(ji,jj,jk,jp_tem) * (1. - zrw) + pab(ji,jj,jk-1,jp_tem) * zrw 914 & / ( fsdept(ji,jj,jk-1) - fsdept(ji,jj,jk) ) 915 ! 916 zaw = pab(ji,jj,jk,jp_tem) * (1. - zrw) + pab(ji,jj,jk-1,jp_tem) * zrw 849 917 zbw = pab(ji,jj,jk,jp_sal) * (1. - zrw) + pab(ji,jj,jk-1,jp_sal) * zrw 850 918 ! … … 1026 1094 !! ** Purpose : Calculates nonlinear anomalies of alpha_PE, beta_PE and PE at T-points 1027 1095 !! 1028 !! ** Method : PE is defined analytically as the vertical 1096 !! ** Method : PE is defined analytically as the vertical 1029 1097 !! primitive of EOS times -g integrated between 0 and z>0. 1030 1098 !! pen is the nonlinear bsq-PE anomaly: pen = ( PE - rau0 gz ) / rau0 gz - rd 1031 !! = 1/z * /int_0^z rd dz - rd 1099 !! = 1/z * /int_0^z rd dz - rd 1032 1100 !! where rd is the density anomaly (see eos_rhd function) 1033 1101 !! ab_pe are partial derivatives of PE anomaly with respect to T and S: … … 1094 1162 ! 1095 1163 zn = ( zn2 * zh + zn1 ) * zh + zn0 1096 ! 1164 ! 1097 1165 pab_pe(ji,jj,jk,jp_tem) = zn * zh * r1_rau0 * ztm 1098 1166 ! … … 1109 1177 ! 1110 1178 zn = ( zn2 * zh + zn1 ) * zh + zn0 1111 ! 1179 ! 1112 1180 pab_pe(ji,jj,jk,jp_sal) = zn / zs * zh * r1_rau0 * ztm 1113 1181 ! … … 1589 1657 END SELECT 1590 1658 ! 1591 rau0_rcp = rau0 * rcp 1659 rau0_rcp = rau0 * rcp 1592 1660 r1_rau0 = 1._wp / rau0 1593 1661 r1_rcp = 1._wp / rcp 1594 r1_rau0_rcp = 1._wp / rau0_rcp 1662 r1_rau0_rcp = 1._wp / rau0_rcp 1595 1663 ! 1596 1664 IF(lwp) WRITE(numout,*) -
branches/2015/dev_r5177_CNRS4_stopar/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r5123 r5296 29 29 !! 3.3.1! 2011-01 (A. R. Porter, STFC Daresbury) dynamical allocation 30 30 !! 3.4 ! 2011-11 (C. Harris) decomposition changes for running with CICE 31 !! ! 2012-05 (C. Calone, J. Simeon, G. Madec, C. Ethe) Add grid coarsening 31 !! ! 2012-05 (C. Calone, J. Simeon, G. Madec, C. Ethe) Add grid coarsening 32 32 !!---------------------------------------------------------------------- 33 33 … … 59 59 USE phycst ! physical constant (par_cst routine) 60 60 USE trdini ! dyn/tra trends initialization (trd_init routine) 61 USE asminc ! assimilation increments 61 USE asminc ! assimilation increments 62 62 USE asmbkg ! writing out state trajectory 63 63 USE diaptr ! poleward transports (dia_ptr_init routine) … … 81 81 USE sbctide, ONLY: lk_tide 82 82 USE crsini ! initialise grid coarsening utility 83 USE lbcnfd, ONLY: isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges 83 USE lbcnfd, ONLY: isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges 84 USE stopar 85 USE stopts 84 86 85 87 IMPLICIT NONE … … 125 127 #if defined key_agrif 126 128 CALL Agrif_Declare_Var_dom ! AGRIF: set the meshes for DOM 127 CALL Agrif_Declare_Var ! " " " " " DYN/TRA 129 CALL Agrif_Declare_Var ! " " " " " DYN/TRA 128 130 # if defined key_top 129 131 CALL Agrif_Declare_Var_top ! " " " " " TOP … … 197 199 IF( lk_cpl ) CALL cpl_finalize ! end coupling and mpp communications with OASIS 198 200 #else 199 IF( lk_cpl ) THEN 201 IF( lk_cpl ) THEN 200 202 CALL cpl_finalize ! end coupling and mpp communications with OASIS 201 203 ELSE … … 246 248 REWIND( numnam_cfg ) ! Namelist namcfg in confguration namelist : Control prints & Benchmark 247 249 READ ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 248 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. ) 250 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. ) 249 251 250 252 ! Force values for AGRIF zoom (cf. agrif_user.F90) … … 322 324 #if defined key_nemocice_decomp 323 325 jpi = ( nx_global+2-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. 324 jpj = ( ny_global+2-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 326 jpj = ( ny_global+2-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 325 327 #else 326 328 jpi = ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. … … 392 394 393 395 CALL dyn_nept_init ! simplified form of Neptune effect 394 ! 396 ! 395 397 IF( ln_crs ) CALL crs_init ! Domain initialization of coarsened grid 396 398 ! … … 432 434 IF( nn_cla == 1 .AND. cp_cfg == 'orca' .AND. jp_cfg == 2 ) CALL cla_init ! Cross Land Advection 433 435 CALL icb_init( rdt, nit000) ! initialise icebergs instance 434 436 CALL sto_par_init ! Stochastic parametrization 437 IF( ln_sto_eos ) CALL sto_pts_init ! RRandom T/S fluctuations 438 435 439 #if defined key_top 436 440 ! ! Passive tracers … … 506 510 WRITE(numout,*) ' left bottom i index of the zoom (in data domain) jpizoom = ', jpizoom 507 511 WRITE(numout,*) ' left bottom j index of the zoom (in data domain) jpizoom = ', jpjzoom 508 WRITE(numout,*) ' lateral cond. type (between 0 and 6) jperio = ', jperio 512 WRITE(numout,*) ' lateral cond. type (between 0 and 6) jperio = ', jperio 509 513 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 510 514 ENDIF … … 607 611 USE ldftra_oce, ONLY: ldftra_oce_alloc 608 612 USE trc_oce , ONLY: trc_oce_alloc 609 #if defined key_diadct 610 USE diadct , ONLY: diadct_alloc 611 #endif 613 #if defined key_diadct 614 USE diadct , ONLY: diadct_alloc 615 #endif 612 616 #if defined key_bdy 613 617 USE bdy_oce , ONLY: bdy_oce_alloc … … 626 630 ierr = ierr + trc_oce_alloc () ! shared TRC / TRA arrays 627 631 ! 628 #if defined key_diadct 629 ierr = ierr + diadct_alloc () ! 630 #endif 632 #if defined key_diadct 633 ierr = ierr + diadct_alloc () ! 634 #endif 631 635 #if defined key_bdy 632 636 ierr = ierr + bdy_oce_alloc () ! bdy masks (incl. initialization) … … 757 761 !!====================================================================== 758 762 !! *** ROUTINE nemo_northcomms *** 759 !! nemo_northcomms : Setup for north fold exchanges with explicit 763 !! nemo_northcomms : Setup for north fold exchanges with explicit 760 764 !! point-to-point messaging 761 765 !!===================================================================== … … 765 769 !!---------------------------------------------------------------------- 766 770 !! 1.0 ! 2011-10 (A. C. Coward, NOCS & J. Donners, PRACE) 767 !! 2.0 ! 2013-06 Setup avoiding MPI communication (I. Epicoco, S. Mocavero, CMCC) 771 !! 2.0 ! 2013-06 Setup avoiding MPI communication (I. Epicoco, S. Mocavero, CMCC) 768 772 !!---------------------------------------------------------------------- 769 773 … … 772 776 773 777 njmppmax = MAXVAL( njmppt ) 774 778 775 779 !initializes the north-fold communication variables 776 780 isendto(:) = 0 … … 788 792 !loop over the other north-fold processes to find the processes 789 793 !managing the points belonging to the sxT-dxT range 790 794 791 795 DO jn = 1, jpni 792 796 !sxT is the first point (in the global domain) of the jn -
branches/2015/dev_r5177_CNRS4_stopar/NEMOGCM/NEMO/OPA_SRC/step.F90
r5147 r5296 106 106 107 107 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 108 ! Update stochastic parameters and random T/S fluctuations 109 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 110 CALL sto_par( kstp ) ! Stochastic parameters 111 112 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 108 113 ! Ocean physics update (ua, va, tsa used as workspace) 109 114 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< … … 145 150 ! 146 151 IF( lk_ldfslp ) THEN ! slope of lateral mixing 152 IF(ln_sto_eos ) CALL sto_pts( tsn ) ! Random T/S fluctuations 147 153 CALL eos( tsb, rhd, gdept_0(:,:,:) ) ! before in situ density 148 154 IF( ln_zps .AND. .NOT. ln_isfcav) & … … 173 179 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 174 180 CALL ssh_nxt ( kstp ) ! after ssh (includes call to div_cur) 175 IF( lk_vvl ) CALL dom_vvl_sf_nxt( kstp ) ! after vertical scale factors 176 CALL wzv ( kstp ) ! now cross-level velocity 177 178 IF( lk_dynspg_ts ) THEN 181 IF( lk_vvl ) CALL dom_vvl_sf_nxt( kstp ) ! after vertical scale factors 182 CALL wzv ( kstp ) ! now cross-level velocity 183 184 IF( lk_dynspg_ts ) THEN 179 185 ! In case the time splitting case, update almost all momentum trends here: 180 186 ! Note that the computation of vertical velocity above, hence "after" sea level 181 187 ! is necessary to compute momentum advection for the rhs of barotropic loop: 188 IF(ln_sto_eos ) CALL sto_pts( tsn ) ! Random T/S fluctuations 182 189 CALL eos ( tsn, rhd, rhop, fsdept_n(:,:,:) ) ! now in situ density for hpg computation 183 190 IF( ln_zps .AND. .NOT. ln_isfcav) & … … 210 217 CALL div_cur( kstp ) ! Horizontal divergence & Relative vorticity (2nd call in time-split case) 211 218 IF( lk_vvl ) CALL dom_vvl_sf_nxt( kstp, kcall=2 ) ! after vertical scale factors (update depth average component) 212 CALL wzv ( kstp ) ! now cross-level velocity 219 CALL wzv ( kstp ) ! now cross-level velocity 213 220 ENDIF 214 221 … … 261 268 IF( ln_zdfnpc ) CALL tra_npc( kstp ) ! update after fields by non-penetrative convection 262 269 CALL tra_nxt( kstp ) ! tracer fields at next time step 270 IF(ln_sto_eos ) CALL sto_pts( tsn ) ! Random T/S fluctuations 263 271 CALL eos ( tsa, rhd, rhop, fsdept_n(:,:,:) ) ! Time-filtered in situ density for hpg computation 264 272 IF( ln_zps .AND. .NOT. ln_isfcav) & … … 271 279 ELSE ! centered hpg (eos then time stepping) 272 280 IF ( .NOT. lk_dynspg_ts ) THEN ! eos already called in time-split case 281 IF(ln_sto_eos ) CALL sto_pts( tsn ) ! Random T/S fluctuations 273 282 CALL eos ( tsn, rhd, rhop, fsdept_n(:,:,:) ) ! now in situ density for hpg computation 274 283 IF( ln_zps .AND. .NOT. ln_isfcav) & 275 284 & CALL zps_hde ( kstp, jpts, tsn, gtsu, gtsv, & ! Partial steps: before horizontal gradient 276 285 & rhd, gru , grv ) ! of t, s, rd at the last ocean level 277 IF( ln_zps .AND. ln_isfcav) & 286 IF( ln_zps .AND. ln_isfcav) & 278 287 & CALL zps_hde_isf( kstp, jpts, tsn, gtsu, gtsv, & ! Partial steps for top cell (ISF) 279 288 & rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv , & … … 292 301 ua(:,:,:) = ua_sv(:,:,:) 293 302 va(:,:,:) = va_sv(:,:,:) 294 ! Revert now divergence and rotational to previously computed ones 303 ! Revert now divergence and rotational to previously computed ones 295 304 !(needed because of the time swap in div_cur, at the beginning of each time step) 296 305 hdivn(:,:,:) = hdivb(:,:,:) 297 rotn(:,:,:) = rotb(:,:,:) 306 rotn(:,:,:) = rotb(:,:,:) 298 307 299 308 CALL dyn_bfr( kstp ) ! bottom friction … … 349 358 ! 350 359 #if defined key_iomput 351 IF( kstp == nitend .OR. indic < 0 ) THEN 360 IF( kstp == nitend .OR. indic < 0 ) THEN 352 361 CALL iom_context_finalize( "nemo" ) ! needed for XIOS+AGRIF 353 IF( ln_crs ) CALL iom_context_finalize( "nemo_crs" ) ! 362 IF( ln_crs ) CALL iom_context_finalize( "nemo_crs" ) ! 354 363 ENDIF 355 364 #endif -
branches/2015/dev_r5177_CNRS4_stopar/NEMOGCM/NEMO/OPA_SRC/step_oce.F90
r4990 r5296 54 54 USE dynnxt ! time-stepping (dyn_nxt routine) 55 55 56 USE stopar ! Stochastic parametrization (sto_par routine) 57 USE stopts ! Stochastic T/S fluctuations (sto_pts routine) 58 56 59 USE bdy_par ! for lk_bdy 57 60 USE bdy_oce ! for dmp logical … … 69 72 USE ldfeiv ! eddy induced velocity coef. (ldf_eiv routine) 70 73 USE ldftra_smag ! Smagirinsky diffusion (ldftra_smag routine) 71 USE ldfdyn_smag ! Smagorinsky viscosity (ldfdyn_smag routine) 74 USE ldfdyn_smag ! Smagorinsky viscosity (ldfdyn_smag routine) 72 75 73 76 USE zdftmx ! tide-induced vertical mixing (zdf_tmx routine)
Note: See TracChangeset
for help on using the changeset viewer.