Changeset 434
- Timestamp:
- 06/15/16 22:35:17 (8 years ago)
- Location:
- codes/icosagcm/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/trunk/src/observable.f90
r428 r434 93 93 END IF 94 94 95 CALL theta_rhodz2temperature(f_ps,f_theta_rhodz,f_buf_i) ; 96 CALL Tv2T(f_buf_i,f_q,f_buf1_i) 95 ! CALL theta_rhodz2temperature(f_ps,f_theta_rhodz,f_buf_i) 96 ! CALL Tv2T(f_buf_i,f_q,f_buf1_i) 97 CALL diagnose_temperature(f_ps, f_theta_rhodz, f_q, f_buf_i) 98 97 99 IF(init) THEN 98 100 CALL output_field("temp_init",f_buf_i) … … 234 236 END SUBROUTINE compute_prognostic_vel_to_horiz 235 237 238 SUBROUTINE diagnose_temperature(f_ps,f_theta_rhodz,f_q,f_temp) 239 USE icosa 240 USE pression_mod 241 IMPLICIT NONE 242 TYPE(t_field), POINTER :: f_ps(:) ! IN 243 TYPE(t_field), POINTER :: f_theta_rhodz(:) ! IN 244 TYPE(t_field), POINTER :: f_q(:) ! IN 245 TYPE(t_field), POINTER :: f_temp(:) ! OUT 246 247 REAL(rstd), POINTER :: ps(:) 248 REAL(rstd), POINTER :: theta_rhodz(:,:,:) 249 REAL(rstd), POINTER :: q(:,:,:) 250 REAL(rstd), POINTER :: temp(:,:) 251 INTEGER :: ind 252 253 DO ind=1,ndomain 254 IF (.NOT. assigned_domain(ind)) CYCLE 255 CALL swap_dimensions(ind) 256 CALL swap_geometry(ind) 257 ps=f_ps(ind) 258 theta_rhodz=f_theta_rhodz(ind) 259 q=f_q(ind) 260 temp=f_temp(ind) 261 CALL compute_diagnose_temp(ps,theta_rhodz,q,temp) 262 END DO 263 END SUBROUTINE diagnose_temperature 264 265 SUBROUTINE compute_diagnose_temp(ps,theta_rhodz,q,temp) 266 USE omp_para 267 USE pression_mod 268 REAL(rstd),INTENT(IN) :: ps(iim*jjm) 269 REAL(rstd),INTENT(IN) :: theta_rhodz(iim*jjm,llm,nqdyn) 270 REAL(rstd),INTENT(IN) :: q(iim*jjm,llm,nqtot) 271 REAL(rstd),INTENT(OUT) :: temp(iim*jjm,llm) 272 273 REAL(rstd) :: p(iim*jjm,llm+1) 274 REAL(rstd) :: Rd, p_ik, theta_ik, temp_ik, qv, chi, Rmix 275 INTEGER :: ij,l 276 277 Rd = kappa*cpp 278 CALL compute_pression(ps,p,0) 279 DO l=ll_begin,ll_end 280 DO ij=ij_begin,ij_end 281 p_ik = .5*(p(ij,l)+p(ij,l+1)) 282 theta_ik = g*theta_rhodz(ij,l,1)/(p(ij,l)-p(ij,l+1)) 283 qv = q(ij,l,1) ! water vaper mixing ratio = mv/md 284 SELECT CASE(caldyn_thermo) 285 CASE(thermo_theta) 286 temp_ik = theta_ik*((p_ik/preff)**kappa) 287 CASE(thermo_entropy) 288 temp_ik = Treff*exp((theta_ik + Rd*log(p_ik/preff))/cpp) 289 CASE(thermo_moist) 290 Rmix = Rd+qv*Rv 291 chi = ( theta_ik + Rmix*log(p_ik/preff) ) / (cpp + qv*cppv) ! log(T/Treff) 292 temp_ik = Treff*exp(chi) 293 END SELECT 294 IF(physics_thermo==thermo_fake_moist) temp_ik=temp_ik/(1+0.608*qv) 295 temp(ij,l)=temp_ik 296 END DO 297 END DO 298 END SUBROUTINE compute_diagnose_temp 299 236 300 SUBROUTINE Tv2T(f_Tv, f_q, f_T) 237 301 TYPE(t_field), POINTER :: f_TV(:) … … 247 311 CALL swap_geometry(ind) 248 312 Tv=f_Tv(ind) 249 q=f_q(ind)250 313 T=f_T(ind) 251 T=Tv/(1+0.608*q(:,:,1)) 252 END DO 253 314 SELECT CASE(physics_thermo) 315 CASE(thermo_dry) 316 T=Tv 317 CASE(thermo_fake_moist) 318 q=f_q(ind) 319 T=Tv/(1+0.608*q(:,:,1)) 320 END SELECT 321 END DO 254 322 END SUBROUTINE Tv2T 255 323 -
codes/icosagcm/trunk/src/physics_dcmip2016.f90
r430 r434 34 34 SUBROUTINE init_physics 35 35 USE physics_interface_mod 36 USE omp_para 36 37 IMPLICIT NONE 37 38 INTEGER :: ngrid 38 39 CHARACTER(LEN=255) :: testcase_str 39 40 41 testcase_str='undefined' 40 42 CALL getin("physics_dcmip2016",testcase_str) 41 43 … … 53 55 CASE DEFAULT 54 56 PRINT*, 'Bad selector for dcmip2016 test case <', testcase_str, & 55 '> options are <dry_baroclinic>, <moist_baroclinic >, <cyclone>, <supercell>'57 '> options are <dry_baroclinic>, <moist_baroclinic_full>, <moist_baroclinic_kessler>, <cyclone>, <supercell>' 56 58 STOP 57 59 END SELECT … … 59 61 PBL=.FALSE. 60 62 CALL getin("physics_dcmip2016_PBL",PBL) 63 IF(is_master) THEN 64 IF(PBL) THEN 65 PRINT *, 'PBL=.TRUE., Bryan PBL activated' 66 ELSE 67 PRINT *, 'PBL=.FALSE., Reed & Jablonowski PBL activated' 68 END IF 69 END IF 61 70 62 71 ngrid = physics_inout%ngrid -
codes/icosagcm/trunk/src/theta_rhodz.f90
r428 r434 48 48 USE icosa 49 49 USE pression_mod 50 USE exner_mod51 50 IMPLICIT NONE 52 51 TYPE(t_field), POINTER :: f_ps(:)
Note: See TracChangeset
for help on using the changeset viewer.