Changeset 1750
- Timestamp:
- Jul 24, 2017, 5:57:02 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/module_initialize_real.F
r1746 r1750 118 118 REAL :: max_dz 119 119 120 ! 120 ! INTEGER , PARAMETER :: nl_max = 1000 121 121 ! REAL , DIMENSION(nl_max) :: grid%em_dn 122 122 … … 149 149 !LOGICAL :: interp_theta = .false. ! Wee et al. 2012 correction 150 150 REAL :: pfu, pfd, phm 151 151 REAL :: tpot 152 152 153 153 #ifdef DM_PARALLEL … … 1080 1080 !!END DO 1081 1081 1082 1082 IF ( planet == "mars" ) then 1083 1083 !--get vertical size of the GCM input array and allocate new stuff 1084 sizegcm=SIZE(grid%em_rh_gc(1,:,1))1085 ALLOCATE(sig(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1))1086 !ALLOCATE(ap(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1))1087 ALLOCATE(bp(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1))1088 1089 DO j = jts , MIN ( jde-1 , jte )1090 DO i = its , MIN (ide-1 , ite )1084 sizegcm=SIZE(grid%em_rh_gc(1,:,1)) 1085 ALLOCATE(sig(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1)) 1086 !ALLOCATE(ap(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1)) 1087 ALLOCATE(bp(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1)) 1088 1089 DO j = jts , MIN ( jde-1 , jte ) 1090 DO i = its , MIN (ide-1 , ite ) 1091 1091 1092 1092 !!! Define old sigma levels for each column 1093 sig(i,:,j)=grid%em_p_gc(i,:,j)/grid%em_psfc_gc(i,j)1093 sig(i,:,j)=grid%em_p_gc(i,:,j)/grid%em_psfc_gc(i,j) 1094 1094 1095 1095 !!! Compute new sigma levels from old sigma levels with GCM (low-res) and WRF (hi-res) surface pressure 1096 1096 !!! (dimlevs,sigma_gcm, ps_gcm, ps_hr, sigma_hr) 1097 CALL build_sigma_hr(sizegcm,sig(i,:,j),grid%em_psfc_gc(i,j),grid%psfc(i,j),bp(i,:,j))1097 CALL build_sigma_hr(sizegcm,sig(i,:,j),grid%em_psfc_gc(i,j),grid%psfc(i,j),bp(i,:,j)) 1098 1098 1099 1099 !!! Calculate new pressure levels 1100 grid%em_pd_gc(i,:,j)=bp(i,:,j)*grid%psfc(i,j)1101 1102 END DO1103 END DO1104 1105 DEALLOCATE(sig)1106 DEALLOCATE(bp)1100 grid%em_pd_gc(i,:,j)=bp(i,:,j)*grid%psfc(i,j) 1101 1102 END DO 1103 END DO 1104 1105 DEALLOCATE(sig) 1106 DEALLOCATE(bp) 1107 1107 1108 1108 !!****MARS who knows... 1109 grid%em_rh_gc(:,:,:)=0.1109 grid%em_rh_gc(:,:,:)=0. 1110 1110 1111 1111 … … 1113 1113 !grid%em_pd_gc=grid%em_p_gc 1114 1114 !!****MARS 1115 1115 ELSE ! VENUS 1116 1116 1117 1117 … … 1120 1120 !! dry top pressure (constant). 1121 1121 ! 1122 !CALL p_dts ( grid%em_mu0 , grid%em_intq_gc , grid%psfc , grid%p_top , & 1123 ! ids , ide , jds , jde , 1 , num_metgrid_levels , & 1124 ! ims , ime , jms , jme , 1 , num_metgrid_levels , & 1125 ! its , ite , jts , jte , 1 , num_metgrid_levels ) 1126 1122 CALL p_dts ( grid%em_mu0 , grid%em_intq_gc , grid%psfc , grid%p_top , & 1123 ids , ide , jds , jde , 1 , num_metgrid_levels , & 1124 ims , ime , jms , jme , 1 , num_metgrid_levels , & 1125 its , ite , jts , jte , 1 , num_metgrid_levels ) 1126 ENDIF 1127 IF ( planet == "mars" ) then 1127 1128 !!****MARS 1128 DO j = jts , MIN ( jde-1 , jte )1129 DO i = its , MIN (ide-1 , ite )1130 1131 grid%em_mu0(i,j) = grid%psfc(i,j) - grid%p_top1132 1133 END DO1134 END DO1129 DO j = jts , MIN ( jde-1 , jte ) 1130 DO i = its , MIN (ide-1 , ite ) 1131 1132 grid%em_mu0(i,j) = grid%psfc(i,j) - grid%p_top 1133 1134 END DO 1135 END DO 1135 1136 !!****MARS 1136 1137 ELSE ! VENUS 1137 1138 1138 1139 !! Compute the dry, hydrostatic surface pressure. 1139 1140 ! 1140 !CALL p_dhs ( grid%em_pdhs , grid%ht , p00 , t00 , a , & 1141 ! ids , ide , jds , jde , kds , kde , & 1142 ! ims , ime , jms , jme , kms , kme , & 1143 ! its , ite , jts , jte , kts , kte ) 1141 CALL p_dhs ( grid%em_pdhs , grid%ht , p00 , t00 , a , & 1142 ids , ide , jds , jde , kds , kde , & 1143 ims , ime , jms , jme , kms , kme , & 1144 its , ite , jts , jte , kts , kte ) 1145 ENDIF 1144 1146 !!****MARS: voir remarques dans la routine 1145 1147 !!****MARS: dry hydrostatic pressure comes from the GCM ... … … 2294 2296 IF (( i .EQ. its ) .AND. ( j .EQ. jts )) print *, temp, k 2295 2297 !!! MODIF WRFV3.1 - parameter tiso 2296 grid%em_t_init(i,k,j) = temp*(p00/grid%em_pb(i,k,j))**(r_d/cp) - t0 2298 IF (planet .eq. "mars" ) THEN 2299 grid%em_t_init(i,k,j) = temp*(p00/grid%em_pb(i,k,j))**(r_d/cp) - t0 2300 ELSE 2301 grid%em_t_init(i,k,j) = (temp**nu + nu*(TT00**nu)*log((p00/grid%em_pb(i,k,j))**rcp))**(1/nu) -t0 2302 ENDIF 2297 2303 grid%em_alb(i,k,j) = (r_d/p1000mb)*(grid%em_t_init(i,k,j)+t0)*(grid%em_pb(i,k,j)/p1000mb)**cvpm 2298 2304 END DO … … 2780 2786 temp1 = MAX(tiso,t00+A*LOG(grid%em_pb(i,k,j)/p00)) 2781 2787 temp2 = MAX(tiso,t00+A*LOG( pb_int/p00)) 2782 grid%em_t_init(i,k,j) = temp1*(p00/grid%em_pb(i,k,j))**(r_d/cp) - t0 2783 t_init_int(i,k,j) = temp2*(p00/pb_int )**(r_d/cp) - t0 2788 IF (planet .eq. "mars" ) THEN 2789 grid%em_t_init(i,k,j) = temp1*(p00/grid%em_pb(i,k,j))**(r_d/cp) - t0 2790 t_init_int(i,k,j) = temp2*(p00/pb_int )**(r_d/cp) - t0 2791 ELSE 2792 grid%em_t_init(i,k,j) = (temp1**nu + nu*(TT00**nu)*log((p00/grid%em_pb(i,k,j))**(rcp)))**(1/nu) - t0 2793 t_init_int(i,k,j) = (temp2**nu + nu*(TT00**nu)*log((p00/pb_int)**(rcp)))**(1/nu) - t0 2794 ENDIF 2784 2795 grid%em_alb(i,k,j) = (r_d/p1000mb)*(grid%em_t_init(i,k,j)+t0)*(grid%em_pb(i,k,j)/p1000mb)**cvpm 2785 2796 END DO … … 4969 4980 ! temp = t00 + A*LOG(pb/p00) 4970 4981 temp = MAX ( tiso, t00 + A*LOG(pb/p00) ) 4971 t_init = temp*(p00/pb)**(r_d/cp) - t0 4982 IF (planet .eq. "mars" ) THEN 4983 t_init = temp*(p00/pb)**(r_d/cp) - t0 4984 ELSE 4985 t_init = (temp**nu + nu*(TT00**nu)*log((p00/pb)**(rcp)))**(1/nu) - t0 4986 ENDIF 4972 4987 alb(k) = (r_d/p1000mb)*(t_init+t0)*(pb/p1000mb)**cvpm 4973 4988 END DO … … 5005 5020 ! temp = t00 + A*LOG(pb/p00) 5006 5021 temp = MAX ( tiso, t00 + A*LOG(pb/p00) ) 5007 t_init = temp*(p00/pb)**(r_d/cp) - t0 5022 IF (planet .eq. "mars" ) THEN 5023 t_init = temp*(p00/pb)**(r_d/cp) - t0 5024 ELSE 5025 t_init = (temp**nu + nu*(TT00**nu)*log((p00/pb)**(rcp)))**(1/nu) -t0 5026 ENDIF 5008 5027 alb(k) = (r_d/p1000mb)*(t_init+t0)*(pb/p1000mb)**cvpm 5009 5028 znw(k+1) = znw(k) - dz*g / ( mub*alb(k) ) … … 5025 5044 ! temp = t00 + A*LOG(pb/p00) 5026 5045 temp = MAX ( tiso, t00 + A*LOG(pb/p00) ) 5027 t_init = temp*(p00/pb)**(r_d/cp) - t0 5046 IF (planet .eq. "mars" ) THEN 5047 t_init = temp*(p00/pb)**(r_d/cp) - t0 5048 ELSE 5049 t_init = (temp**nu + nu*(TT00**nu)*log((p00/pb)**(rcp)))**(1/nu) -t0 5050 ENDIF 5028 5051 alb(k) = (r_d/p1000mb)*(t_init+t0)*(pb/p1000mb)**cvpm 5029 5052 znw(k+1) = znw(k) - dz*g / ( mub*alb(k) ) … … 5052 5075 ! temp = t00 + A*LOG(pb/p00) 5053 5076 temp = MAX ( tiso, t00 + A*LOG(pb/p00) ) 5054 t_init = temp*(p00/pb)**(r_d/cp) - t0 5077 IF (planet .eq. "mars" ) THEN 5078 t_init = temp*(p00/pb)**(r_d/cp) - t0 5079 ELSE 5080 t_init = (temp**nu + nu*(TT00**nu)*log((p00/pb)**(rcp)))**(1/nu) -t0 5081 ENDIF 5055 5082 alb(k) = (r_d/p1000mb)*(t_init+t0)*(pb/p1000mb)**cvpm 5056 5083 END DO
Note: See TracChangeset
for help on using the changeset viewer.