Changeset 1749 for trunk/MESOSCALE/LMD_MM_MARS/SRC/LES
- Timestamp:
- Jul 24, 2017, 5:52:37 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/module_initialize_les.F
r1746 r1749 116 116 ! for mode 3 117 117 REAL, DIMENSION(nl_max) :: profdustq,profdustn 118 REAL, DIMENSION(nl_max) :: prescribed_sw,prescribed_lw 118 REAL, DIMENSION(nl_max) :: prescribed_sw,prescribed_lw,prescribed_dyn 119 REAL, DIMENSION(nl_max) :: hrsw,hrlw,hrdyn 120 REAL, DIMENSION(nl_max) :: venus_hrdyn 121 REAL, DIMENSION(nl_max) :: altitude 119 122 !!MARS 120 123 … … 123 126 !INTEGER :: hypsometric_opt = 2 ! Wee et al. 2012 correction 124 127 125 character(len=10) :: planet126 128 127 129 #ifdef DM_PARALLEL 128 130 # include <data_calls.inc> 129 131 #endif 130 131 call init_planet_constants132 132 133 133 SELECT CASE ( model_data_order ) … … 393 393 DO j=max(ys,jds),min(ye,jde-1) 394 394 DO i=max(xs,ids),min(xe,ide-1) 395 grid%ht(i,j) = mtn_ht * 0.25 * &395 grid%ht(i,j) = alt_input + mtn_ht * 0.25 * & 396 396 ( 1. + COS ( 2*pi/(xe-xs) * ( i-xs ) + pi ) ) * & 397 397 ( 1. + COS ( 2*pi/(ye-ys) * ( j-ys ) + pi ) ) … … 434 434 p_level = grid%znu(k)*(p_surf - grid%p_top) + grid%p_top 435 435 grid%pb(i,k,j) = p_level 436 grid%t_init(i,k,j) = interp_0 ( theta, p_in, p_level, nl_in ) - t0436 grid%t_init(i,k,j) = interp_0_log( theta, p_in, p_level, nl_in ) - t0 437 437 grid%alb(i,k,j) = (r_d/p1000mb)*(grid%t_init(i,k,j)+t0)*(grid%pb(i,k,j)/p1000mb)**cvpm 438 438 ENDDO … … 458 458 ENDDO 459 459 ENDDO 460 461 460 IF ( wrf_dm_on_monitor() ) THEN 462 461 write(6,*) ' ptop is ',grid%p_top … … 491 490 p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top 492 491 493 moist(i,k,j,P_QV) = interp_0 ( qv, pd_in, p_level, nl_in )494 grid%t_1(i,k,j) = interp_0 ( theta, pd_in, p_level, nl_in ) - t0492 moist(i,k,j,P_QV) = interp_0_log( qv, pd_in, p_level, nl_in ) 493 grid%t_1(i,k,j) = interp_0_log( theta, pd_in, p_level, nl_in ) - t0 495 494 grid%t_2(i,k,j) = grid%t_1(i,k,j) 496 495 … … 694 693 DO K = 1, kte-1 695 694 p_level = grid%znu(k)*(p_surf - grid%p_top) + grid%p_top 696 grid%v_1(i,k,j) = interp_0 ( v, p_in, p_level, nl_in )695 grid%v_1(i,k,j) = interp_0_log( v, p_in, p_level, nl_in ) 697 696 grid%v_2(i,k,j) = grid%v_1(i,k,j) 698 697 ENDDO … … 718 717 DO K = 1, kte-1 719 718 p_level = grid%znu(k)*(p_surf - grid%p_top) + grid%p_top 720 grid%u_1(i,k,j) = interp_0 ( u, p_in, p_level, nl_in )719 grid%u_1(i,k,j) = interp_0_log( u, p_in, p_level, nl_in ) 721 720 grid%u_2(i,k,j) = grid%u_1(i,k,j) 722 721 ENDDO … … 847 846 DO k=1,kte-1 848 847 p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top 849 scalar(its:ite,k,jts:jte,2) = interp_0 ( qv, pd_in, p_level, nl_in )848 scalar(its:ite,k,jts:jte,2) = interp_0_log( qv, pd_in, p_level, nl_in ) 850 849 scalar(its:ite,k,jts:jte,3) = 0. 851 850 !! water ice is set to 0 (was put into water vapor when building prof from MCD) … … 862 861 DO k=1,kte-1 863 862 p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top 864 scalar(its:ite,k,jts:jte,4) = interp_0 ( profdustq, pd_in, p_level, nl_in )865 scalar(its:ite,k,jts:jte,5) = interp_0 ( profdustn, pd_in, p_level, nl_in )863 scalar(its:ite,k,jts:jte,4) = interp_0_log( profdustq, pd_in, p_level, nl_in ) 864 scalar(its:ite,k,jts:jte,5) = interp_0_log( profdustn, pd_in, p_level, nl_in ) 866 865 ENDDO 867 866 print *, "DUST Q", scalar(its,:,jts,4) … … 882 881 DO i = its, ite 883 882 !!! we use Q2 as a vehicle for heating rates! sick! 884 grid%m_q2(i,k,j) = interp_0 ( profdustq, pd_in, p_level, nl_in ) &885 + interp_0 ( profdustn, pd_in, p_level, nl_in )883 grid%m_q2(i,k,j) = interp_0_log( profdustq, pd_in, p_level, nl_in ) & 884 + interp_0_log( profdustn, pd_in, p_level, nl_in ) 886 885 ENDDO 887 886 ENDDO … … 889 888 !print*,k,grid%m_q2(1,k,1) 890 889 ENDDO 891 print*,'planet',planet 890 892 891 IF (planet.eq."prescribed") Then 893 call read_hr( profdustq,profdustn,nl_in)892 call read_hr(hrsw,hrlw,hrdyn,nl_in) 894 893 open(unit=17,file="prescribed_sw.txt",action="write") 895 894 open(unit=18,file="prescribed_lw.txt",action="write") 895 open(unit=19,file="prescribed_dyn.txt",action="write") 896 896 DO k=1,kte!-1 897 897 p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top 898 prescribed_sw(k) = interp_0( profdustq, pd_in, p_level, nl_in ) 899 prescribed_lw(k) = interp_0( profdustn, pd_in, p_level, nl_in ) 898 prescribed_sw(k) = interp_0_log( hrsw, pd_in, p_level, nl_in ) 899 prescribed_lw(k) = interp_0_log( hrlw, pd_in, p_level, nl_in ) 900 prescribed_dyn(k) = interp_0_log( hrdyn, pd_in, p_level, nl_in ) 900 901 write (17,*) prescribed_sw(k) 901 902 write (18,*) prescribed_lw(k) 903 write (19,*) prescribed_dyn(k) 902 904 ENDDO 905 close(unit=19) 906 close(unit=18) 903 907 close(unit=17) 904 close(unit=18)905 908 ENDIF 909 910 IF (planet.eq."venus") Then 911 call read_hr(hrsw,hrlw,hrdyn,nl_in) 912 open(unit=20,file="venus_hrdyn.txt",action="write") 913 DO k=1,kte!-1 914 p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top 915 venus_hrdyn(k) = interp_0_log( hrdyn, pd_in, p_level, nl_in ) 916 write (20,*) venus_hrdyn(k) 917 ENDDO 918 close(unit=20) 919 ENDIF 920 921 open(unit=21,file="altitude.txt",action="write") 922 DO k=1,kte!-1 923 p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top 924 altitude(k) = interp_0_log( zk, pd_in, p_level, nl_in ) 925 write (21,*) altitude(k) 926 ENDDO 927 close(unit=21) 906 928 907 929 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 1198 1220 implicit none 1199 1221 integer n 1200 real pdustq(n ),pdustn(n)1222 real pdustq(n+1),pdustn(n+1) 1201 1223 logical end_of_file 1202 1224 … … 1223 1245 end subroutine read_dust 1224 1246 !!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 1225 subroutine read_hr(hr_sw,hr_lw, n)1247 subroutine read_hr(hr_sw,hr_lw,hr_dyn,n) 1226 1248 implicit none 1227 1249 integer n 1228 real hr_sw(n ),hr_lw(n)1250 real hr_sw(n+1),hr_lw(n+1),hr_dyn(n+1) 1229 1251 logical end_of_file 1230 1252 … … 1239 1261 do while (.not. end_of_file) 1240 1262 1241 read(11,*,end=103) hr_sw(k+1),hr_lw(k+1) 1242 write(*,*) k,hr_sw(k+1),hr_lw(k+1) 1263 read(11,*,end=103) hr_sw(k+1),hr_lw(k+1),hr_dyn(k+1) 1264 write(*,*) k,hr_sw(k+1),hr_lw(k+1),hr_dyn(k+1) 1243 1265 k = k+1 1244 go to 11 31266 go to 114 1245 1267 103 end_of_file = .true. 1246 1268 114 continue
Note: See TracChangeset
for help on using the changeset viewer.