Changeset 2064 for trunk/LMDZ.GENERIC/libf/phystd
- Timestamp:
- Jan 10, 2019, 3:44:36 PM (6 years ago)
- Location:
- trunk/LMDZ.GENERIC/libf/phystd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/thermcell_closure.F90
r2060 r2064 3 3 ! 4 4 SUBROUTINE thermcell_closure(ngrid,nlay,ptimestep,rho,zlev, & 5 & lalim,alim_star,f_star,zmax,wmax,f,lev_out)6 5 & lalim,alim_star,f_star, & 6 & zmax,wmax,f,lev_out) 7 7 8 8 !============================================================================== … … 77 77 DO ig=1,ngrid 78 78 IF (lalim(ig)>llmax) THEN 79 llmax =lalim(ig)79 llmax = lalim(ig) 80 80 ENDIF 81 81 ENDDO … … 88 88 DO ig=1,ngrid 89 89 IF (k<lalim(ig)) THEN 90 alim_star2(ig) =alim_star2(ig)+alim_star(ig,k)**2&91 & /(rho(ig,k)*(zlev(ig,k+1)-zlev(ig,k)))92 alim_star_tot(ig) =alim_star_tot(ig)+alim_star(ig,k)90 alim_star2(ig) = alim_star2(ig) + alim_star(ig,k)**2 & 91 & / (rho(ig,k) * (zlev(ig,k+1) - zlev(ig,k))) 92 alim_star_tot(ig) = alim_star_tot(ig) + alim_star(ig,k) 93 93 ENDIF 94 94 ENDDO … … 97 97 DO ig=1,ngrid 98 98 IF (alim_star2(ig)>1.e-10) THEN 99 f(ig) = wmax(ig) * alim_star_tot(ig) /&100 & (max(500.,zmax(ig))*r_aspect_thermals*alim_star2(ig))99 f(ig) = wmax(ig) * alim_star_tot(ig) & 100 & / (max(500.,zmax(ig)) * r_aspect_thermals * alim_star2(ig)) 101 101 ENDIF 102 102 ENDDO -
trunk/LMDZ.GENERIC/libf/phystd/thermcell_main.F90
r2060 r2064 20 20 & ,alp_bl_conv,alp_bl_stat) 21 21 !!! fin nrlmd le 10/04/2012 22 23 22 24 23 !============================================================================== … … 517 516 518 517 IF (iflag_thermals_closure.eq.1) THEN 519 CALL thermcell_closure(ngrid,nlay, r_aspect_thermals,ptimestep,rho,&520 & zlev,lalim,alim_star_clos,f_star,&518 CALL thermcell_closure(ngrid,nlay,ptimestep,rho,zlev, & 519 & lalim,alim_star_clos,f_star, & 521 520 & zmax_sec,wmax_sec,f,lev_out) 522 521 ELSEIF (iflag_thermals_closure.eq.2) THEN 523 CALL thermcell_closure(ngrid,nlay, r_aspect_thermals,ptimestep,rho,&524 & zlev,lalim,alim_star,f_star,&522 CALL thermcell_closure(ngrid,nlay,ptimestep,rho,zlev, & 523 & lalim,alim_star,f_star, & 525 524 & zmax,wmax,f,lev_out) 525 ELSE 526 print *, 'ERROR: no closure had been selected!' 527 call abort 526 528 ENDIF 527 529 … … 562 564 IF (tau_thermals>1.) THEN 563 565 lambda = exp(-ptimestep/tau_thermals) 564 fm0 = (1.-lambda)*fm+lambda*fm0565 entr0 = (1.-lambda) *entr+lambda*entr0566 detr0 = (1.-lambda) *detr+lambda*detr0566 fm0 = (1.-lambda) * fm + lambda * fm0 567 entr0 = (1.-lambda) * entr + lambda * entr0 568 detr0 = (1.-lambda) * detr + lambda * detr0 567 569 ELSE 568 fm0 = fm570 fm0 = fm 569 571 entr0 = entr 570 572 detr0 = detr … … 659 661 enddo 660 662 661 ierr =0663 ierr = 0 662 664 663 665 do ig=1,ngrid -
trunk/LMDZ.GENERIC/libf/phystd/thermcell_mod.F90
r2060 r2064 39 39 ! AB : linf is used to set the lowest possible first level because we allow it 40 40 ! to begin higher than the surface. It is set to 2 in order to remove the 41 ! first layer for gas giant. If there is a surface, it has to be set to 1. 41 ! first layer for gas giant. 42 ! If there is a surface, it has to be set to 1. 43 ! If someone want to call more than once the thermal plume model in one 44 ! or more grid point, this variable must become a saved array of INTEGER 45 ! with size ngrid. 42 46 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 43 47 INTEGER,PARAMETER :: linf = 2 … … 59 63 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 60 64 ! AB : Parameters needed only for a loop in thermcell_alp (diagnoses). 61 ! Maybe to remove.65 ! Maybe to be removed. 62 66 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 63 67 INTEGER,PARAMETER :: nbsrf = 1 … … 65 69 66 70 CONTAINS 67 68 SUBROUTINE init_thermcell_mod(g, rcp, r, pi, T_h2o_ice_liq, RV)69 70 IMPLICIT NONE71 72 REAL g73 REAL rcp74 REAL r75 REAL pi76 REAL T_h2o_ice_liq77 REAL RV78 79 RTT = T_h2o_ice_liq80 RG = g81 RKAPPA = rcp82 RPI = pi83 RD = r84 85 RETURN86 END SUBROUTINE init_thermcell_mod71 72 SUBROUTINE init_thermcell_mod(g, rcp, r, pi, T_h2o_ice_liq, RV) 73 74 IMPLICIT NONE 75 76 REAL g 77 REAL rcp 78 REAL r 79 REAL pi 80 REAL T_h2o_ice_liq 81 REAL RV 82 83 RTT = T_h2o_ice_liq 84 RG = g 85 RKAPPA = rcp 86 RPI = pi 87 RD = r 88 89 RETURN 90 END SUBROUTINE init_thermcell_mod 87 91 88 92 END MODULE thermcell_mod
Note: See TracChangeset
for help on using the changeset viewer.