- Timestamp:
- 2020-11-18T19:02:11+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/ASM/asminc.F90
r13518 r13819 26 26 USE par_oce ! Ocean space and time domain variables 27 27 USE dom_oce ! Ocean space and time domain 28 USE domain, ONLY : dom_tile 28 29 USE domvvl ! domain: variable volume level 29 30 USE ldfdyn ! lateral diffusion: eddy viscosity coefficients … … 518 519 ! 519 520 INTEGER :: ji, jj, jk 520 INTEGER :: it 521 INTEGER :: it, itile 521 522 REAL(wp) :: zincwgt ! IAU weight for current time step 522 REAL(wp), DIMENSION( ST_2D(nn_hls),jpk) :: fzptnz ! 3d freezing point values523 REAL(wp), DIMENSION(A2D(nn_hls),jpk) :: fzptnz ! 3d freezing point values 523 524 !!---------------------------------------------------------------------- 524 525 ! 525 526 ! freezing point calculation taken from oc_fz_pt (but calculated for all depths) 526 527 ! used to prevent the applied increments taking the temperature below the local freezing point 527 ! TODO: NOT TESTED- logical is forced to False528 528 IF( ln_temnofreeze ) THEN 529 529 DO jk = 1, jpkm1 … … 550 550 ! 551 551 ! Update the tracer tendencies 552 ! TODO: NOT TESTED- logical is forced to False553 552 DO jk = 1, jpkm1 554 553 IF (ln_temnofreeze) THEN 555 554 ! Do not apply negative increments if the temperature will fall below freezing 556 WHERE(t_bkginc( ST_2D(0),jk) > 0.0_wp .OR. &557 & pts( ST_2D(0),jk,jp_tem,Kmm) + pts(ST_2D(0),jk,jp_tem,Krhs) + t_bkginc(ST_2D(0),jk) * wgtiau(it) > fzptnz(:,:,jk) )558 pts( ST_2D(0),jk,jp_tem,Krhs) = pts(ST_2D(0),jk,jp_tem,Krhs) + t_bkginc(ST_2D(0),jk) * zincwgt555 WHERE(t_bkginc(A2D(0),jk) > 0.0_wp .OR. & 556 & pts(A2D(0),jk,jp_tem,Kmm) + pts(A2D(0),jk,jp_tem,Krhs) + t_bkginc(A2D(0),jk) * wgtiau(it) > fzptnz(:,:,jk) ) 557 pts(A2D(0),jk,jp_tem,Krhs) = pts(A2D(0),jk,jp_tem,Krhs) + t_bkginc(A2D(0),jk) * zincwgt 559 558 END WHERE 560 559 ELSE … … 566 565 ! Do not apply negative increments if the salinity will fall below a specified 567 566 ! minimum value salfixmin 568 WHERE(s_bkginc( ST_2D(0),jk) > 0.0_wp .OR. &569 & pts( ST_2D(0),jk,jp_sal,Kmm) + pts(ST_2D(0),jk,jp_sal,Krhs) + s_bkginc(ST_2D(0),jk) * wgtiau(it) > salfixmin )570 pts( ST_2D(0),jk,jp_sal,Krhs) = pts(ST_2D(0),jk,jp_sal,Krhs) + s_bkginc(ST_2D(0),jk) * zincwgt567 WHERE(s_bkginc(A2D(0),jk) > 0.0_wp .OR. & 568 & pts(A2D(0),jk,jp_sal,Kmm) + pts(A2D(0),jk,jp_sal,Krhs) + s_bkginc(A2D(0),jk) * wgtiau(it) > salfixmin ) 569 pts(A2D(0),jk,jp_sal,Krhs) = pts(A2D(0),jk,jp_sal,Krhs) + s_bkginc(A2D(0),jk) * zincwgt 571 570 END WHERE 572 571 ELSE … … 594 593 ! 595 594 ! Initialize the now fields with the background + increment 596 ! TODO: NOT TESTED- logical is forced to False597 595 IF (ln_temnofreeze) THEN 598 596 ! Do not apply negative increments if the temperature will fall below freezing 599 WHERE( t_bkginc( ST_2D(0),:) > 0.0_wp .OR. pts(ST_2D(0),:,jp_tem,Kmm) + t_bkginc(ST_2D(0),:) > fzptnz(:,:,:) )600 pts( ST_2D(0),:,jp_tem,Kmm) = t_bkg(ST_2D(0),:) + t_bkginc(ST_2D(0),:)597 WHERE( t_bkginc(A2D(0),:) > 0.0_wp .OR. pts(A2D(0),:,jp_tem,Kmm) + t_bkginc(A2D(0),:) > fzptnz(:,:,:) ) 598 pts(A2D(0),:,jp_tem,Kmm) = t_bkg(A2D(0),:) + t_bkginc(A2D(0),:) 601 599 END WHERE 602 600 ELSE … … 608 606 ! Do not apply negative increments if the salinity will fall below a specified 609 607 ! minimum value salfixmin 610 WHERE( s_bkginc( ST_2D(0),:) > 0.0_wp .OR. pts(ST_2D(0),:,jp_sal,Kmm) + s_bkginc(ST_2D(0),:) > salfixmin )611 pts( ST_2D(0),:,jp_sal,Kmm) = s_bkg(ST_2D(0),:) + s_bkginc(ST_2D(0),:)608 WHERE( s_bkginc(A2D(0),:) > 0.0_wp .OR. pts(A2D(0),:,jp_sal,Kmm) + s_bkginc(A2D(0),:) > salfixmin ) 609 pts(A2D(0),:,jp_sal,Kmm) = s_bkg(A2D(0),:) + s_bkginc(A2D(0),:) 612 610 END WHERE 613 611 ELSE … … 626 624 !!gm 627 625 628 ! TEMP: This change not necessary after extra haloes development (lbc_lnk removed from zps_hde*)626 ! TEMP: [tiling] This change not necessary after extra haloes development (lbc_lnk removed from zps_hde*) 629 627 IF( ntile == 0 .OR. ntile == nijtile ) THEN ! Do only for the full domain 628 itile = ntile 629 IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 ) ! Use full domain 630 630 631 IF( ln_zps .AND. .NOT. lk_c1d .AND. .NOT. ln_isfcav) & 631 632 & CALL zps_hde ( kt, Kmm, jpts, pts(:,:,:,:,Kbb), gtsu, gtsv, & ! Partial steps: before horizontal gradient … … 634 635 & CALL zps_hde_isf( nit000, Kmm, jpts, pts(:,:,:,:,Kbb), gtsu, gtsv, gtui, gtvi, & ! Partial steps for top cell (ISF) 635 636 & rhd, gru , grv , grui, grvi ) ! of t, s, rd at the last ocean level 637 638 IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile ) ! Revert to tile domain 636 639 ENDIF 637 640 … … 646 649 ! 647 650 ENDIF 648 ! TODO: NOT TESTED- logical is forced to False649 651 ! Perhaps the following call should be in step 650 652 IF ( ln_seaiceinc ) CALL seaice_asm_inc ( kt ) ! apply sea ice concentration increment … … 859 861 REAL(wp) :: zincwgt ! IAU weight for current time step 860 862 #if defined key_si3 861 REAL(wp), DIMENSION( ST_2D(nn_hls)) :: zofrld, zohicif, zseaicendg, zhicifinc863 REAL(wp), DIMENSION(A2D(nn_hls)) :: zofrld, zohicif, zseaicendg, zhicifinc 862 864 REAL(wp) :: zhicifmin = 0.5_wp ! ice minimum depth in metres 863 865 #endif … … 897 899 ! 898 900 ! Nudge sea ice depth to bring it up to a required minimum depth 899 WHERE( zseaicendg(:,:) > 0.0_wp .AND. hm_i( ST_2D(0)) < zhicifmin )900 zhicifinc(:,:) = (zhicifmin - hm_i( ST_2D(0))) * zincwgt901 WHERE( zseaicendg(:,:) > 0.0_wp .AND. hm_i(A2D(0)) < zhicifmin ) 902 zhicifinc(:,:) = (zhicifmin - hm_i(A2D(0))) * zincwgt 901 903 ELSEWHERE 902 904 zhicifinc(:,:) = 0.0_wp … … 957 959 ! 958 960 ! Nudge sea ice depth to bring it up to a required minimum depth 959 WHERE( zseaicendg(:,:) > 0.0_wp .AND. hm_i( ST_2D(0)) < zhicifmin )960 zhicifinc(:,:) = zhicifmin - hm_i( ST_2D(0))961 WHERE( zseaicendg(:,:) > 0.0_wp .AND. hm_i(A2D(0)) < zhicifmin ) 962 zhicifinc(:,:) = zhicifmin - hm_i(A2D(0)) 961 963 ELSEWHERE 962 964 zhicifinc(:,:) = 0.0_wp
Note: See TracChangeset
for help on using the changeset viewer.