- Timestamp:
- Aug 25, 2017, 2:06:32 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/module_initialize_les.F
r1749 r1767 126 126 !INTEGER :: hypsometric_opt = 2 ! Wee et al. 2012 correction 127 127 128 LOGICAL :: logp = .true. ! use logp to interpolate (and not p) 128 129 129 130 #ifdef DM_PARALLEL 130 131 # include <data_calls.inc> 131 132 #endif 133 132 134 133 135 SELECT CASE ( model_data_order ) … … 171 173 END SELECT 172 174 173 174 !stretch_grid = .false. 175 ! FOR LES, set stretch to false 176 stretch_grid = .true. 175 IF (planet == "mars") THEN 176 stretch_grid = .false. 177 !! FOR LES, set stretch to false 178 ELSE 179 stretch_grid = .true. !! VENUS 180 ENDIF 177 181 delt = 3. 178 182 ! z_scale = .50 … … 242 246 grid%step_number = 0 243 247 244 ! !set up the grid245 ! 248 ! set up the grid 249 246 250 IF (stretch_grid) THEN ! exponential stretch for eta (nearly constant dz) 247 251 DO k=1, kde … … 249 253 (1.-exp(-1./z_scale)) 250 254 ENDDO 251 ELSE 252 ! 253 !!!!MARS 254 !grid%znw(1)=1.000 255 !grid%znw(2)=0.9995 !5m 256 !grid%znw(3)=0.9980 !20m 257 !grid%znw(4)=0.9950 !55m 258 !DO k=5, kde 259 ! grid%znw(k) = grid%znw(4) * ( 1. - float(k-4)/float(kde-4) ) 260 !ENDDO 261 !!!!!MARS 262 !!! 263 !! DO k=1, kde 264 !! grid%znw(k) = 1. - float(k-1)/float(kde-1) 265 !! ENDDO 266 ! 267 ! ENDIF 268 269 !!MARS 270 !!MARS 271 open(unit=12,file='levels',form='formatted',status='old') 272 rewind(12) 273 DO k=1, kde 274 read(12,*) grid%znw(k) 275 write(6,*) 'read level ', k,grid%znw(k) 276 ENDDO 277 close(12) 278 !!MARS 279 !!MARS 280 ENDIF 255 ENDIF 256 !ELSE 257 ! !DO k=1, kde 258 ! ! grid%znw(k) = 1. - float(k-1)/float(kde-1) 259 ! !ENDDO 260 261 262 IF (planet == "mars") THEN 263 !!!MARS 264 grid%znw(1)=1.000 265 grid%znw(2)=0.9995 !5m 266 grid%znw(3)=0.9980 !20m 267 grid%znw(4)=0.9950 !55m 268 DO k=5, kde 269 grid%znw(k) = grid%znw(4) * ( 1. - float(k-4)/float(kde-4) ) 270 ENDDO 271 !!!MARS 272 !!!MARS 273 ! open(unit=12,file='levels',form='formatted',status='old') 274 ! rewind(12) 275 ! DO k=1, kde 276 ! read(12,*) grid%znw(k) 277 ! write(6,*) 'read level ', k,grid%znw(k) 278 ! ENDDO 279 ! close(12) 280 !!!MARS 281 !!!MARS 282 ENDIF 283 281 284 282 285 DO k=1, kde-1 … … 422 425 ENDDO 423 426 427 IF (.not.logp) THEN 428 write(6,*) 'interpolate in p' 429 ELSE 430 write(6,*) 'interpolate in logp' 431 ENDIF 432 424 433 DO J = jts, jte 425 434 DO I = its, ite … … 434 443 p_level = grid%znu(k)*(p_surf - grid%p_top) + grid%p_top 435 444 grid%pb(i,k,j) = p_level 445 IF (.not.logp) THEN 446 grid%t_init(i,k,j) = interp_0( theta, p_in, p_level, nl_in ) - t0 447 ELSE 436 448 grid%t_init(i,k,j) = interp_0_log( theta, p_in, p_level, nl_in ) - t0 449 ENDIF 437 450 grid%alb(i,k,j) = (r_d/p1000mb)*(grid%t_init(i,k,j)+t0)*(grid%pb(i,k,j)/p1000mb)**cvpm 438 451 ENDDO … … 489 502 490 503 p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top 491 504 IF (.not.logp) THEN 505 moist(i,k,j,P_QV) = interp_0( qv, pd_in, p_level, nl_in ) 506 grid%t_1(i,k,j) = interp_0( theta, pd_in, p_level, nl_in ) - t0 507 ELSE 492 508 moist(i,k,j,P_QV) = interp_0_log( qv, pd_in, p_level, nl_in ) 493 509 grid%t_1(i,k,j) = interp_0_log( theta, pd_in, p_level, nl_in ) - t0 510 ENDIF 494 511 grid%t_2(i,k,j) = grid%t_1(i,k,j) 495 512 … … 693 710 DO K = 1, kte-1 694 711 p_level = grid%znu(k)*(p_surf - grid%p_top) + grid%p_top 712 IF (.not.logp) THEN 713 grid%v_1(i,k,j) = interp_0( v, p_in, p_level, nl_in ) 714 ELSE 695 715 grid%v_1(i,k,j) = interp_0_log( v, p_in, p_level, nl_in ) 716 ENDIF 696 717 grid%v_2(i,k,j) = grid%v_1(i,k,j) 697 718 ENDDO … … 717 738 DO K = 1, kte-1 718 739 p_level = grid%znu(k)*(p_surf - grid%p_top) + grid%p_top 740 IF (.not.logp) THEN 741 grid%u_1(i,k,j) = interp_0( u, p_in, p_level, nl_in ) 742 ELSE 719 743 grid%u_1(i,k,j) = interp_0_log( u, p_in, p_level, nl_in ) 744 ENDIF 720 745 grid%u_2(i,k,j) = grid%u_1(i,k,j) 721 746 ENDDO … … 846 871 DO k=1,kte-1 847 872 p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top 873 IF (.not.logp) THEN 874 scalar(its:ite,k,jts:jte,2) = interp_0( qv, pd_in, p_level, nl_in ) 875 ELSE 848 876 scalar(its:ite,k,jts:jte,2) = interp_0_log( qv, pd_in, p_level, nl_in ) 877 ENDIF 849 878 scalar(its:ite,k,jts:jte,3) = 0. 850 879 !! water ice is set to 0 (was put into water vapor when building prof from MCD) … … 861 890 DO k=1,kte-1 862 891 p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top 892 IF (.not.logp) THEN 893 scalar(its:ite,k,jts:jte,4) = interp_0( profdustq, pd_in, p_level,nl_in ) 894 scalar(its:ite,k,jts:jte,5) = interp_0( profdustn, pd_in, p_level,nl_in ) 895 ELSE 863 896 scalar(its:ite,k,jts:jte,4) = interp_0_log( profdustq, pd_in, p_level, nl_in ) 864 897 scalar(its:ite,k,jts:jte,5) = interp_0_log( profdustn, pd_in, p_level, nl_in ) 898 ENDIF 865 899 ENDDO 866 900 print *, "DUST Q", scalar(its,:,jts,4) … … 875 909 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 876 910 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 911 IF (planet .ne. "mars") THEN 877 912 call read_dust(profdustq,profdustn,nl_in) 878 913 DO k=1,kte!-1 … … 888 923 !print*,k,grid%m_q2(1,k,1) 889 924 ENDDO 925 ENDIF 890 926 891 927 IF (planet.eq."prescribed") Then … … 917 953 ENDDO 918 954 close(unit=20) 919 ENDIF920 955 921 956 open(unit=21,file="altitude.txt",action="write") … … 926 961 ENDDO 927 962 close(unit=21) 963 ENDIF 928 964 929 965 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 1002 1038 real qvf, qvf1, dz 1003 1039 1004 LOGICAL :: direct_from_file = .true. 1040 LOGICAL :: direct_from_file 1041 1042 IF (planet == "mars") THEN 1043 direct_from_file = .false. 1044 ELSE 1045 direct_from_file = .true. 1046 ENDIF 1005 1047 1006 1048 ! first, read the sounding
Note: See TracChangeset
for help on using the changeset viewer.