Changeset 1283
- Timestamp:
- Jun 5, 2014, 12:34:37 PM (11 years ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/README
r1216 r1283 1024 1024 over the whole planet. This should be further imroved with computation of 1025 1025 means (possibly area weighed), etc. 1026 1027 == 05/06/2014 == EM 1028 Bug fixes: 1029 - hice() in physiq.F90 must be a saved array. 1030 - bad use of min/max on arrays in h2o_cloudrad (radii_mod.F90) which actually 1031 ended up setting all array elements to the same value. 1032 And some cosmetic cleanup in rain.F90, vdif_kc.F and turbdiff.F90 1033 -
trunk/LMDZ.GENERIC/libf/phystd/physiq.F90
r1252 r1283 348 348 349 349 ! included by BC for hydrology 350 real hice(ngrid)350 real,allocatable,save :: hice(:) 351 351 352 352 ! included by RW to test water conservation (by routine) … … 454 454 ALLOCATE(cloudfrac(ngrid,nlayermx)) 455 455 ALLOCATE(totcloudfrac(ngrid)) 456 ALLOCATE(hice(ngrid)) 456 457 ALLOCATE(qsurf_hist(ngrid,nq)) 457 458 ALLOCATE(reffrad(ngrid,nlayermx,naerkind)) … … 976 977 zdtsurf(1:ngrid)=zdtsurf(1:ngrid)+zdtsdif(1:ngrid) 977 978 if (tracer) then 978 pdq(1:ngrid,1:nlayermx,1:nq)=pdq(1:ngrid,1:nlayermx,1:nq)+ zdqdif(1:ngrid,1:nlayermx,1:nq) 979 pdq(1:ngrid,1:nlayermx,1:nq)=pdq(1:ngrid,1:nlayermx,1:nq)+ zdqdif(1:ngrid,1:nlayermx,1:nq) 979 980 dqsurf(1:ngrid,1:nq)=dqsurf(1:ngrid,1:nq) + zdqsdif(1:ngrid,1:nq) 980 981 end if ! of if (tracer) … … 1064 1065 pdt(1:ngrid,1:nlayermx) = pdt(1:ngrid,1:nlayermx) + zdhadj(1:ngrid,1:nlayermx)*zpopsk(1:ngrid,1:nlayermx) 1065 1066 zdtadj(1:ngrid,1:nlayermx) = zdhadj(1:ngrid,1:nlayermx)*zpopsk(1:ngrid,1:nlayermx) ! for diagnostic only 1066 1067 1067 1068 if(tracer) then 1068 1069 pdq(1:ngrid,1:nlayermx,1:nq) = pdq(1:ngrid,1:nlayermx,1:nq) + zdqadj(1:ngrid,1:nlayermx,1:nq) … … 1112 1113 zdtc,zdtsurfc,pdpsrf,zduc,zdvc, & 1113 1114 zdqc) 1114 1115 1115 1116 1116 pdt(1:ngrid,1:nlayermx)=pdt(1:ngrid,1:nlayermx)+zdtc(1:ngrid,1:nlayermx) … … 1246 1246 dqsurf(1:ngrid,igcm_h2o_ice) = dqsurf(1:ngrid,igcm_h2o_ice)+zdqssnow(1:ngrid) 1247 1247 rainout(1:ngrid) = zdqsrain(1:ngrid)+zdqssnow(1:ngrid) ! diagnostic 1248 1249 1248 1250 1249 !------------------------- -
trunk/LMDZ.GENERIC/libf/phystd/radii_mod.F90
r1026 r1283 38 38 Implicit none 39 39 40 #include "callkeys.h"41 #include "dimensions.h"42 #include "dimphys.h"40 include "callkeys.h" 41 include "dimensions.h" 42 include "dimphys.h" 43 43 44 44 integer,intent(in) :: ngrid … … 140 140 Implicit none 141 141 142 #include "callkeys.h"143 #include "dimensions.h"144 #include "dimphys.h"145 #include "comcstfi.h"142 include "callkeys.h" 143 include "dimensions.h" 144 include "dimphys.h" 145 include "comcstfi.h" 146 146 147 147 integer,intent(in) :: ngrid … … 200 200 Implicit none 201 201 202 #include "callkeys.h"203 #include "dimensions.h"204 #include "dimphys.h"205 #include "comcstfi.h"202 include "callkeys.h" 203 include "dimensions.h" 204 include "dimphys.h" 205 include "comcstfi.h" 206 206 207 207 integer,intent(in) :: ngrid 208 208 209 209 real, intent(in) :: pql(ngrid,nlayermx) !condensed water mixing ratios (kg/kg) 210 real, intent(out) :: reffliq(ngrid,nlayermx),reffice(ngrid,nlayermx) !liquid and ice water particle radii ( K)210 real, intent(out) :: reffliq(ngrid,nlayermx),reffice(ngrid,nlayermx) !liquid and ice water particle radii (m) 211 211 212 212 real,external :: CBRT 213 213 integer :: i,k 214 214 215 215 if (radfixed) then … … 217 217 reffice(1:ngrid,1:nlayermx)= rad_h2o_ice 218 218 else 219 reffliq(1:ngrid,1:nlayermx) = CBRT( 3*pql(1:ngrid,1:nlayermx)/(4*Nmix_h2o*pi*rhowater) ) 220 reffliq(1:ngrid,1:nlayermx) = min(max(reffliq(1:ngrid,1:nlayermx),1.e-6),1000.e-6) 221 reffice(1:ngrid,1:nlayermx) = CBRT( 3*pql(1:ngrid,1:nlayermx)/(4*Nmix_h2o_ice*pi*rhowaterice) ) 222 reffice(1:ngrid,1:nlayermx) = min(max(reffice(1:ngrid,1:nlayermx),1.e-6),1000.e-6) 223 end if 219 do k=1,nlayermx 220 do i=1,ngrid 221 reffliq(i,k) = CBRT(3*pql(i,k)/(4*Nmix_h2o*pi*rhowater)) 222 reffliq(i,k) = min(max(reffliq(i,k),1.e-6),1000.e-6) 223 224 reffice(i,k) = CBRT(3*pql(i,k)/(4*Nmix_h2o_ice*pi*rhowaterice)) 225 reffice(i,k) = min(max(reffice(i,k),1.e-6),1000.e-6) 226 enddo 227 enddo 228 endif 224 229 225 230 end subroutine h2o_cloudrad … … 243 248 Implicit none 244 249 245 #include "callkeys.h"246 #include "dimensions.h"247 #include "dimphys.h"248 #include "comcstfi.h"250 include "callkeys.h" 251 include "dimensions.h" 252 include "dimphys.h" 253 include "comcstfi.h" 249 254 250 255 integer,intent(in) :: ngrid,nq … … 289 294 Implicit none 290 295 291 #include "callkeys.h"292 #include "dimensions.h"293 #include "dimphys.h"296 include "callkeys.h" 297 include "dimensions.h" 298 include "dimphys.h" 294 299 295 300 integer,intent(in) :: ngrid … … 317 322 Implicit none 318 323 319 #include "callkeys.h"320 #include "dimensions.h"321 #include "dimphys.h"324 include "callkeys.h" 325 include "dimensions.h" 326 include "dimphys.h" 322 327 323 328 integer,intent(in) :: ngrid … … 346 351 Implicit none 347 352 348 #include "callkeys.h"349 #include "dimensions.h"350 #include "dimphys.h"353 include "callkeys.h" 354 include "dimensions.h" 355 include "dimphys.h" 351 356 352 357 integer,intent(in) :: ngrid -
trunk/LMDZ.GENERIC/libf/phystd/rain.F90
r1016 r1283 2 2 3 3 4 ! to use 'getin' 5 use ioipsl_getincom 4 use ioipsl_getincom, only: getin 6 5 use watercommon_h, only: T_h2O_ice_liq,T_h2O_ice_clouds, RLVTT, RCPD, RCPV, RV, RVTMP2,Psat_water,Tsat_water,rhowater 7 6 use radii_mod, only: h2o_cloudrad 8 USE tracer_h 7 USE tracer_h, only: igcm_h2o_vap, igcm_h2o_ice 9 8 implicit none 10 9 … … 23 22 !================================================================== 24 23 25 #include "dimensions.h"26 #include "dimphys.h"27 #include "comcstfi.h"28 #include "callkeys.h"24 include "dimensions.h" 25 include "dimphys.h" 26 include "comcstfi.h" 27 include "callkeys.h" 29 28 30 29 ! Arguments … … 149 148 150 149 firstcall = .false. 151 ENDIF 150 ENDIF ! of IF (firstcall) 152 151 153 152 ! GCM -----> subroutine variables … … 173 172 174 173 ! Initialise the outputs 175 DO k = 1, nlayermx 176 DO i = 1, ngrid 177 d_t(i,k) = 0.0 178 d_q(i,k) = 0.0 179 d_ql(i,k) = 0.0 180 ENDDO 181 ENDDO 182 DO i = 1, ngrid 183 zrfl(i) = 0.0 184 zrfln(i) = 0.0 185 ENDDO 174 d_t(1:ngrid,1:nlayermx) = 0.0 175 d_q(1:ngrid,1:nlayermx) = 0.0 176 d_ql(1:ngrid,1:nlayermx) = 0.0 177 zrfl(1:ngrid) = 0.0 178 zrfln(1:ngrid) = 0.0 186 179 187 180 ! calculate saturation mixing ratio … … 203 196 ENDDO 204 197 205 206 198 ! Vertical loop (from top to bottom) 207 199 ! We carry the rain with us and calculate that added by warm/cold precipitation 208 200 ! processes and that subtracted by evaporation at each level. 209 DO 9999k = nlayermx, 1, -1201 DO k = nlayermx, 1, -1 210 202 211 203 IF (evap_prec) THEN ! note no rneb dependence! … … 236 228 237 229 238 ENDIF 230 ENDIF ! of IF (zrfl(i) .GT.0.) 239 231 ENDDO 240 ENDIF 241 242 DO i = 1, ngrid 243 zoliq(i) = 0.0 244 ENDDO 232 ENDIF ! of IF (evap_prec) 233 234 zoliq(1:ngrid) = 0.0 245 235 246 236 … … 367 357 endif ! if precip_scheme=1 368 358 369 9999 continue359 ENDDO ! of DO k = nlayermx, 1, -1 370 360 371 361 ! Rain or snow on the ground … … 385 375 386 376 ! now subroutine -----> GCM variables 387 DO k = 1, nlayermx 388 DO i = 1, ngrid 389 390 if(evap_prec)then 391 dqrain(i,k,i_vap) = d_q(i,k)/ptimestep 392 d_t(i,k) = d_t(i,k)/ptimestep 393 else 394 dqrain(i,k,i_vap) = 0.0 395 d_t(i,k) = 0.0 396 endif 397 dqrain(i,k,i_ice) = d_ql(i,k)/ptimestep 398 399 ENDDO 400 ENDDO 401 402 RETURN 377 if (evap_prec) then 378 dqrain(1:ngrid,1:nlayermx,i_vap)=dqrain(1:ngrid,1:nlayermx,i_vap)/ptimestep 379 d_t(1:ngrid,1:nlayermx)=d_t(1:ngrid,1:nlayermx)/ptimestep 380 else 381 dqrain(1:ngrid,1:nlayermx,i_vap)=0.0 382 d_t(1:ngrid,1:nlayermx)=0.0 383 endif 384 dqrain(1:ngrid,1:nlayermx,i_ice) = d_ql(1:ngrid,1:nlayermx)/ptimestep 385 403 386 end subroutine rain -
trunk/LMDZ.GENERIC/libf/phystd/turbdiff.F90
r1194 r1283 9 9 use watercommon_h, only : RLVTT, T_h2O_ice_liq, RCPD, mx_eau_sol,Psat_water 10 10 use radcommon_h, only : sigma, glat 11 USE surfdat_h 12 USE comgeomfi_h 13 USE tracer_h 11 use surfdat_h, only: dryness 12 use tracer_h, only: igcm_h2o_vap, igcm_h2o_ice 14 13 15 14 implicit none … … 42 41 ! ------------ 43 42 44 #include "dimensions.h"45 #include "dimphys.h"46 #include "comcstfi.h"47 #include "callkeys.h"43 include "dimensions.h" 44 include "dimphys.h" 45 include "comcstfi.h" 46 include "callkeys.h" 48 47 49 48 ! arguments 50 49 ! --------- 51 INTEGER ngrid,nlay 52 REAL ptimestep 53 REAL pplay(ngrid,nlay),pplev(ngrid,nlay+1) 54 REAL pzlay(ngrid,nlay),pzlev(ngrid,nlay+1) 55 REAL pu(ngrid,nlay),pv(ngrid,nlay) 56 REAL pt(ngrid,nlay),ppopsk(ngrid,nlay) 57 REAL ptsrf(ngrid),pemis(ngrid) 58 REAL pdufi(ngrid,nlay),pdvfi(ngrid,nlay) 59 REAL pdtfi(ngrid,nlay) 60 REAL pfluxsrf(ngrid) 61 REAL pdudif(ngrid,nlay),pdvdif(ngrid,nlay) 62 REAL pdtdif(ngrid,nlay) 63 REAL pdtsrf(ngrid),sensibFlux(ngrid),pcapcal(ngrid) 64 REAL pq2(ngrid,nlay+1) 50 INTEGER,INTENT(IN) :: ngrid,nlay 51 REAL,INTENT(IN) :: ptimestep 52 REAL,INTENT(IN) :: pplay(ngrid,nlay),pplev(ngrid,nlay+1) 53 REAL,INTENT(IN) :: pzlay(ngrid,nlay),pzlev(ngrid,nlay+1) 54 REAL,INTENT(IN) :: pu(ngrid,nlay),pv(ngrid,nlay) 55 REAL,INTENT(IN) :: pt(ngrid,nlay),ppopsk(ngrid,nlay) 56 REAL,INTENT(IN) :: ptsrf(ngrid) ! surface temperature (K) 57 REAL,INTENT(IN) :: pemis(ngrid) 58 REAL,INTENT(IN) :: pdufi(ngrid,nlay),pdvfi(ngrid,nlay) 59 REAL,INTENT(IN) :: pdtfi(ngrid,nlay) 60 REAL,INTENT(IN) :: pfluxsrf(ngrid) 61 REAL,INTENT(OUT) :: pdudif(ngrid,nlay),pdvdif(ngrid,nlay) 62 REAL,INTENT(OUT) :: pdtdif(ngrid,nlay) 63 REAL,INTENT(OUT) :: pdtsrf(ngrid) ! tendency (K/s) on surface temperature 64 REAL,INTENT(OUT) :: sensibFlux(ngrid) 65 REAL,INTENT(IN) :: pcapcal(ngrid) 66 REAL,INTENT(INOUT) :: pq2(ngrid,nlay+1) 65 67 66 integer rnat(ngrid) 68 integer,intent(in) :: rnat(ngrid) 69 LOGICAL,INTENT(IN) :: lastcall ! not used 67 70 68 71 ! Arguments added for condensation 69 logical lecrit70 REAL pz072 logical,intent(in) :: lecrit ! not used. 73 REAL,INTENT(IN) :: pz0 71 74 72 75 ! Tracers 73 76 ! -------- 74 integer nq75 real pqsurf(ngrid,nq)76 real pq(ngrid,nlay,nq), pdqfi(ngrid,nlay,nq)77 real pdqdif(ngrid,nlay,nq)78 real pdqsdif(ngrid,nq)77 integer,intent(in) :: nq 78 real,intent(in) :: pqsurf(ngrid,nq) 79 real,intent(in) :: pq(ngrid,nlay,nq), pdqfi(ngrid,nlay,nq) 80 real,intent(out) :: pdqdif(ngrid,nlay,nq) 81 real,intent(out) :: pdqsdif(ngrid,nq) 79 82 80 83 ! local … … 102 105 REAL zx_alf1(ngrid),zx_alf2(ngrid) 103 106 104 LOGICAL firstcall 105 SAVE firstcall 107 LOGICAL,SAVE :: firstcall=.true. 106 108 107 LOGICAL lastcall108 109 ! Tracers 109 110 ! ------- … … 115 116 REAL rho(ngrid) ! near-surface air density 116 117 REAL qsat(ngrid),psat(ngrid) 117 DATA firstcall/.true./118 118 REAL kmixmin 119 119 … … 242 242 243 243 call vdif_kc(ngrid,ptimestep,g,pzlev,pzlay,pu,pv,zh,zcdv_true,pq2,zkv,zkh) !JL12 why not call vdif_kc with updated winds and temperature 244 244 245 245 ! Adding eddy mixing to mimic 3D general circulation in 1D 246 246 ! R. Wordsworth & F. Forget (2010) … … 731 731 ! endif 732 732 733 734 return735 733 end -
trunk/LMDZ.GENERIC/libf/phystd/vdif_kc.F
r787 r1283 27 27 c 28 28 c....................................................................... 29 INTEGER ngrid30 REAL dt,g31 REAL zlev(ngrid,nlayermx+1)32 REAL zlay(ngrid,nlayermx)33 REAL u(ngrid,nlayermx)34 REAL v(ngrid,nlayermx)35 REAL teta(ngrid,nlayermx)36 REAL cd(ngrid)37 REAL q2(ngrid,nlayermx+1)38 REAL km(ngrid,nlayermx+1)39 REAL kn(ngrid,nlayermx+1)29 INTEGER,INTENT(IN) :: ngrid 30 REAL,INTENT(IN) :: dt,g 31 REAL,INTENT(IN) :: zlev(ngrid,nlayermx+1) 32 REAL,INTENT(IN) :: zlay(ngrid,nlayermx) 33 REAL,INTENT(IN) :: u(ngrid,nlayermx) 34 REAL,INTENT(IN) :: v(ngrid,nlayermx) 35 REAL,INTENT(IN) :: teta(ngrid,nlayermx) 36 REAL,INTENT(IN) :: cd(ngrid) 37 REAL,INTENT(INOUT) :: q2(ngrid,nlayermx+1) 38 REAL,INTENT(OUT) :: km(ngrid,nlayermx+1) 39 REAL,INTENT(OUT) :: kn(ngrid,nlayermx+1) 40 40 c....................................................................... 41 41 c … … 50 50 c 51 51 c....................................................................... 52 INTEGER nlay,nlev 52 INTEGER,PARAMETER :: nlay=nlayermx 53 INTEGER,PARAMETER :: nlev=nlayermx+1 53 54 REAL unsdz(ngrid,nlayermx) 54 55 REAL unsdzdec(ngrid,nlayermx+1) … … 114 115 c....................................................................... 115 116 REAL gn 116 REAL gnmin117 REAL gnmax117 REAL,PARAMETER :: gnmin=-10.E+0 118 REAL,PARAMETER :: gnmax=0.0233E+0 118 119 LOGICAL gninf 119 120 LOGICAL gnsup … … 134 135 c 135 136 c....................................................................... 136 REAL kappa 137 REAL long0 138 REAL a1,a2,b1,b2,c1 139 REAL cn1,cn2 140 REAL cm1,cm2,cm3,cm4 137 REAL,PARAMETER :: kappa=0.4E+0 138 REAL,PARAMETER :: long0=160.E+0 139 REAL,PARAMETER :: a1=0.92E+0,a2=0.74E+0 140 REAL,PARAMETER :: b1=16.6E+0,b2=10.1E+0,c1=0.08E+0 141 REAL,PARAMETER :: cn1=a2*(1.E+0 -6.E+0 *a1/b1) 142 REAL,PARAMETER :: cn2=-3.E+0 *a2*(6.E+0 *a1+b2) 143 REAL,PARAMETER :: cm1=a1*(1.E+0 -3.E+0 *c1-6.E+0 *a1/b1) 144 REAL,PARAMETER :: cm2=a1*(-3.E+0 *a2*((b2-3.E+0 *a2)* 145 & (1.E+0 -6.E+0 *a1/b1)-3.E+0 *c1*(b2+6.E+0 *a1))) 146 REAL,PARAMETER :: cm3=-3.E+0 *a2*(6.E+0 *a1+b2) 147 REAL,PARAMETER :: cm4=-9.E+0 *a1*a2 141 148 c....................................................................... 142 149 c … … 157 164 c 158 165 c....................................................................... 159 REAL q2min160 REAL q2max166 REAL,PARAMETER :: q2min=1.E-3 167 REAL,PARAMETER :: q2max=1.E+2 161 168 c....................................................................... 162 169 c knmin : borne inferieure de kn 163 170 c kmmin : borne inferieure de km 164 171 c....................................................................... 165 REAL knmin166 REAL kmmin172 REAL,PARAMETER :: knmin=1.E-5 173 REAL,PARAMETER :: kmmin=1.E-5 167 174 c....................................................................... 168 175 INTEGER ilay,ilev,igrid 169 176 REAL tmp1,tmp2 170 177 c....................................................................... 171 PARAMETER (kappa=0.4E+0) 172 PARAMETER (long0=160.E+0) 173 PARAMETER (gnmin=-10.E+0) 174 PARAMETER (gnmax=0.0233E+0) 175 PARAMETER (a1=0.92E+0) 176 PARAMETER (a2=0.74E+0) 177 PARAMETER (b1=16.6E+0) 178 PARAMETER (b2=10.1E+0) 179 PARAMETER (c1=0.08E+0) 180 PARAMETER (knmin=1.E-5) 181 PARAMETER (kmmin=1.E-5) 182 PARAMETER (q2min=1.E-3) 183 PARAMETER (q2max=1.E+2) 184 PARAMETER (nlay=nlayermx) 185 PARAMETER (nlev=nlayermx+1) 186 c 187 PARAMETER ( 188 & cn1=a2*(1.E+0 -6.E+0 *a1/b1) 189 & ) 190 PARAMETER ( 191 & cn2=-3.E+0 *a2*(6.E+0 *a1+b2) 192 & ) 193 PARAMETER ( 194 & cm1=a1*(1.E+0 -3.E+0 *c1-6.E+0 *a1/b1) 195 & ) 196 PARAMETER ( 197 & cm2=a1*(-3.E+0 *a2*((b2-3.E+0 *a2)*(1.E+0 -6.E+0 *a1/b1) 198 & -3.E+0 *c1*(b2+6.E+0 *a1))) 199 & ) 200 PARAMETER ( 201 & cm3=-3.E+0 *a2*(6.E+0 *a1+b2) 202 & ) 203 PARAMETER ( 204 & cm4=-9.E+0 *a1*a2 205 & ) 178 c 179 180 ! initialization of local variables: 181 long(:,:)=0. 182 n2(:,:)=0. 183 sn(:,:)=0. 184 snq2(:,:)=0. 185 sm(:,:)=0. 186 smq2(:,:)=0. 187 206 188 c....................................................................... 207 189 c traitment des valeur de q2 en entree … … 209 191 c 210 192 DO ilev=1,nlev 211 193 DO igrid=1,ngrid 212 194 q2(igrid,ilev)=amax1(q2(igrid,ilev),q2min) 213 195 q(igrid,ilev)=sqrt(q2(igrid,ilev)) 214 215 ENDDO 216 c 217 218 tmp1=cd(igrid)*(u(igrid,1)**2+v(igrid,1)**2)219 q2(igrid,1)=b1**(2.E+0/3.E+0)*tmp1220 q2(igrid,1)=amax1(q2(igrid,1),q2min)221 q(igrid,1)=sqrt(q2(igrid,1))222 196 ENDDO 197 ENDDO 198 c 199 DO igrid=1,ngrid 200 tmp1=cd(igrid)*(u(igrid,1)**2+v(igrid,1)**2) 201 q2(igrid,1)=b1**(2.E+0/3.E+0)*tmp1 202 q2(igrid,1)=amax1(q2(igrid,1),q2min) 203 q(igrid,1)=sqrt(q2(igrid,1)) 204 ENDDO 223 205 c 224 206 c....................................................................... … … 237 219 c 238 220 DO ilay=1,nlay 239 221 DO igrid=1,ngrid 240 222 unsdz(igrid,ilay)=1.E+0/(zlev(igrid,ilay+1)-zlev(igrid,ilay)) 241 ENDDO 242 ENDDO 243 DO igrid=1,ngrid 244 unsdzdec(igrid,1)=1.E+0/(zlay(igrid,1)-zlev(igrid,1)) 245 ENDDO 223 ENDDO 224 ENDDO 225 226 DO igrid=1,ngrid 227 unsdzdec(igrid,1)=1.E+0/(zlay(igrid,1)-zlev(igrid,1)) 228 ENDDO 229 246 230 DO ilay=2,nlay 247 DO igrid=1,ngrid 248 unsdzdec(igrid,ilay)=1.E+0/(zlay(igrid,ilay)-zlay(igrid,ilay-1)) 249 ENDDO 250 ENDDO 251 DO igrid=1,ngrid 252 unsdzdec(igrid,nlay+1)=1.E+0/(zlev(igrid,nlay+1)-zlay(igrid,nlay)) 253 ENDDO 231 DO igrid=1,ngrid 232 unsdzdec(igrid,ilay)=1.E+0/ 233 & (zlay(igrid,ilay)-zlay(igrid,ilay-1)) 234 ENDDO 235 ENDDO 236 237 DO igrid=1,ngrid 238 unsdzdec(igrid,nlay+1)=1.E+0/ 239 & (zlev(igrid,nlay+1)-zlay(igrid,nlay)) 240 ENDDO 254 241 c 255 242 c....................................................................... … … 257 244 c....................................................................... 258 245 c 259 260 m2(igrid,1)=(unsdzdec(igrid,1)246 DO igrid=1,ngrid 247 m2(igrid,1)=(unsdzdec(igrid,1) 261 248 & *u(igrid,1))**2 262 249 & +(unsdzdec(igrid,1) 263 250 & *v(igrid,1))**2 264 m(igrid,1)=sqrt(m2(igrid,1))265 mpre(igrid,1)=m(igrid,1)266 251 m(igrid,1)=sqrt(m2(igrid,1)) 252 mpre(igrid,1)=m(igrid,1) 253 ENDDO 267 254 c 268 255 c----------------------------------------------------------------------- 269 256 DO ilev=2,nlev-1 270 257 DO igrid=1,ngrid 271 258 c----------------------------------------------------------------------- 272 259 c … … 295 282 c 296 283 c----------------------------------------------------------------------- 297 ENDDO 298 ENDDO 299 c----------------------------------------------------------------------- 300 c 301 DO igrid=1,ngrid 302 m2(igrid,nlev)=m2(igrid,nlev-1) 303 m(igrid,nlev)=m(igrid,nlev-1) 304 mpre(igrid,nlev)=m(igrid,nlev) 305 ENDDO 284 ENDDO 285 ENDDO 286 c----------------------------------------------------------------------- 287 c 288 DO igrid=1,ngrid 289 m2(igrid,nlev)=m2(igrid,nlev-1) 290 m(igrid,nlev)=m(igrid,nlev-1) 291 mpre(igrid,nlev)=m(igrid,nlev) 292 ENDDO 293 306 294 c 307 295 c....................................................................... … … 311 299 c----------------------------------------------------------------------- 312 300 DO ilev=2,nlev-1 313 301 DO igrid=1,ngrid 314 302 c----------------------------------------------------------------------- 315 303 c … … 375 363 c 376 364 c----------------------------------------------------------------------- 377 ENDDO378 ENDDO 365 ENDDO ! of DO igrid=1,ngrid 366 ENDDO ! of DO ilev=2,nlev-1 379 367 c----------------------------------------------------------------------- 380 368 c … … 383 371 c....................................................................... 384 372 c 385 386 kn(igrid,1)=knmin387 km(igrid,1)=kmmin388 kmpre(igrid,1)=km(igrid,1)389 373 DO igrid=1,ngrid 374 kn(igrid,1)=knmin 375 km(igrid,1)=kmmin 376 kmpre(igrid,1)=km(igrid,1) 377 ENDDO 390 378 c 391 379 c----------------------------------------------------------------------- 392 380 DO ilev=2,nlev-1 393 DO igrid=1,ngrid 394 c----------------------------------------------------------------------- 395 c 381 DO igrid=1,ngrid 396 382 kn(igrid,ilev)=long(igrid,ilev)*q(igrid,ilev) 397 383 & *sn(igrid,ilev) … … 399 385 & *sm(igrid,ilev) 400 386 kmpre(igrid,ilev)=km(igrid,ilev) 401 c 402 c----------------------------------------------------------------------- 403 ENDDO 404 ENDDO 405 c----------------------------------------------------------------------- 406 c 407 DO igrid=1,ngrid 408 kn(igrid,nlev)=kn(igrid,nlev-1) 409 km(igrid,nlev)=km(igrid,nlev-1) 410 kmpre(igrid,nlev)=km(igrid,nlev) 411 ENDDO 387 ENDDO 388 ENDDO 389 c----------------------------------------------------------------------- 390 c 391 DO igrid=1,ngrid 392 kn(igrid,nlev)=kn(igrid,nlev-1) 393 km(igrid,nlev)=km(igrid,nlev-1) 394 kmpre(igrid,nlev)=km(igrid,nlev) 395 ENDDO 412 396 c 413 397 c....................................................................... … … 539 523 c 540 524 c 541 542 kn(igrid,1)=knmin543 km(igrid,1)=kmmin544 q2(igrid,nlev)=q2(igrid,nlev-1)545 q(igrid,nlev)=q(igrid,nlev-1)546 kn(igrid,nlev)=kn(igrid,nlev-1)547 km(igrid,nlev)=km(igrid,nlev-1)548 525 DO igrid=1,ngrid 526 kn(igrid,1)=knmin 527 km(igrid,1)=kmmin 528 q2(igrid,nlev)=q2(igrid,nlev-1) 529 q(igrid,nlev)=q(igrid,nlev-1) 530 kn(igrid,nlev)=kn(igrid,nlev-1) 531 km(igrid,nlev)=km(igrid,nlev-1) 532 ENDDO 549 533 550 c551 c.......................................................................552 c553 RETURN554 534 END
Note: See TracChangeset
for help on using the changeset viewer.