- Timestamp:
- 2018-04-13T19:03:31+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_merge_2017/NEMOGCM/NEMO/NST_SRC/agrif_lim3_interp.F90
r9454 r9482 53 53 !!----------------------------------------------------------------------- 54 54 ! 55 IF( Agrif_Root() .OR. nn_ice==0 ) RETURN ! do not interpolate if inside Parent domainor if child domain does not have ice55 IF( Agrif_Root() .OR. nn_ice==0 ) RETURN ! do not interpolate if inside Parent Grid or if child domain does not have ice 56 56 ! 57 57 SELECT CASE( cd_type ) 58 58 CASE('U','V') 59 IF( PRESENT( kiter ) ) THEN ! interpolation at the child sub-time step (only for ice rheology)59 IF( PRESENT( kiter ) ) THEN ! interpolation at the child ice sub-time step (only for ice rheology) 60 60 zbeta = ( REAL(lim_nbstep) - REAL(kitermax - kiter) / REAL(kitermax) ) / & 61 61 & ( Agrif_Rhot() * REAL(Agrif_Parent(nn_fsbc)) / REAL(nn_fsbc) ) 62 ELSE ! interpolation at the child time step62 ELSE ! interpolation at the child ice time step 63 63 zbeta = REAL(lim_nbstep) / ( Agrif_Rhot() * REAL(Agrif_Parent(nn_fsbc)) / REAL(nn_fsbc) ) 64 64 ENDIF … … 204 204 ! 205 205 DO jk = 1, nlay_s 206 e_s(i1:i2,j1:j2,jk,jl) = ptab( :,:,jm) * tmask(i1:i2,j1:j2,1)206 e_s(i1:i2,j1:j2,jk,jl) = ptab(i1:i2,j1:j2,jm) * tmask(i1:i2,j1:j2,1) 207 207 jm = jm + 1 208 208 END DO 209 209 ! 210 210 DO jk = 1, nlay_i 211 e_i(i1:i2,j1:j2,jk,jl) = ptab( :,:,jm) * tmask(i1:i2,j1:j2,1)211 e_i(i1:i2,j1:j2,jk,jl) = ptab(i1:i2,j1:j2,jm) * tmask(i1:i2,j1:j2,1) 212 212 jm = jm + 1 213 213 END DO … … 216 216 ! 217 217 !!==> clem: this interpolation does not work because it creates negative values, due 218 ! 218 !! to negative coefficients when mixing points (for ex. z7) 219 219 !! 220 220 ! ELSE ! ==> complex interpolation (only one ghost cell available) 221 221 ! !! Use a more complex interpolation since we mix solutions over a couple of grid points 222 222 ! !! it is advised to use it for fields modified by high order schemes (e.g. advection UM5...) 223 ! !! clem: for some reason (I don't know why), the following lines do not work224 ! ! I think there is an issue with Agrif_SpecialValue here (not taken into account properly)225 223 ! ! record ztab 226 224 ! jm = 1 … … 358 356 ! ENDIF ! nbghostcells=1 359 357 360 ! integrated values361 vt_i (i1:i2,j1:j2) = SUM( v_i(i1:i2,j1:j2,:), dim=3 )362 vt_s (i1:i2,j1:j2) = SUM( v_s(i1:i2,j1:j2,:), dim=3 )363 at_i (i1:i2,j1:j2) = SUM( a_i(i1:i2,j1:j2,:), dim=3 )364 et_s(i1:i2,j1:j2) = SUM( SUM( e_s(i1:i2,j1:j2,:,:), dim=4 ), dim=3 )365 et_i(i1:i2,j1:j2) = SUM( SUM( e_i(i1:i2,j1:j2,:,:), dim=4 ), dim=3 )366 367 at_ip(i1:i2,j1:j2) = SUM( a_ip(i1:i2,j1:j2,:), dim=3 ) ! melt ponds368 vt_ip(i1:i2,j1:j2) = SUM( v_ip(i1:i2,j1:j2,:), dim=3 )369 !370 ato_i(i1:i2,j1:j2) = 1._wp - at_i(i1:i2,j1:j2) ! open water fraction371 372 358 DO jl = 1, jpl 373 359 WHERE( tmask(i1:i2,j1:j2,1) == 0._wp ) t_su(i1:i2,j1:j2,jl) = rt0 ! to avoid a division by 0 in sbcblk.F90
Note: See TracChangeset
for help on using the changeset viewer.