Changeset 295 for codes/icosagcm/trunk/src/physics.f90
- Timestamp:
- 10/31/14 14:52:01 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/trunk/src/physics.f90
r281 r295 10 10 TYPE(t_field),POINTER :: f_extra_physics_2D(:), f_extra_physics_3D(:) 11 11 TYPE(t_field),POINTER :: f_dulon(:), f_dulat(:) 12 TYPE(t_field),POINTER :: f_temp(:) 12 13 13 14 CHARACTER(LEN=255) :: physics_type … … 38 39 CALL allocate_field(f_dulon,field_t,type_real,llm, name='dulon') 39 40 CALL allocate_field(f_dulat,field_t,type_real,llm, name='dulat') 41 CALL allocate_field(f_temp,field_t,type_real,llm, name='temp') 40 42 CALL init_pack_before ! Compute physics_inout%ngrid and offsets used by pack/unpack 41 43 CALL init_physics_dcmip … … 102 104 USE physics_interface_mod 103 105 USE physics_dcmip_mod, ONLY : full_physics_dcmip => full_physics 106 USE theta2theta_rhodz_mod 104 107 USE mpipara 105 108 IMPLICIT NONE … … 111 114 REAL(rstd),POINTER :: phis(:) 112 115 REAL(rstd),POINTER :: ps(:) 116 REAL(rstd),POINTER :: temp(:,:) 113 117 REAL(rstd),POINTER :: theta_rhodz(:,:) 114 118 REAL(rstd),POINTER :: ue(:,:) … … 118 122 INTEGER :: it, ind 119 123 124 CALL theta_rhodz2temperature(f_ps,f_theta_rhodz,f_temp) 125 120 126 DO ind=1,ndomain 121 127 IF (.NOT. assigned_domain(ind)) CYCLE … … 124 130 phis=f_phis(ind) 125 131 ps=f_ps(ind) 126 t heta_rhodz=f_theta_rhodz(ind)132 temp=f_temp(ind) 127 133 ue=f_ue(ind) 128 134 q=f_q(ind) 129 CALL pack_physics(pack_info(ind), phis, ps, t heta_rhodz, ue, q)135 CALL pack_physics(pack_info(ind), phis, ps, temp, ue, q) 130 136 END DO 131 137 … … 134 140 CALL full_physics_dcmip 135 141 CASE DEFAULT 136 IF(is_mpi_ root) PRINT *,'Internal error : illegal value of phys_type', phys_type142 IF(is_mpi_master) PRINT *,'Internal error : illegal value of phys_type', phys_type 137 143 STOP 138 144 END SELECT … … 143 149 CALL swap_geometry(ind) 144 150 ps=f_ps(ind) 145 t heta_rhodz=f_theta_rhodz(ind)151 temp=f_temp(ind) 146 152 q=f_q(ind) 147 153 dulon=f_dulon(ind) 148 154 dulat=f_dulat(ind) 149 CALL unpack_physics(pack_info(ind), ps, t heta_rhodz, q, dulon, dulat)155 CALL unpack_physics(pack_info(ind), ps, temp, q, dulon, dulat) 150 156 END DO 157 CALL temperature2theta_rhodz(f_ps,f_temp,f_theta_rhodz) 151 158 152 159 ! Transfer dulon, dulat … … 166 173 END SUBROUTINE physics_column 167 174 168 SUBROUTINE pack_physics(info, phis, ps, t heta_rhodz, ue, q)175 SUBROUTINE pack_physics(info, phis, ps, temp, ue, q) 169 176 USE icosa 170 177 USE wind_mod … … 176 183 REAL(rstd) :: phis(iim*jjm) 177 184 REAL(rstd) :: ps(iim*jjm) 178 REAL(rstd) :: t heta_rhodz(iim*jjm,llm)185 REAL(rstd) :: temp(iim*jjm,llm) 179 186 REAL(rstd) :: ue(3*iim*jjm,llm) 180 187 REAL(rstd) :: q(iim*jjm,llm,nqtot) 181 188 182 189 REAL(rstd) :: p(iim*jjm,llm+1) 183 REAL(rstd) :: Temp(iim*jjm,llm)184 190 REAL(rstd) :: uc(iim*jjm,3,llm) 185 191 REAL(rstd) :: ulon(iim*jjm,llm) 186 192 REAL(rstd) :: ulat(iim*jjm,llm) 187 193 194 !$OMP BARRIER 188 195 CALL compute_pression(ps,p,0) 189 CALL compute_theta_rhodz2temperature(ps,theta_rhodz,Temp,0) 196 !$OMP BARRIER 190 197 CALL compute_wind_centered(ue,uc) 191 198 CALL compute_wind_centered_lonlat_compound(uc, ulon, ulat) … … 199 206 END SUBROUTINE pack_physics 200 207 201 SUBROUTINE unpack_physics(info, ps,t heta_rhodz, q, dulon, dulat)208 SUBROUTINE unpack_physics(info, ps,temp, q, dulon, dulat) 202 209 USE icosa 203 210 USE physics_interface_mod … … 206 213 TYPE(t_pack_info) :: info 207 214 REAL(rstd) :: ps(iim*jjm) 208 REAL(rstd) :: theta_rhodz(iim*jjm,llm) 209 REAL(rstd) :: Temp(iim*jjm,llm) 215 REAL(rstd) :: temp(iim*jjm,llm) 210 216 REAL(rstd) :: q(iim*jjm,llm,nqtot) 211 217 REAL(rstd) :: dulon(iim*jjm,llm) … … 221 227 q = q + physics_inout%dt_phys * dq 222 228 Temp = Temp + physics_inout%dt_phys * dTemp 223 CALL compute_temperature2theta_rhodz(ps,Temp,theta_rhodz,0)229 ! CALL compute_temperature2theta_rhodz(ps,Temp,theta_rhodz,0) 224 230 END SUBROUTINE unpack_physics 225 231
Note: See TracChangeset
for help on using the changeset viewer.