Changeset 8100
- Timestamp:
- 2017-05-30T14:56:13+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5803_UKMO_AGRIF_Vert_interp/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90
r7824 r8100 754 754 h_in(N_in) = ptab(ji,jj,jk,n2)/(e1e2t(ji,jj)*zrhoxy) 755 755 END DO 756 N_out = jpk-1756 N_out = 0 757 757 DO jk=1,jpk ! jpk of child grid 758 ! IF (tmask(ji,jj,jk) == 0) EXIT ! TODO: Will not work with ISF. !This doesn't seem to work at the moment. Is it just a GYRE issue??????? 759 !N_out = N_out + 1758 IF (tmask(ji,jj,jk) == 0) EXIT ! TODO: Will not work with ISF. !This doesn't seem to work at the moment in GYRE but is OK in overflow model 759 N_out = N_out + 1 760 760 h_out(jk) = e3t_n(ji,jj,jk) !Child grid scale factors. Could multiply by e1e2t here instead of division above 761 761 ENDDO … … 904 904 ! East south 905 905 IF ((eastern_side).AND.((nbondj == -1).OR.(nbondj == 2))) THEN 906 tsa(nlci-1,2,:,:) = ptab_child(nlci-1,2,:, :)906 tsa(nlci-1,2,:,:) = ptab_child(nlci-1,2,:,1:jpts) 907 907 ENDIF 908 908 ! East north 909 909 IF ((eastern_side).AND.((nbondj == 1).OR.(nbondj == 2))) THEN 910 tsa(nlci-1,nlcj-1,:,:) = ptab_child(nlci-1,nlcj-1,:, :)910 tsa(nlci-1,nlcj-1,:,:) = ptab_child(nlci-1,nlcj-1,:,1:jpts) 911 911 ENDIF 912 912 ! West south 913 913 IF ((western_side).AND.((nbondj == -1).OR.(nbondj == 2))) THEN 914 tsa(2,2,:,:) = ptab_child(2,2,:, :)914 tsa(2,2,:,:) = ptab_child(2,2,:,1:jpts) 915 915 ENDIF 916 916 ! West north 917 917 IF ((western_side).AND.((nbondj == 1).OR.(nbondj == 2))) THEN 918 tsa(2,nlcj-1,:,:) = ptab_child(2,nlcj-1,:, :)918 tsa(2,nlcj-1,:,:) = ptab_child(2,nlcj-1,:,1:jpts) 919 919 ENDIF 920 920 ! … … 978 978 zrhoy = Agrif_rhoy() 979 979 IF (before) THEN 980 !We can't use zero as the special value because we need to include zeros 981 !when interpolating the scale factors 982 IF(Agrif_UseSpecialValue) THEN 983 Agrif_SpecialValue = -999._wp 984 ELSE 985 Agrif_SpecialValue = 0._wp 986 ENDIF 980 987 DO jk=1,jpk 981 988 DO jj=j1,j2 982 989 DO ji=i1,i2 983 ptab(ji,jj,jk,1) = e2u(ji,jj) * e3u_n(ji,jj,jk) * un(ji,jj,jk) 984 ptab(ji,jj,jk,2) = umask(ji,jj,jk) * e2u(ji,jj) * e3u_n(ji,jj,jk) 990 ptab(ji,jj,jk,1) = (e2u(ji,jj) * e3u_n(ji,jj,jk) * un(ji,jj,jk)*umask(ji,jj,jk)) - & 991 & ((umask(ji,jj,jk)-1) * Agrif_SpecialValue) 992 ptab(ji,jj,jk,2) = (umask(ji,jj,jk) * e2u(ji,jj) * e3u_n(ji,jj,jk)) 985 993 END DO 986 994 END DO … … 990 998 western_side = (nb == 1).AND.(ndir == 1) 991 999 eastern_side = (nb == 1).AND.(ndir == 2) 992 1000 1001 Agrif_SpecialValue = 0._wp ! reset specialvalue to zero now interpolation completed 1002 993 1003 ptab_child(:,:,:) = 0. 994 1004 DO jj=j1,j2 … … 1013 1023 N_out = 0 1014 1024 DO jk=1,jpk 1015 if (umask( iref,jj,jk) == 0) EXIT1025 if (umask(ji,jj,jk) == 0) EXIT 1016 1026 N_out = N_out + 1 1017 1027 h_out(N_out) = e3u_n(ji,jj,jk) … … 1079 1089 zrhox = Agrif_rhox() 1080 1090 IF (before) THEN 1091 IF(Agrif_UseSpecialValue) THEN 1092 Agrif_SpecialValue = -999._wp 1093 ELSE 1094 Agrif_SpecialValue = 0._wp 1095 ENDIF 1081 1096 DO jk=k1,k2 1082 1097 DO jj=j1,j2 … … 1092 1107 southern_side = (nb == 2).AND.(ndir == 1) 1093 1108 northern_side = (nb == 2).AND.(ndir == 2) 1109 1110 Agrif_SpecialValue = 0._wp !Reset special value to zero now interpolation is done 1111 1094 1112 do jj=j1,j2 1095 1113 jref = jj
Note: See TracChangeset
for help on using the changeset viewer.