Changeset 15495
- Timestamp:
- 2021-11-10T17:18:22+01:00 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/releases/r4.0/r4.0-HEAD/src/ICE/iceistate.F90
r15451 r15495 65 65 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: si ! structure of input fields (file informations, fields read) 66 66 ! 67 #if defined key_agrif 68 REAL(wp), PUBLIC :: rsshadj !: initial mean ssh adjustment due to initial ice+snow mass 69 #endif 67 70 !!---------------------------------------------------------------------- 68 71 !! NEMO/ICE 4.0 , NEMO Consortium (2018) … … 94 97 !! 95 98 INTEGER :: ji, jj, jk, jl ! dummy loop indices 96 REAL(wp) :: ztmelts 99 REAL(wp) :: ztmelts, zsshadj, area 97 100 INTEGER , DIMENSION(4) :: itest 98 101 REAL(wp), DIMENSION(jpi,jpj) :: zswitch ! ice indicator … … 399 402 ENDIF ! ln_iceini 400 403 ! 401 !---------------------------------------------- 402 ! 4) Snow-ice mass (case ice is fully embedded)403 !---------------------------------------------- 404 !---------------------------------------------------------- 405 ! 4) Adjust ssh and vertical scale factors to snow-ice mass 406 !---------------------------------------------------------- 404 407 snwice_mass (:,:) = tmask(:,:,1) * SUM( rhos * v_s + rhoi * v_i + rhow * ( v_ip + v_il ), dim=3 ) ! snow+ice mass 405 408 snwice_mass_b(:,:) = snwice_mass(:,:) 406 409 ! 407 410 IF( ln_ice_embd ) THEN ! embedded sea-ice: deplete the initial ssh below sea-ice area 408 ! 411 ! ! ---------------- 409 412 sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 410 413 sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 411 414 ! 412 IF( .NOT.ln_linssh ) THEN 413 ! 414 DO jk = 1, jpkm1 ! adjust initial vertical scale factors 415 DO jj = 1, jpj 416 DO ji = 1, jpi 417 IF( snwice_mass(ji,jj) /= 0._wp ) THEN 418 e3t_n(ji,jj,jk) = e3t_0(ji,jj,jk) * ( 1._wp + sshn(ji,jj) * tmask(ji,jj,jk) / ht_0(ji,jj) ) 419 e3t_b(ji,jj,jk) = e3t_n(ji,jj,jk) 420 e3t_a(ji,jj,jk) = e3t_n(ji,jj,jk) 421 ENDIF 422 END DO 415 ELSE ! levitating sea-ice: deplete the initial ssh over the whole domain 416 ! ! ------------------ 417 area = glob_sum( 'iceistate', e1e2t(:,:) * ssmask(:,:) ) 418 zsshadj = glob_sum( 'iceistate', snwice_mass(:,:) * r1_rau0 * e1e2t(:,:) ) / area 419 #if defined key_agrif 420 ! Override ssh adjustment in nested domains by the root-domain ssh adjustment; 421 ! store the adjustment value in a global module variable to make it retrievable in nested domains 422 IF( .NOT.Agrif_Root() ) THEN 423 zsshadj = Agrif_Parent(rsshadj) 424 ELSE 425 rsshadj = zsshadj 426 ENDIF 427 #endif 428 IF(lwp) WRITE(numout,'(A23,F10.6,A20)') ' sea level adjusted by ', -zsshadj, ' m to compensate for' 429 IF(lwp) WRITE(numout,*) ' the initial snow+ice mass' 430 ! 431 WHERE( ssmask(:,:) == 1._wp ) 432 sshn(:,:) = sshn(:,:) - zsshadj 433 sshb(:,:) = sshb(:,:) - zsshadj 434 ENDWHERE 435 ! 436 ENDIF 437 438 IF( .NOT.ln_linssh ) THEN 439 ! 440 DO jk = 1, jpkm1 ! adjust initial vertical scale factors 441 DO jj = 1, jpj 442 DO ji = 1, jpi 443 IF( snwice_mass(ji,jj) /= 0._wp ) THEN 444 e3t_n(ji,jj,jk) = e3t_0(ji,jj,jk) * ( 1._wp + sshn(ji,jj) * tmask(ji,jj,jk) / ht_0(ji,jj) ) 445 e3t_b(ji,jj,jk) = e3t_n(ji,jj,jk) 446 e3t_a(ji,jj,jk) = e3t_n(ji,jj,jk) 447 ENDIF 423 448 END DO 424 449 END DO 425 ! 426 CALL dom_vvl_zgr ! interpolation of all scale factors 427 ! 428 ENDIF 450 END DO 451 ! 452 CALL dom_vvl_zgr ! interpolation of all scale factors 429 453 ! 430 454 ENDIF 431 455 ! 432 456 !!clem: output of initial state should be written here but it is impossible because 433 457 !! the ocean and ice are in the same file
Note: See TracChangeset
for help on using the changeset viewer.