Changeset 286 for codes/icosagcm/trunk/src/etat0_heldsz.f90
- Timestamp:
- 10/20/14 23:42:26 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/trunk/src/etat0_heldsz.f90
r186 r286 6 6 TYPE(t_field),POINTER :: f_theta_eq(:) 7 7 TYPE(t_field),POINTER :: f_theta(:) 8 TYPE(t_field),POINTER :: f_clat(:) ! FIXME, duplication9 8 10 9 REAL(rstd),ALLOCATABLE,SAVE :: knewt_t(:),kfrict(:) … … 65 64 REAL(rstd),POINTER :: u(:,:) 66 65 REAL(rstd),POINTER :: q(:,:,:) 67 REAL(rstd),POINTER :: clat(:)68 66 REAL(rstd),POINTER :: theta_eq(:,:) 69 67 REAL(rstd),POINTER :: theta(:,:) … … 78 76 79 77 theta_eq=f_theta_eq(ind) 80 clat=f_clat(ind) 81 CALL compute_Teq(clat,theta_eq) ! FIXME : already done by Init_Teq 78 CALL compute_Teq(lat_i,theta_eq) ! FIXME : already done by Init_Teq 82 79 83 80 ps=f_ps(ind) … … 111 108 CALL allocate_field(f_theta,field_t,type_real,llm) 112 109 CALL allocate_field(f_theta_eq,field_t,type_real,llm) 113 CALL allocate_field(f_clat,field_t,type_real)114 110 ALLOCATE(knewt_t(llm)); ALLOCATE( kfrict(llm)) 115 111 … … 147 143 CALL swap_dimensions(ind) 148 144 CALL swap_geometry(ind) 149 clat=f_clat(ind)150 145 theta_eq=f_theta_eq(ind) 151 CALL compute_Teq( clat,theta_eq)146 CALL compute_Teq(lat_i,theta_eq) 152 147 ENDDO 153 148 … … 159 154 END SUBROUTINE init_Teq 160 155 161 SUBROUTINE compute_Teq( clat,theta_eq)156 SUBROUTINE compute_Teq(lat,theta_eq) 162 157 USE icosa 163 158 USE disvert_mod 164 159 IMPLICIT NONE 165 REAL(rstd),INTENT( OUT) :: clat(iim*jjm)160 REAL(rstd),INTENT(IN) :: lat(iim*jjm) 166 161 REAL(rstd),INTENT(OUT) :: theta_eq(iim*jjm,llm) 167 162 168 REAL(rstd) :: lon, lat, r, zsig, ddsin, tetastrat, tetajl 169 REAL(rstd) :: slat(iim*jjm) 163 REAL(rstd) :: r, zsig, ddsin, tetastrat, tetajl 170 164 INTEGER :: i,j,l,ij 171 172 DO j=jj_begin-1,jj_end+1173 DO i=ii_begin-1,ii_end+1174 ij=(j-1)*iim+i175 CALL xyz2lonlat(xyz_i(ij,:),lon,lat)176 clat(ij)=cos(lat)177 slat(ij)=sin(lat)178 ENDDO179 ENDDO180 165 181 166 DO l=1,llm … … 185 170 DO i=ii_begin-1,ii_end+1 186 171 ij=(j-1)*iim+i 187 ddsin= slat(ij)172 ddsin=SIN(lat(ij)) 188 173 tetajl=teta0-delt_y*ddsin*ddsin+eps*ddsin & 189 174 -delt_z*(1.-ddsin*ddsin)*log(zsig) … … 244 229 theta_eq=f_theta_eq(ind) 245 230 theta=f_theta(ind) 246 clat=f_clat(ind) 247 CALL compute_heldsz(ps,theta_eq,clat, theta_rhodz,u, theta) 231 CALL compute_heldsz(ps,theta_eq,lat_i, theta_rhodz,u, theta) 248 232 ENDDO 249 233 END SUBROUTINE held_suarez 250 234 251 SUBROUTINE compute_heldsz(ps,theta_eq, clat, theta_rhodz,u, theta)235 SUBROUTINE compute_heldsz(ps,theta_eq,lat, theta_rhodz,u, theta) 252 236 USE icosa 253 237 USE theta2theta_rhodz_mod … … 255 239 REAL(rstd),INTENT(IN) :: ps(iim*jjm) 256 240 REAL(rstd),INTENT(IN) :: theta_eq(iim*jjm,llm) 257 REAL(rstd),INTENT(IN) :: clat(iim*jjm)241 REAL(rstd),INTENT(IN) :: lat(iim*jjm) 258 242 REAL(rstd),INTENT(INOUT) :: theta_rhodz(iim*jjm,llm) 259 243 REAL(rstd),INTENT(INOUT) :: u(3*iim*jjm,llm) … … 268 252 ij=(j-1)*iim+i 269 253 theta(ij,l)=theta(ij,l) - dt*(theta(ij,l)-theta_eq(ij,l))* & 270 (knewt_g+knewt_t(l)* clat(ij)**4 )254 (knewt_g+knewt_t(l)*COS(lat(ij))**4 ) 271 255 ENDDO 272 256 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.