Changeset 2111
- Timestamp:
- Mar 5, 2019, 2:04:30 PM (6 years ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/README
r2107 r2111 1465 1465 == 26/02/2019 == AB 1466 1466 - now convective adjustment can be used for layers beyond thermals 1467 1468 == 05/03/2019 == EM 1469 - some fixes for the slab ocean. Still need to make it work in parallel. -
trunk/LMDZ.GENERIC/libf/phystd/surf_heat_transp_mod.F90
r1537 r2111 32 32 PRIVATE :: gr_fi_dyn, gr_dyn_fi 33 33 ! Routines from dyn3d, valid on global dynamics grid only: 34 PRIVATE :: grad,diverg,gr_ u_scal,gr_v_scal34 PRIVATE :: grad,diverg,gr_v_scal,gr_scal_v,gr_scal_u 35 35 36 36 CONTAINS … … 231 231 ip1jmp1=(nbp_lon+1)*nbp_lat ! = iip1*jjp1 232 232 233 ! Passage taux,y sur grilles 2d 233 ! Convert taux,y to 2D scalar grid 234 ! north and south poles tx,ty no meaning 235 tx_phy(1)=0. 236 tx_phy(ngrid)=0. 237 ty_phy(1)=0. 238 ty_phy(ngrid)=0. 234 239 CALL gr_fi_dyn(1,ngrid,iip1,jjp1,tx_phy,txu) 235 240 CALL gr_fi_dyn(1,ngrid,iip1,jjp1,ty_phy,tyu) 236 ! Passage grille u,v 237 ! Multiplication par f ou eps. 238 CALL gr_v_scal(1,txu,txv) 239 CALL gr_v_scal(1,tyu,tyv) 241 242 ! Divide taux,y by f or eps, and convert to 2D u,v grids 243 ! (Arakawa C grid) 244 CALL gr_scal_v(1,txu,txv) ! wind stress at v points 245 CALL gr_scal_v(1,tyu,tyv) 240 246 fluxm=tyv*unsev-txv*unsfv 241 247 ! fluxm=-txv*unsfv 242 CALL gr_u_scal(1,txu,txu) 243 CALL gr_u_scal(1,tyu,tyu) 248 ! Zonal flux 249 CALL gr_scal_u(1,txu,txu) ! wind stress at u points 250 CALL gr_scal_u(1,tyu,tyu) 244 251 fluxz=tyu*unsfu+txu*unseu 245 252 ! fluxz=tyu*unsfu 246 253 247 ! C alcul de T, Tdeep254 ! Convert temperature to 2D grid 248 255 CALL gr_fi_dyn(2,ngrid,iip1,jjp1,ts_phy,ts) 249 256 … … 263 270 fluxv=fluxv 264 271 265 ! Calcul flux de chaleur méridiens272 ! Meridional heat fluxes 266 273 DO ij=1,ip1jm 274 ! centered scheme 267 275 fluxtm(ij,1)=fluxm(ij)*(ts(ij+iip1,1)+ts(ij,1))/2. 268 276 fluxtm(ij,2)=-fluxm(ij)*(ts(ij+iip1,2)+ts(ij,2))/2. 269 277 END DO 270 278 271 !Calcul flux chaleur zonaux 279 ! Zonal heat fluxes 280 ! Schema upstream 281 fluxtz(1:iip1,:)=0 ! no zonal heat flux at north pole 272 282 DO ij=iip2,ip1jm 273 283 IF (fluxz(ij).GE.0.) THEN … … 487 497 488 498 489 SUBROUTINE gr_u_scal(nx,x_u,x_scal)490 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat491 IMPLICIT NONE492 493 INTEGER,INTENT(IN) :: nx494 REAL,INTENT(IN) :: x_u((nbp_lon+1)*nbp_lat,nx)495 REAL,INTENT(OUT) :: x_scal((nbp_lon+1)*nbp_lat,nx)496 497 INTEGER :: l,ij498 INTEGER :: iip1,jjp1,ip1jmp1499 500 iip1=nbp_lon+1501 jjp1=nbp_lat502 ip1jmp1=(nbp_lon+1)*nbp_lat ! = iip1*jjp1503 504 DO l=1,nx505 DO ij=ip1jmp1,2,-1506 x_scal(ij,l)= &507 (aireu(ij)*x_u(ij,l)+aireu(ij-1)*x_u(ij-1,l)) &508 /(aireu(ij)+aireu(ij-1))509 ENDDO510 ENDDO511 512 CALL SCOPY(nx*jjp1,x_scal(iip1,1),iip1,x_scal(1,1),iip1)513 514 END SUBROUTINE gr_u_scal515 516 517 518 499 SUBROUTINE gr_v_scal(nx,x_v,x_scal) 519 500 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat … … 547 528 548 529 END SUBROUTINE gr_v_scal 530 531 SUBROUTINE gr_scal_v(nx,x_scal,x_v) 532 ! convert values from scalar points to v points on C-grid 533 ! used to compute wind stress at V points 534 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat 535 IMPLICIT NONE 536 537 INTEGER,INTENT(IN) :: nx ! number of levels or fields 538 REAL,INTENT(OUT) :: x_v((nbp_lon+1)*(nbp_lat-1),nx) 539 REAL,INTENT(IN) :: x_scal((nbp_lon+1)*nbp_lat,nx) 540 541 INTEGER :: l,ij 542 INTEGER :: iip1,ip1jm 543 544 iip1=nbp_lon+1 545 ip1jm=(nbp_lon+1)*(nbp_lat-1) ! = iip1*jjm 546 547 DO l=1,nx 548 DO ij=1,ip1jm 549 x_v(ij,l)= & 550 (cu(ij)*cvusurcu(ij)*x_scal(ij,l)+ & 551 cu(ij+iip1)*cvusurcu(ij+iip1)*x_scal(ij+iip1,l)) & 552 /(cu(ij)*cvusurcu(ij)+cu(ij+iip1)*cvusurcu(ij+iip1)) 553 ENDDO 554 ENDDO 555 556 END SUBROUTINE gr_scal_v 557 558 SUBROUTINE gr_scal_u(nx,x_scal,x_u) 559 ! convert values from scalar points to U points on C-grid 560 ! used to compute wind stress at U points 561 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat 562 IMPLICIT NONE 563 564 INTEGER,INTENT(IN) :: nx 565 REAL,INTENT(OUT) :: x_u((nbp_lon+1)*nbp_lat,nx) 566 REAL,INTENT(IN) :: x_scal((nbp_lon+1)*nbp_lat,nx) 567 568 INTEGER :: l,ij 569 INTEGER :: iip1,jjp1,ip1jmp1 570 571 iip1=nbp_lon+1 572 jjp1=nbp_lat 573 ip1jmp1=(nbp_lon+1)*nbp_lat ! = iip1*jjp1 574 575 DO l=1,nx 576 DO ij=1,ip1jmp1-1 577 x_u(ij,l)= & 578 (aire(ij)*x_scal(ij,l)+aire(ij+1)*x_scal(ij+1,l)) & 579 /(aire(ij)+aire(ij+1)) 580 ENDDO 581 ENDDO 582 583 CALL SCOPY(nx*jjp1,x_u(1,1),iip1,x_u(iip1,1),iip1) 584 585 END SUBROUTINE gr_scal_u 549 586 550 587 END MODULE surf_heat_transp_mod
Note: See TracChangeset
for help on using the changeset viewer.