Changeset 2330 for trunk/ICOSA_LMDZ/src
- Timestamp:
- May 25, 2020, 4:21:38 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ICOSA_LMDZ/src/phyvenus/interface_icosa_lmdz.f90
r2319 r2330 326 326 ! value in physics daysec=10087066.76s, important for solar radiation, 327 327 ! for the rest ptime/timeofday is what matters. To well estimate them, 328 ! day_length must be multiple of dt*itau_physics. Error order:1e- 4.328 ! day_length must be multiple of dt*itau_physics. Error order:1e-5. 329 329 day_length=10087000 330 330 CALL getin('day_length',day_length) … … 368 368 ! we reset date to midnight at lon=0 in the physics 369 369 ptime=0.0 370 day_ini=0 370 371 else 371 372 write(*,*)"Error: physics time step in startphy.nc is different" … … 407 408 408 409 ! Initialize some physical constants 409 CALL suphec 410 CALL suphec(cpp) 410 411 411 412 ! Initialize cpdet_phy module 412 nu_venus=0.35 413 t0_venus=460. 413 ! FLAG CP CONSTANT OR NOT... (in LMDZ.COMMON: cpofT in gcm.def) 414 ! here, it allows to run the physics with a variable Cp together with dynamics 415 ! with constant Cp. 416 ! Conversion Theta/T takes this into account (see below) 417 ! IF CP(T) 418 ! nu_venus=0.35 419 ! t0_venus=460. 420 ! IF CP CONSTANT 421 nu_venus=0. 422 t0_venus=0. 414 423 CALL init_cpdet_phy(cpp,nu_venus,t0_venus) 415 424 … … 733 742 USE wind_mod 734 743 USE omp_para 744 USE cpdet_phy_mod, only: tpot2t 735 745 IMPLICIT NONE 736 746 737 747 REAL(rstd) :: uc(3) 738 748 INTEGER :: i,j,ij,l 749 REAL :: tmpT(1),tmptheta(1),tmppk(1) 739 750 740 751 … … 776 787 777 788 ! compute theta, temperature and pression at layer 789 ! Conversion Theta/T takes Cp(T) into account 778 790 DO l = ll_begin, ll_end 779 791 DO j=jj_begin,jj_end … … 781 793 ij=(j-1)*iim+i 782 794 theta(ij,l) = theta_rhodz(ij,l,1) / ((p(ij,l)-p(ij,l+1))/g) 783 Temp(ij,l) = theta(ij,l) * pk(ij,l) / cpp 795 tmptheta(1) = theta(ij,l) 796 tmppk(1) = pk(ij,l) 797 call tpot2t(1,tmptheta,tmpT,tmppk) 798 Temp(ij,l) = tmpT(1) 784 799 p_layer(ij,l)=preff*(pk(ij,l)/cpp)**(1./kappa) 785 800 ENDDO … … 789 804 790 805 !!! Compute geopotential 806 !! This computation (with teta = cp T / pk !) is identical to 807 !! delta phi = R/RMD T/p delta p (r=R/RMD=cpp*kappa) 791 808 792 809 ! for first layer … … 795 812 DO i=ii_begin,ii_end 796 813 ij=(j-1)*iim+i 797 phi( ij,1 ) = phis( ij ) + theta(ij,1) * ( pks(ij) - pk(ij,1) ) 814 phi( ij,1 ) = phis( ij ) + ( cpp*Temp(ij,1)/pk(ij,1) ) & 815 * ( pks(ij) - pk(ij,1) ) 798 816 ENDDO 799 817 ENDDO … … 806 824 DO i=ii_begin,ii_end 807 825 ij=(j-1)*iim+i 808 phi(ij,l) = 0.5 * ( theta(ij,l) + theta(ij,l-1) )&809 * ( pk(ij,l-1) - pk(ij,l))826 phi(ij,l) = 0.5 *cpp*( Temp(ij,l)/pk(ij,l)+Temp(ij,l-1)/pk(ij,l-1) ) & 827 * ( pk(ij,l-1) - pk(ij,l) ) 810 828 ENDDO 811 829 ENDDO … … 855 873 USE theta2theta_rhodz_mod 856 874 USE omp_para 875 USE cpdet_phy_mod, only: t2tpot 857 876 IMPLICIT NONE 858 877 INTEGER :: i,j,ij,l,iq 878 REAL :: tmptheta(1),tmpT(1),tmppk(1) 859 879 860 880 DO l=ll_begin,ll_end … … 948 968 949 969 ! compute theta, temperature and pression at layer 970 ! Conversion Theta/T takes Cp(T) into account 950 971 DO l = ll_begin, ll_end 951 972 DO j=jj_begin,jj_end 952 973 DO i=ii_begin,ii_end 953 974 ij=(j-1)*iim+i 954 theta_rhodz(ij,l,1) = temp(ij,l) * ((p(ij,l)-p(ij,l+1))/g) / (pk(ij,l) / cpp ) 975 tmpT(1) = Temp(ij,l) 976 tmppk(1) = pk(ij,l) 977 call t2tpot(1,tmpT,tmptheta,tmppk) 978 theta_rhodz(ij,l,1) = tmptheta(1) * ((p(ij,l)-p(ij,l+1))/g) 955 979 ENDDO 956 980 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.