Changeset 56 for codes/icosagcm/trunk
- Timestamp:
- 07/31/12 17:46:53 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/trunk/src/caldyn_gcm.f90
r53 r56 17 17 IMPLICIT NONE 18 18 REAL(rstd),INTENT(IN) :: dt 19 INTEGER:: write_period19 REAL :: write_period 20 20 21 21 write_period=0 22 22 CALL getin('write_period',write_period) 23 23 write_period=write_period/scale_factor 24 itau_out=INT(write_period/dt) 25 24 itau_out=FLOOR(.5+write_period/dt) 25 PRINT *, 'Output frequency (scaled) set to ',write_period, ' : itau_out = ',itau_out 26 26 27 CALL allocate_caldyn 27 28 … … 43 44 44 45 END SUBROUTINE allocate_caldyn 45 46 SUBROUTINE swap_caldyn(ind) 47 IMPLICIT NONE 48 INTEGER,INTENT(IN) :: ind 49 ! out=f_out(ind) 50 out_u=f_out_u(ind) 51 ! out_z=f_out_z(ind) 52 53 END SUBROUTINE swap_caldyn 54 46 55 47 SUBROUTINE check_mass_conservation(f_ps,f_dps) 56 48 USE icosa … … 120 112 CALL transfert_request(f_theta_rhodz,req_i1) 121 113 CALL transfert_request(f_u,req_e1) 122 ! CALL transfert_request(f_u,req_e1)123 124 125 ! CALL vorticity(f_u,f_out_z)126 114 127 115 DO ind=1,ndomain 128 116 CALL swap_dimensions(ind) 129 117 CALL swap_geometry(ind) 130 CALL swap_caldyn(ind)131 118 119 out_u=f_out_u(ind) 132 120 phis=f_phis(ind) 133 121 ps=f_ps(ind) … … 137 125 dtheta_rhodz=f_dtheta_rhodz(ind) 138 126 du=f_du(ind) 139 ! ij=(jj_end-1-1)*iim+ii_begin140 ! PRINT *,"--> ind=",ind,ij141 ! PRINT *,u(ij+u_right,1)142 ! PRINT *,u(ij+u_rup,1)143 ! PRINT *,u(ij+u_lup,1)144 ! PRINT *,u(ij+u_left,1)145 ! PRINT *,u(ij+u_ldown,1)146 ! PRINT *,u(ij+u_rdown,1)147 148 ! ij=(jj_end-1-1)*iim+ii_end149 ! PRINT *,"--> ind=",ind,ij150 ! PRINT *,u(ij+u_right,1)151 ! PRINT *,u(ij+u_rup,1)152 ! PRINT *,u(ij+u_lup,1)153 ! PRINT *,u(ij+u_left,1)154 ! PRINT *,u(ij+u_ldown,1)155 ! PRINT *,u(ij+u_rdown,1)156 127 !$OMP PARALLEL DEFAULT(SHARED) 157 128 CALL compute_caldyn(phis, ps, theta_rhodz, u, dps, dtheta_rhodz, du) 158 129 !$OMP END PARALLEL 159 130 ENDDO 160 161 ! CALL transfert_request(f_out_u,req_e1)162 ! CALL transfert_request(f_out_u,req_e1)163 164 ! CALL vorticity(f_u,f_out_z)165 131 166 132 IF (mod(it,itau_out)==0 ) THEN … … 169 135 f_buf_i, f_buf_v, f_buf_u3d, f_buf_ulon, f_buf_ulat, f_buf_s, f_buf_p) 170 136 END IF 171 172 137 173 138 ! CALL check_mass_conservation(f_ps,f_dps) … … 192 157 REAL(rstd) :: ww,uu 193 158 REAL(rstd) :: delta 194 REAL(rstd) :: etav,hv 159 REAL(rstd) :: etav,hv, du2 195 160 196 161 ! REAL(rstd) :: theta(iim*jjm,llm) ! potential temperature … … 272 237 ! berni=1e10 273 238 274 !!! Compute pression 275 239 !!! Compute pressure 240 241 ! PRINT *, 'Computing pressure' 276 242 DO l = 1, llm+1 277 243 !$OMP DO … … 285 251 286 252 !!! Compute Exner function 253 ! PRINT *, 'Computing Exner' 287 254 CALL compute_exner(ps,p,pks,pk,1) 288 255 289 256 !!! Compute mass 257 ! PRINT *, 'Computing mass' 290 258 DO l = 1, llm 291 259 !$OMP DO … … 300 268 301 269 !! compute theta 270 ! PRINT *, 'Computing theta' 302 271 DO l = 1, llm 303 272 !$OMP DO … … 336 305 337 306 !!! Compute mass flux 338 !! question ï¿œ thomas : meilleure pondï¿œration de la masse sur les liens ?339 307 340 308 DO l = 1, llm … … 416 384 ENDDO 417 385 ENDDO 418 419 420 ! DO l = 1, llm 421 !!$OMP DO 422 ! DO j=jj_begin,jj_end 423 ! DO i=ii_begin,ii_end 424 ! ij=(j-1)*iim+i 425 ! out(ij,l)=theta(ij,l)-288 426 ! ENDDO 427 ! ENDDO 428 ! ENDDO 429 430 386 387 431 388 !!! Compute dps 432 389 !$OMP DO … … 440 397 441 398 442 443 399 !!! Compute vertical velocity 444 400 DO l = 1,llm-1 … … 455 411 456 412 !$OMP DO 413 ! vertical mass flux at the surface = 0 457 414 DO j=jj_begin,jj_end 458 415 DO i=ii_begin,ii_end … … 463 420 464 421 465 !!! Compute potential vorticity422 !!! Compute shallow-water potential vorticity 466 423 DO l = 1,llm 467 424 !$OMP DO … … 494 451 ENDDO 495 452 496 !!! Compute potential vorticity contribution to du453 !!! Compute potential vorticity (Coriolis) contribution to du 497 454 DO l=1,llm 498 455 !$OMP DO … … 565 522 566 523 567 !!! second contribution to du 524 !!! second contribution to du (gradients of Bernoulli and Exner functions) 568 525 DO l=1,llm 569 526 !$OMP DO … … 590 547 ENDDO 591 548 592 !!! s econd contribution to du549 !!! save second contribution to du for debugging output 593 550 DO l=1,llm 594 551 !$OMP DO … … 615 572 ENDDO 616 573 617 !!! contribution due to vertical advection574 !!! contributions due to vertical advection 618 575 619 576 ! Contribution to dtheta
Note: See TracChangeset
for help on using the changeset viewer.