Changeset 2453 for LMDZ5/trunk/libf/dynphy_lonlat
- Timestamp:
- Feb 25, 2016, 9:52:08 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90
r2427 r2453 86 86 USE conf_phys_m, ONLY: conf_phys 87 87 USE init_ssrf_m, ONLY: start_init_subsurf 88 !use ioipsl_getincom 88 89 IMPLICIT NONE 89 90 !------------------------------------------------------------------------------- … … 97 98 LOGICAL :: read_mask 98 99 REAL :: phystep, dummy 99 REAL, DIMENSION(SIZE(masque,1),SIZE(masque,2)) :: masque_tmp 100 REAL, DIMENSION(SIZE(masque,1),SIZE(masque,2)) :: masque_tmp,phiso 100 101 REAL, DIMENSION(klon) :: sn, rugmer, run_off_lic_0, fder 101 102 REAL, DIMENSION(klon,nbsrf) :: qsolsrf, snsrf … … 115 116 INTEGER :: read_climoz !--- Read ozone climatology 116 117 REAL :: alp_offset 118 LOGICAL :: filtre_oro=.false. 117 119 118 120 deg2rad= pi/180.0 … … 142 144 read_mask=ANY(masque/=-99999.); masque_tmp=masque 143 145 CALL start_init_orog(rlonv, rlatu, phis, masque_tmp) 146 147 CALL getin('filtre_oro',filtre_oro) 148 IF (filtre_oro) CALL filtreoro(size(phis,1),size(phis,2),phis,masque_tmp,rlatu) 149 144 150 WRITE(fmt,"(i4,'i1)')")iml ; fmt='('//ADJUSTL(fmt) 145 151 IF(.NOT.read_mask) THEN !--- Keep mask form orography … … 447 453 ! 448 454 !------------------------------------------------------------------------------- 455 ! 456 !******************************************************************************* 457 458 SUBROUTINE filtreoro(imp1,jmp1,phis,masque,rlatu) 459 460 IMPLICIT NONE 461 462 INTEGER imp1,jmp1 463 REAL, DIMENSION(imp1,jmp1) :: phis,masque 464 REAL, DIMENSION(jmp1) :: rlatu 465 REAL, DIMENSION(imp1) :: wwf 466 REAL, DIMENSION(imp1,jmp1) :: phiso 467 INTEGER :: ifiltre,ifi,ii,i,j 468 REAL :: coslat0,ssz 469 470 coslat0=0.5 471 phiso=phis 472 do j=2,jmp1-1 473 print*,'avant if ',cos(rlatu(j)),coslat0 474 if (cos(rlatu(j))<coslat0) then 475 ! nb de pts affectes par le filtrage de part et d'autre du pt 476 ifiltre=(coslat0/cos(rlatu(j))-1.)/2. 477 wwf=0. 478 do i=1,ifiltre 479 wwf(i)=1. 480 enddo 481 wwf(ifiltre+1)=(coslat0/cos(rlatu(j))-1.)/2.-ifiltre 482 do i=1,imp1-1 483 if (masque(i,j)>0.9) then 484 ssz=phis(i,j) 485 do ifi=1,ifiltre+1 486 ii=i+ifi 487 if (ii>imp1-1) ii=ii-imp1+1 488 ssz=ssz+wwf(ifi)*phis(ii,j) 489 ii=i-ifi 490 if (ii<1) ii=ii+imp1-1 491 ssz=ssz+wwf(ifi)*phis(ii,j) 492 enddo 493 phis(i,j)=ssz*cos(rlatu(j))/coslat0 494 endif 495 enddo 496 print*,'j=',j,coslat0/cos(rlatu(j)), (1.+2.*sum(wwf))*cos(rlatu(j))/coslat0 497 endif 498 enddo 499 call dump2d(imp1,jmp1,phis,'phis ') 500 call dump2d(imp1,jmp1,masque,'masque ') 501 call dump2d(imp1,jmp1,phis-phiso,'dphis ') 502 503 END SUBROUTINE filtreoro 449 504 450 505 451 506 END MODULE etat0phys 452 !453 !*******************************************************************************454
Note: See TracChangeset
for help on using the changeset viewer.