Changeset 15496
- Timestamp:
- 2021-11-11T13:02:37+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/ICE/iceistate.F90
r14997 r15496 75 75 INTEGER , PARAMETER :: jp_hld = 10 ! index of pnd lid depth (m) 76 76 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: si ! structure of input fields (file informations, fields read) 77 77 ! 78 #if defined key_agrif 79 REAL(wp), PUBLIC :: rsshadj !: initial mean ssh adjustment due to initial ice+snow mass 80 #endif 81 ! 78 82 !! * Substitutions 79 83 # include "do_loop_substitute.h90" … … 108 112 ! 109 113 INTEGER :: ji, jj, jk, jl ! dummy loop indices 110 REAL(wp) :: ztmelts 114 REAL(wp) :: ztmelts, zsshadj, area 111 115 INTEGER , DIMENSION(4) :: itest 112 116 REAL(wp), DIMENSION(jpi,jpj) :: z2d … … 414 418 ENDIF ! ln_iceini 415 419 ! 416 !---------------------------------------------- 417 ! 4) Snow-ice mass (case ice is fully embedded)418 !---------------------------------------------- 420 !---------------------------------------------------------- 421 ! 4) Adjust ssh and vertical scale factors to snow-ice mass 422 !---------------------------------------------------------- 419 423 snwice_mass (:,:) = tmask(:,:,1) * SUM( rhos * v_s + rhoi * v_i + rhow * ( v_ip + v_il ), dim=3 ) ! snow+ice mass 420 424 snwice_mass_b(:,:) = snwice_mass(:,:) 421 425 ! 422 426 IF( ln_ice_embd ) THEN ! embedded sea-ice: deplete the initial ssh below sea-ice area 423 ! 427 ! ! ---------------- 424 428 ssh(:,:,Kmm) = ssh(:,:,Kmm) - snwice_mass(:,:) * r1_rho0 425 429 ssh(:,:,Kbb) = ssh(:,:,Kbb) - snwice_mass(:,:) * r1_rho0 426 430 ! 431 ELSE ! levitating sea-ice: deplete the initial ssh over the whole domain 432 ! ! ------------------ 433 area = glob_sum( 'iceistate', e1e2t(:,:) * ssmask(:,:) ) 434 zsshadj = glob_sum( 'iceistate', snwice_mass(:,:) * r1_rho0 * e1e2t(:,:) ) / area 435 #if defined key_agrif 436 ! Override ssh adjustment in nested domains by the root-domain ssh adjustment; 437 ! store the adjustment value in a global module variable to make it retrievable in nested domains 438 IF( .NOT.Agrif_Root() ) THEN 439 zsshadj = Agrif_Parent(rsshadj) 440 ELSE 441 rsshadj = zsshadj 442 ENDIF 443 #endif 444 IF(lwp) WRITE(numout,'(A23,F10.6,A20)') ' sea level adjusted by ', -zsshadj, ' m to compensate for' 445 IF(lwp) WRITE(numout,*) ' the initial snow+ice mass' 446 ! 447 WHERE( ssmask(:,:) == 1._wp ) 448 ssh(:,:,Kmm) = ssh(:,:,Kmm) - zsshadj 449 ssh(:,:,Kbb) = ssh(:,:,Kbb) - zsshadj 450 ENDWHERE 451 ! 452 ENDIF 453 ! 454 IF( .NOT.ln_linssh ) THEN 427 455 #if defined key_qco 428 IF( .NOT.ln_linssh )CALL dom_qco_zgr( Kbb, Kmm ) ! upadte of r3=ssh/h0 ratios456 CALL dom_qco_zgr( Kbb, Kmm ) ! upadte of r3=ssh/h0 ratios 429 457 #elif defined key_linssh 430 ! ! fix in time coord. : no update of vertical coord.458 ! ! Fix in time : key_linssh case, set through domzgr_substitute.h90 431 459 #else 432 IF( .NOT.ln_linssh ) CALL dom_vvl_zgr( Kbb, Kmm, Kaa ) ! interpolation scale factor, depth and water column 460 DO jk = 1, jpk 461 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls) 462 IF( snwice_mass(ji,jj) /= 0._wp ) THEN 463 e3t(ji,jj,jk,Kmm) = e3t_0(ji,jj,jk) * ( 1._wp + ssh(ji,jj,Kmm) * r1_ht_0(ji,jj) * tmask(ji,jj,jk) ) 464 e3t(ji,jj,jk,Kbb) = e3t_0(ji,jj,jk) * ( 1._wp + ssh(ji,jj,Kbb) * r1_ht_0(ji,jj) * tmask(ji,jj,jk) ) 465 ENDIF 466 END_2D 467 END DO 468 ! 469 CALL dom_vvl_zgr( Kbb, Kmm, Kaa ) ! interpolation of scale factor, depth and water column 433 470 #endif 434 435 471 ENDIF 436 472 ! 437 473 !!clem: output of initial state should be written here but it is impossible because 438 474 !! the ocean and ice are in the same file
Note: See TracChangeset
for help on using the changeset viewer.