Changeset 15418
- Timestamp:
- 2021-10-20T16:53:18+02:00 (2 years ago)
- Location:
- NEMO/branches/2020/ticket2487/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/ticket2487/src/ICE/iceistate.F90
r15410 r15418 410 410 snwice_mass_b(:,:) = snwice_mass(:,:) 411 411 ! 412 IF( ln_ice_embd ) THEN ! embedded sea-ice: deplete the initial ssh below sea-ice area 413 ! 414 sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 415 sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 416 ! 417 IF( .NOT.ln_linssh ) THEN 412 IF( ln_ice_embd .OR. ln_ice_sladj ) THEN 413 ! 414 IF( ln_ice_embd ) THEN ! embedded sea-ice: deplete the initial ssh below sea-ice area 415 ! 416 sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 417 sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 418 ! 419 ELSEIF( ln_ice_sladj ) THEN ! adjustment of sea level due to initial snow+ice mass 420 ! 421 z1_area = 1.0_wp / glob_sum( 'iceistate', e1e2t(:,:) ) 422 zsshadj = glob_sum( 'iceistate', e1e2t(:,:) * snwice_mass(:,:) ) * r1_rau0 * z1_area 423 #if defined key_agrif 424 ! Override ssh adjustment in nested domains by the root-domain ssh 425 ! adjustment; store the adjustment value in a global module variable to 426 ! make it retrievable in nested domains 427 IF( .NOT. Agrif_Root() ) zsshadj = Agrif_Parent(rsshadj) 428 rsshadj = zsshadj 429 #endif 430 IF(lwp) WRITE(numout,'(A35,F10.6,A21)') 'iceistate: sea level adjusted by ', -1.0_wp * zsshadj, ' m to compensate for' 431 IF(lwp) WRITE(numout,*) ' the initial snow+ice mass' 432 sshn(:,:) = sshn(:,:) - zsshadj 433 sshb(:,:) = sshb(:,:) - zsshadj 434 ! 435 END IF 436 ! 437 IF( .NOT.ln_linssh ) THEN ! adjustment of initial vertical scale factors 418 438 ! 419 439 z2d(:,:) = 1._wp + sshn(:,:) * ssmask(:,:) / ( ht_0(:,:) + 1._wp - ssmask(:,:) ) 420 440 ! 421 DO jk = 1,jpkm1 ! adjust initial vertical scale factors441 DO jk = 1,jpkm1 422 442 e3t_n(:,:,jk) = e3t_0(:,:,jk) * ( z2d(:,:) * tmask(:,:,jk) - ( tmask(:,:,jk) - 1.0_wp ) ) 423 443 e3t_b(:,:,jk) = e3t_n(:,:,jk) … … 425 445 END DO 426 446 ! 427 ! Reconstruction of all vertical scale factors at now and before time-steps 428 ! ========================================================================= 429 ! Horizontal scale factor interpolations 430 ! -------------------------------------- 431 CALL dom_vvl_interpol( e3t_b(:,:,:), e3u_b(:,:,:), 'U' ) 432 CALL dom_vvl_interpol( e3t_b(:,:,:), e3v_b(:,:,:), 'V' ) 433 CALL dom_vvl_interpol( e3t_n(:,:,:), e3u_n(:,:,:), 'U' ) 434 CALL dom_vvl_interpol( e3t_n(:,:,:), e3v_n(:,:,:), 'V' ) 435 CALL dom_vvl_interpol( e3u_n(:,:,:), e3f_n(:,:,:), 'F' ) 436 ! Vertical scale factor interpolations 437 ! ------------------------------------ 438 CALL dom_vvl_interpol( e3t_n(:,:,:), e3w_n (:,:,:), 'W' ) 439 CALL dom_vvl_interpol( e3u_n(:,:,:), e3uw_n(:,:,:), 'UW' ) 440 CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' ) 441 CALL dom_vvl_interpol( e3u_b(:,:,:), e3uw_b(:,:,:), 'UW' ) 442 CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' ) 443 ! t- and w- points depth 444 ! ---------------------- 445 !!gm not sure of that.... 446 gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1) 447 gdepw_n(:,:,1) = 0.0_wp 448 gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:) 449 DO jk = 2, jpk 450 gdept_n(:,:,jk) = gdept_n(:,:,jk-1) + e3w_n(:,:,jk ) 451 gdepw_n(:,:,jk) = gdepw_n(:,:,jk-1) + e3t_n(:,:,jk-1) 452 gde3w_n(:,:,jk) = gdept_n(:,:,jk ) - sshn (:,:) 453 END DO 454 ENDIF 455 ELSEIF( ln_ice_sladj ) THEN ! adjustment of sea level due to initial snow+ice mass 456 z1_area = 1.0_wp / glob_sum( 'iceistate', e1e2t(:,:) ) 457 zsshadj = glob_sum( 'iceistate', e1e2t(:,:) * snwice_mass(:,:) ) * r1_rau0 * z1_area 458 #if defined key_agrif 459 ! Override ssh adjustment in nested domains by the root-domain ssh 460 ! adjustment; store the adjustment value in a global module variable to 461 ! make it retrievable in nested domains 462 IF( .NOT. Agrif_Root() ) zsshadj = Agrif_Parent(rsshadj) 463 rsshadj = zsshadj 464 #endif 465 IF(lwp) WRITE(numout,'(A35,F10.6,A21)') 'iceistate: sea level adjusted by ', -1.0_wp * zsshadj, ' m to compensate for' 466 IF(lwp) WRITE(numout,*) ' the initial snow+ice mass' 467 sshn(:,:) = sshn(:,:) - zsshadj 468 sshb(:,:) = sshb(:,:) - zsshadj 447 CALL dom_vvl_zgr 448 ! 449 END IF 450 ! 469 451 ENDIF 470 452 -
NEMO/branches/2020/ticket2487/src/OCE/DOM/domvvl.F90
r15414 r15418 36 36 37 37 PUBLIC dom_vvl_init ! called by domain.F90 38 PUBLIC dom_vvl_zgr ! called in modules iceistate and sbcice_cice 38 39 PUBLIC dom_vvl_sf_nxt ! called by step.F90 39 40 PUBLIC dom_vvl_sf_swp ! called by step.F90 -
NEMO/branches/2020/ticket2487/src/OCE/SBC/sbcice_cice.F90
r15264 r15418 231 231 232 232 IF( .NOT.ln_rstart ) THEN 233 IF( ln_ice_embd ) THEN ! embedded sea-ice: deplete the initial ssh below sea-ice area 234 sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 235 sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 236 233 ! 234 IF( ln_ice_embd .OR. ln_ice_sladj ) THEN 235 ! 236 IF( ln_ice_embd ) THEN ! embedded sea-ice: deplete the initial ssh below sea-ice area 237 sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 238 sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 239 240 ELSEIF( ln_ice_sladj ) THEN ! adjustment of the sea level due to initial snow+ice mass 241 z1_area = 1.0_wp / glob_sum( 'sbcice_cice', e1e2t(:,:) ) 242 zsshadj = glob_sum( 'sbcice_cice', e1e2t(:,:) * snwice_mass(:,:) ) * r1_rau0 * z1_area 243 #if defined key_agrif 244 ! Override ssh adjustment in nested domains by the root-domain ssh 245 ! adjustment; store the adjustment value in a global module variable to 246 ! make it retrievable in nested domains 247 IF( .NOT. Agrif_Root() ) zsshadj = Agrif_Parent(rsshadj) 248 rsshadj = zsshadj 249 #endif 250 IF(lwp) WRITE(numout,'(A35,F10.6,A21)') 'iceistate: sea level adjusted by ', -1.0_wp * zsshadj, ' m to compensate for' 251 IF(lwp) WRITE(numout,*) ' the initial snow+ice mass' 252 sshn(:,:) = sshn(:,:) - zsshadj 253 sshb(:,:) = sshb(:,:) - zsshadj 254 ENDIF 255 ! 237 256 !!gm This should be put elsewhere.... (same remark for limsbc) 238 257 !!gm especially here it is assumed zstar coordinate, but it can be ztilde.... 239 258 IF( .NOT.ln_linssh ) THEN 240 259 ! 260 ztmp1(:,:) = 1._wp + sshn(:,:) * ssmask(:,:) / ( ht_0(:,:) + 1._wp - ssmask(:,:) ) 261 ! 241 262 DO jk = 1,jpkm1 ! adjust initial vertical scale factors 242 e3t_n(:,:,jk) = e3t_0(:,:,jk) *( 1._wp + sshn(:,:)*ssmask(:,:)/(ht_0(:,:) + 1._wp - ssmask(:,:)) )243 e3t_b(:,:,jk) = e3t_ 0(:,:,jk)*( 1._wp + sshb(:,:)*ssmask(:,:)/(ht_0(:,:) + 1._wp - ssmask(:,:)))263 e3t_n(:,:,jk) = e3t_0(:,:,jk) * ( ztmp1(:,:) * tmask(:,:,jk) - ( tmask(:,:,jk) - 1.0_wp ) ) 264 e3t_b(:,:,jk) = e3t_n(:,:,jk) 244 265 ENDDO 245 266 e3t_a(:,:,:) = e3t_b(:,:,:) 246 ! Reconstruction of all vertical scale factors at now and before time-steps 247 ! ============================================================================= 248 ! Horizontal scale factor interpolations 249 ! -------------------------------------- 250 CALL dom_vvl_interpol( e3t_b(:,:,:), e3u_b(:,:,:), 'U' ) 251 CALL dom_vvl_interpol( e3t_b(:,:,:), e3v_b(:,:,:), 'V' ) 252 CALL dom_vvl_interpol( e3t_n(:,:,:), e3u_n(:,:,:), 'U' ) 253 CALL dom_vvl_interpol( e3t_n(:,:,:), e3v_n(:,:,:), 'V' ) 254 CALL dom_vvl_interpol( e3u_n(:,:,:), e3f_n(:,:,:), 'F' ) 255 ! Vertical scale factor interpolations 256 ! ------------------------------------ 257 CALL dom_vvl_interpol( e3t_n(:,:,:), e3w_n (:,:,:), 'W' ) 258 CALL dom_vvl_interpol( e3u_n(:,:,:), e3uw_n(:,:,:), 'UW' ) 259 CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' ) 260 CALL dom_vvl_interpol( e3u_b(:,:,:), e3uw_b(:,:,:), 'UW' ) 261 CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' ) 262 ! t- and w- points depth 263 ! ---------------------- 264 gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1) 265 gdepw_n(:,:,1) = 0.0_wp 266 gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:) 267 DO jk = 2, jpk 268 gdept_n(:,:,jk) = gdept_n(:,:,jk-1) + e3w_n(:,:,jk) 269 gdepw_n(:,:,jk) = gdepw_n(:,:,jk-1) + e3t_n(:,:,jk-1) 270 gde3w_n(:,:,jk) = gdept_n(:,:,jk ) - sshn (:,:) 271 END DO 272 ENDIF 273 ELSEIF( ln_ice_sladj ) THEN ! adjustment of the sea level due to initial snow+ice mass 274 z1_area = 1.0_wp / glob_sum( 'sbcice_cice', e1e2t(:,:) ) 275 zsshadj = glob_sum( 'sbcice_cice', e1e2t(:,:) * snwice_mass(:,:) ) * r1_rau0 * z1_area 276 #if defined key_agrif 277 ! Override ssh adjustment in nested domains by the root-domain ssh 278 ! adjustment; store the adjustment value in a global module variable to 279 ! make it retrievable in nested domains 280 IF( .NOT. Agrif_Root() ) zsshadj = Agrif_Parent(rsshadj) 281 rsshadj = zsshadj 282 #endif 283 IF(lwp) WRITE(numout,'(A35,F10.6,A21)') 'iceistate: sea level adjusted by ', -1.0_wp * zsshadj, ' m to compensate for' 284 IF(lwp) WRITE(numout,*) ' the initial snow+ice mass' 285 sshn(:,:) = sshn(:,:) - zsshadj 286 sshb(:,:) = sshb(:,:) - zsshadj 267 ! 268 CALL dom_vvl_zgr 269 ! 270 END IF 287 271 ENDIF 288 272 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.