Changeset 526 for codes/icosagcm/trunk/src
- Timestamp:
- 01/20/17 21:46:09 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/trunk/src/observable.f90
r482 r526 77 77 END IF 78 78 79 CALL divide_by_mass(1, f_mass, f_theta_rhodz, f_buf_i)80 IF(init) THEN81 CALL output_field("theta_init",f_buf_i)82 ELSE83 CALL output_field("theta",f_buf_i)84 END IF85 86 79 IF(nqdyn>1) THEN 87 80 CALL divide_by_mass(2, f_mass, f_theta_rhodz, f_buf_i) … … 93 86 END IF 94 87 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) 88 CALL divide_by_mass(1, f_mass, f_theta_rhodz, f_buf_i) 89 IF(init) THEN 90 CALL output_field("theta_init",f_buf_i) 91 ELSE 92 CALL output_field("theta",f_buf_i) 93 END IF 94 95 CALL pression_mid(f_ps, f_pmid) 96 CALL diagnose_temperature(f_pmid, f_q, f_buf_i) ! f_buf_i : IN = theta, out = T 98 97 99 98 IF(init) THEN … … 112 111 CALL transfert_request(f_buf_uh,req_e1_vect) 113 112 CALL un2ulonlat(f_buf_uh, f_buf_ulon, f_buf_ulat) 114 CALL pression_mid(f_ps, f_pmid)115 113 IF(init) THEN 116 114 CALL output_field("uz_init",f_buf_i) … … 236 234 END SUBROUTINE compute_prognostic_vel_to_horiz 237 235 238 SUBROUTINE diagnose_temperature(f_p s,f_theta_rhodz,f_q,f_temp)236 SUBROUTINE diagnose_temperature(f_pmid,f_q,f_temp) 239 237 USE icosa 240 238 USE pression_mod 241 239 IMPLICIT NONE 242 TYPE(t_field), POINTER :: f_ps(:) ! IN 243 TYPE(t_field), POINTER :: f_theta_rhodz(:) ! IN 240 TYPE(t_field), POINTER :: f_pmid(:) ! IN 244 241 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(:,:,:) 242 TYPE(t_field), POINTER :: f_temp(:) ! INOUT 243 244 REAL(rstd), POINTER :: pmid(:,:) 249 245 REAL(rstd), POINTER :: q(:,:,:) 250 246 REAL(rstd), POINTER :: temp(:,:) … … 255 251 CALL swap_dimensions(ind) 256 252 CALL swap_geometry(ind) 257 ps=f_ps(ind) 258 theta_rhodz=f_theta_rhodz(ind) 253 pmid=f_pmid(ind) 259 254 q=f_q(ind) 260 255 temp=f_temp(ind) 261 CALL compute_diagnose_temp(p s,theta_rhodz,q,temp)256 CALL compute_diagnose_temp(pmid,q,temp) 262 257 END DO 263 258 END SUBROUTINE diagnose_temperature 264 259 265 SUBROUTINE compute_diagnose_temp(p s,theta_rhodz,q,temp)260 SUBROUTINE compute_diagnose_temp(pmid,q,temp) 266 261 USE omp_para 267 262 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) 263 REAL(rstd),INTENT(IN) :: pmid(iim*jjm,llm) 264 REAL(rstd),INTENT(IN) :: q(iim*jjm,llm,nqtot) 265 REAL(rstd),INTENT(INOUT) :: temp(iim*jjm,llm) 266 274 267 REAL(rstd) :: Rd, p_ik, theta_ik, temp_ik, qv, chi, Rmix 275 268 INTEGER :: ij,l 276 269 277 270 Rd = kappa*cpp 278 CALL compute_pression(ps,p,0)279 271 DO l=ll_begin,ll_end 280 272 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))273 p_ik = pmid(ij,l) 274 theta_ik = temp(ij,l) 283 275 qv = q(ij,l,1) ! water vaper mixing ratio = mv/md 284 276 SELECT CASE(caldyn_thermo)
Note: See TracChangeset
for help on using the changeset viewer.