- Timestamp:
- Jul 24, 2024, 4:23:34 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/top_bound_loc.f90
r5116 r5117 60 60 ! ---------- 61 61 62 real,intent(inout) :: ucov(iip1,jjb_u:jje_u,llm) ! covariant zonal wind63 real,intent(inout) :: vcov(iip1,jjb_v:jje_v,llm) ! covariant meridional wind64 real,intent(inout) :: teta(iip1,jjb_u:jje_u,llm) ! potential temperature65 real,intent(in) :: masse(iip1,jjb_u:jje_u,llm) ! mass of atmosphere66 real,intent(in) :: dt ! time step (s) of sponge model62 REAL,INTENT(INOUT) :: ucov(iip1,jjb_u:jje_u,llm) ! covariant zonal wind 63 REAL,INTENT(INOUT) :: vcov(iip1,jjb_v:jje_v,llm) ! covariant meridional wind 64 REAL,INTENT(INOUT) :: teta(iip1,jjb_u:jje_u,llm) ! potential temperature 65 REAL,INTENT(IN) :: masse(iip1,jjb_u:jje_u,llm) ! mass of atmosphere 66 REAL,INTENT(IN) :: dt ! time step (s) of sponge model 67 67 68 68 ! REAL dv(iip1,jjb_v:jje_v,llm),du(iip1,jjb_u:jje_u,llm) … … 78 78 INTEGER :: i 79 79 REAL,SAVE :: rdamp(llm) 80 real,save :: lambda(llm) ! inverse or quenching time scale (Hz)80 REAL,save :: lambda(llm) ! inverse or quenching time scale (Hz) 81 81 LOGICAL,SAVE :: first=.TRUE. 82 82 INTEGER :: j,l,jjb,jje 83 83 84 84 85 if(iflag_top_bound == 0) return86 87 if(first) THEN85 IF (iflag_top_bound == 0) return 86 87 IF (first) THEN 88 88 !$OMP BARRIER 89 89 !$OMP MASTER 90 if(iflag_top_bound == 1) THEN90 IF (iflag_top_bound == 1) THEN 91 91 ! sponge quenching over the topmost 4 atmospheric layers 92 92 lambda(:)=0. … … 95 95 lambda(llm-2)=tau_top_bound/4. 96 96 lambda(llm-3)=tau_top_bound/8. 97 else if(iflag_top_bound == 2) THEN97 ELSE IF (iflag_top_bound == 2) THEN 98 98 ! sponge quenching over topmost layers down to pressures which are 99 99 ! higher than 100 times the topmost layer pressure … … 110 110 WRITE(lunout,*)'p (Pa) z(km) tau(s) 1./tau (Hz)' 111 111 do l=1,llm 112 if(rdamp(l)/=0.) THEN112 IF (rdamp(l)/=0.) THEN 113 113 WRITE(lunout,'(6(1pe12.4,1x))') & 114 114 presnivs(l),log(preff/presnivs(l))*scaleheight, & … … 119 119 !$OMP END MASTER 120 120 !$OMP BARRIER 121 endif! of if (first)121 ENDIF ! of if (first) 122 122 123 123 … … 125 125 126 126 ! compute zonal average of vcov (or set it to zero) 127 if(mode_top_bound>=2) THEN127 IF (mode_top_bound>=2) THEN 128 128 jjb=jj_begin 129 129 jje=jj_end … … 150 150 enddo 151 151 !$OMP END DO NOWAIT 152 endif! of if (mode_top_bound.ge.2)152 ENDIF ! of if (mode_top_bound.ge.2) 153 153 154 154 ! compute zonal average of u (or set it to zero) 155 if(mode_top_bound>=2) THEN155 IF (mode_top_bound>=2) THEN 156 156 jjb=jj_begin 157 157 jje=jj_end … … 177 177 enddo 178 178 !$OMP END DO NOWAIT 179 endif! of if (mode_top_bound.ge.2)179 ENDIF ! of if (mode_top_bound.ge.2) 180 180 181 181 ! compute zonal average of potential temperature, if necessary 182 if(mode_top_bound>=3) THEN182 IF (mode_top_bound>=3) THEN 183 183 jjb=jj_begin 184 184 jje=jj_end … … 198 198 enddo 199 199 !$OMP END DO NOWAIT 200 endif! of if (mode_top_bound.ge.3)201 202 if(mode_top_bound>=1) THEN200 ENDIF ! of if (mode_top_bound.ge.3) 201 202 IF (mode_top_bound>=1) THEN 203 203 ! Apply sponge quenching on vcov: 204 204 jjb=jj_begin … … 233 233 enddo 234 234 !$OMP END DO NOWAIT 235 endif! of if (mode_top_bound.ge.1)236 237 if(mode_top_bound>=3) THEN235 ENDIF ! of if (mode_top_bound.ge.1) 236 237 IF (mode_top_bound>=3) THEN 238 238 ! Apply sponge quenching on teta: 239 239 jjb=jj_begin … … 252 252 enddo 253 253 !$OMP END DO NOWAIT 254 endif! of if (mode_top_bond.ge.3)254 ENDIF ! of if (mode_top_bond.ge.3) 255 255 256 256 END SUBROUTINE top_bound_loc
Note: See TracChangeset
for help on using the changeset viewer.