Ignore:
Timestamp:
Nov 6, 2008, 5:39:24 PM (16 years ago)
Author:
lmdzadmin
Message:

Modifs guidage pour utiliser des champs de guidage sur niveaux hybrides
Ajout cle logique ok_gradsfile (.false. par defaut) pour activer sorties grads du guidage
FC/IM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/trunk/libf/dyn3dpar/guide_p.F

    r985 r1046  
    7979      real alpha_T(ip1jmp1),alpha_P(ip1jmp1)
    8080      real alpha_u(ip1jmp1),alpha_v(ip1jm)
     81      real alpha_pcor(llm)
    8182      real dday_step,toto,reste,itau_test
    8283      INTEGER step_rea,count_no_rea
     
    112113
    113114      save alpha_T,alpha_q,alpha_u,alpha_v,alpha_P,itau_test
     115      save alpha_pcor
    114116      save step_rea,count_no_rea
    115117
     
    159161         
    160162         if (mpi_rank==0) then
     163         if (ok_gradsfile) then
    161164         call inigrads(igrads,iip1
    162165     s  ,rlonv,180./pi,-180.,180.,jjp1,rlatu,-90.,90.,180./pi
    163166     s  ,llm,presnivs,1.
    164167     s  ,dtgrads,file,'dyn_zon ')
     168         endif !ok_gradsfile
    165169         endif
    166170         
     
    208212c           physic=.false.
    209213         endif
    210 
     214c correction de rappel dans couche limite
     215c F.Codron
     216         if (guide_BL) then
     217           alpha_pcor(:)=1.
     218         else
     219           do l=1,llm
     220             alpha_pcor(l)=(1.+tanh((0.85-presnivs(l)/preff)/0.05))/2.
     221           enddo
     222         endif
    211223         itau_test=1001
    212224         step_rea=1
     
    216228c lecture d'un fichier netcdf pour determiner le nombre de niveaux
    217229         IF (mpi_rank==0) THEN
    218        
     230         if (guide_modele) then
     231           if (ncidpl.eq.-99) ncidpl=NCOPN('apbp.nc',NCNOWRIT,rcod)
     232         else   
    219233         if (guide_u) then
    220234           if (ncidpl.eq.-99) ncidpl=NCOPN('u.nc',NCNOWRIT,rcod)
     
    233247         endif
    234248c
     249         endif
    235250         if (ncep) then
    236251          status=NF_INQ_DIMID(ncidpl,'LEVEL',rid)
     
    239254         endif
    240255          status=NF_INQ_DIMLEN(ncidpl,rid,nlev)
    241          print *,'nlev', nlev
    242           call ncclos(ncidpl,rcod)
    243          
    244          ENDIF
    245          
     256         print *,'nlev guide', nlev
     257         call ncclos(ncidpl,rcod)
    246258c   Lecture du premier etat des reanalyses.
    247259         call Gather_Field(ps,ip1jmp1,1,0)
     
    316328     
    317329       if (mpi_rank==0) then
     330        if (ok_gradsfile) then
    318331         call wrgrads(igrads,1,aire   ,'aire      ','aire      ' )
    319332         call wrgrads(igrads,1,dxdys  ,'dxdy      ','dxdy      ' )
     
    328341         call wrgrads(igrads,llm,q,'Q         ','Q         ' )
    329342         call wrgrads(igrads,llm,qsat,'QSAT      ','QSAT      ' )
     343       endif !(ok_gradsfile) then
    330344      endif
    331345     
     
    357371            do ij=ijb,ije
    358372                a=(1.-tau)*ucovrea1(ij,l)+tau*ucovrea2(ij,l)
    359                 ucov(ij,l)=(1.-alpha_u(ij))*ucov(ij,l)+alpha_u(ij)*a
     373                ucov(ij,l)=(1.-alpha_u(ij))*ucov(ij,l)+alpha_u(ij)
     374     $                     *alpha_pcor(l)*a
    360375                if (first.and.ini_anal) ucov(ij,l)=a
    361376            enddo
     
    368383            do ij=ijb,ije
    369384                a=(1.-tau)*tetarea1(ij,l)+tau*tetarea2(ij,l)
    370                 teta(ij,l)=(1.-alpha_T(ij))*teta(ij,l)+alpha_T(ij)*a
     385                teta(ij,l)=(1.-alpha_T(ij))*teta(ij,l)+alpha_T(ij)
     386     $                     *alpha_pcor(l)*a
    371387                if (first.and.ini_anal) teta(ij,l)=a
    372388            enddo
     
    393409c   hum relative en % -> hum specif
    394410                a=qsat(ij,l)*a*0.01
    395                 q(ij,l)=(1.-alpha_Q(ij))*q(ij,l)+alpha_Q(ij)*a
     411                q(ij,l)=(1.-alpha_Q(ij))*q(ij,l)+alpha_Q(ij)
     412     $                     *alpha_pcor(l)*a
    396413                if (first.and.ini_anal) q(ij,l)=a
    397414            enddo
     
    406423            do ij=ijb,ije
    407424                a=(1.-tau)*vcovrea1(ij,l)+tau*vcovrea2(ij,l)
    408                 vcov(ij,l)=(1.-alpha_v(ij))*vcov(ij,l)+alpha_v(ij)*a
     425                vcov(ij,l)=(1.-alpha_v(ij))*vcov(ij,l)+alpha_v(ij)
     426     $                     *alpha_pcor(l)*a
    409427                if (first.and.ini_anal) vcov(ij,l)=a
    410428            enddo
     
    493511         enddo
    494512
    495          call dump2d(iip1,jjp1,dxdys,'DX2DY2 SCAL  ')
    496          call dump2d(iip1,jjp1,dxdyu,'DX2DY2 U     ')
     513c         call dump2d(iip1,jjp1,dxdys,'DX2DY2 SCAL  ')
     514c         call dump2d(iip1,jjp1,dxdyu,'DX2DY2 U     ')
    497515         call dump2d(iip1,jjp1,dxdyv,'DX2DY2 v     ')
    498516
     
    520538              stop
    521539            endif
     540            gamma=log(0.5)/log(gamma)
     541            if (gamma4) then
     542              gamma=min(gamma,4.)
     543            endif
    522544            print*,'gamma=',gamma
    523             gamma=log(0.5)/log(gamma)
    524545         endif
    525546      endif
Note: See TracChangeset for help on using the changeset viewer.