- Timestamp:
- 2015-01-29T14:13:14+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5044_CNRS_LIM3CLEAN/NEMOGCM/NEMO/LIM_SRC_3/limvar.F90
r4990 r5047 281 281 !! ** Purpose : computes salinity profile in function of bulk salinity 282 282 !! 283 !! ** Method : If bulk salinity greater than s_i_1,283 !! ** Method : If bulk salinity greater than zsi1, 284 284 !! the profile is assumed to be constant (S_inf) 285 !! If bulk salinity lower than s_i_0,285 !! If bulk salinity lower than zsi0, 286 286 !! the profile is linear with 0 at the surface (S_zero) 287 !! If it is between s_i_0 and s_i_1, it is a287 !! If it is between zsi0 and zsi1, it is a 288 288 !! alpha-weighted linear combination of s_inf and s_zero 289 289 !! … … 291 291 !!------------------------------------------------------------------ 292 292 INTEGER :: ji, jj, jk, jl ! dummy loop index 293 REAL(wp) :: dummy_fac0, dummy_fac1, dummy_fac, zsal ! local scalar 294 REAL(wp) :: zswi0, zswi01, zswibal, zargtemp , zs_zero ! - - 295 REAL(wp), POINTER, DIMENSION(:,:,:) :: z_slope_s, zalpha ! 3D pointer 293 REAL(wp) :: dummy_fac0, dummy_fac1, dummy_fac, zsal 294 REAL(wp) :: zswi0, zswi01, zswibal, zargtemp , zs_zero 295 REAL(wp), POINTER, DIMENSION(:,:,:) :: z_slope_s, zalpha 296 REAL(wp), PARAMETER :: zsi0 = 3.5_wp 297 REAL(wp), PARAMETER :: zsi1 = 4.5_wp 296 298 !!------------------------------------------------------------------ 297 299 … … 320 322 END DO 321 323 ! 322 dummy_fac0 = 1._wp / ( s_i_0 - s_i_1 ) ! Weighting factor between zs_zero and zs_inf323 dummy_fac1 = s_i_1 / ( s_i_1 - s_i_0 )324 dummy_fac0 = 1._wp / ( zsi0 - zsi1 ) ! Weighting factor between zs_zero and zs_inf 325 dummy_fac1 = zsi1 / ( zsi1 - zsi0 ) 324 326 ! 325 327 zalpha(:,:,:) = 0._wp … … 327 329 DO jj = 1, jpj 328 330 DO ji = 1, jpi 329 ! zswi0 = 1 if sm_i le s_i_0 and 0 otherwise330 zswi0 = MAX( 0._wp , SIGN( 1._wp , s_i_0 - sm_i(ji,jj,jl) ) )331 ! zswi01 = 1 if sm_i is between s_i_0 and s_i_1 and 0 othws332 zswi01 = ( 1._wp - zswi0 ) * MAX( 0._wp , SIGN( 1._wp , s_i_1 - sm_i(ji,jj,jl) ) )331 ! zswi0 = 1 if sm_i le zsi0 and 0 otherwise 332 zswi0 = MAX( 0._wp , SIGN( 1._wp , zsi0 - sm_i(ji,jj,jl) ) ) 333 ! zswi01 = 1 if sm_i is between zsi0 and zsi1 and 0 othws 334 zswi01 = ( 1._wp - zswi0 ) * MAX( 0._wp , SIGN( 1._wp , zsi1 - sm_i(ji,jj,jl) ) ) 333 335 ! If 2.sm_i GE sss_m then zswibal = 1 334 336 ! this is to force a constant salinity profile in the Baltic Sea … … 453 455 ! 454 456 REAL(wp), POINTER, DIMENSION(:) :: z_slope_s 457 REAL(wp), PARAMETER :: zsi0 = 3.5_wp 458 REAL(wp), PARAMETER :: zsi1 = 4.5_wp 455 459 !!--------------------------------------------------------------------- 456 460 … … 474 478 ! Weighting factor between zs_zero and zs_inf 475 479 !--------------------------------------------- 476 dummy_fac0 = 1._wp / ( s_i_0 - s_i_1 )477 dummy_fac1 = s_i_1 / ( s_i_1 - s_i_0 )480 dummy_fac0 = 1._wp / ( zsi0 - zsi1 ) 481 dummy_fac1 = zsi1 / ( zsi1 - zsi0 ) 478 482 dummy_fac2 = 1._wp / REAL(nlay_i,wp) 479 483 … … 484 488 ii = MOD( npb(ji) - 1 , jpi ) + 1 485 489 ij = ( npb(ji) - 1 ) / jpi + 1 486 ! zswi0 = 1 if sm_i le s_i_0 and 0 otherwise487 zswi0 = MAX( 0._wp , SIGN( 1._wp , s_i_0 - sm_i_1d(ji) ) )488 ! zswi01 = 1 if sm_i is between s_i_0 and s_i_1 and 0 othws489 zswi01 = ( 1._wp - zswi0 ) * MAX( 0._wp , SIGN( 1._wp , s_i_1 - sm_i_1d(ji) ) )490 ! zswi0 = 1 if sm_i le zsi0 and 0 otherwise 491 zswi0 = MAX( 0._wp , SIGN( 1._wp , zsi0 - sm_i_1d(ji) ) ) 492 ! zswi01 = 1 if sm_i is between zsi0 and zsi1 and 0 othws 493 zswi01 = ( 1._wp - zswi0 ) * MAX( 0._wp , SIGN( 1._wp , zsi1 - sm_i_1d(ji) ) ) 490 494 ! if 2.sm_i GE sss_m then zswibal = 1 491 495 ! this is to force a constant salinity profile in the Baltic Sea
Note: See TracChangeset
for help on using the changeset viewer.