Ignore:
Timestamp:
Jun 26, 2014, 12:25:31 PM (10 years ago)
Author:
slebonnois
Message:

SL: many bug corrections in phyvenus, some cleaning, and a new ksi matrix format for Venus IR

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.VENUS/libf/phyvenus/newstart.F

    r1055 r1301  
    6969      REAL tsurf(ngridmx),tsoil(ngridmx,nsoilmx)
    7070      REAL albe(ngridmx),radsol(ngridmx),sollw(ngridmx)
    71       real solsw(ngridmx),dlw(ngridmx)
     71      real solsw(ngridmx),fder(ngridmx)
     72      real sollwdown(ngridmx),dlw(ngridmx)
    7273      REAL zmea(ngridmx), zstd(ngridmx)
    7374      REAL zsig(ngridmx), zgam(ngridmx), zthe(ngridmx)
     
    8485      real tsurfS(iip1,jjp1),tsoilS(iip1,jjp1,nsoilmx)
    8586      real albeS(ip1jmp1),radsolS(ip1jmp1),sollwS(ip1jmp1)
    86       real solswS(ip1jmp1),dlwS(ip1jmp1)
     87      real solswS(ip1jmp1),fderS(ip1jmp1)
     88      real sollwdownS(ip1jmp1),dlwS(ip1jmp1)
    8789      real zmeaS(ip1jmp1),zstdS(ip1jmp1),zsigS(ip1jmp1)
    8890      real zgamS(ip1jmp1),ztheS(ip1jmp1),zpicS(ip1jmp1)
     
    116118      real, dimension(:,:),   allocatable :: albeold,radsolold
    117119      real, dimension(:,:),   allocatable :: sollwold,solswold
    118       real, dimension(:,:),   allocatable :: dlwold
     120      real, dimension(:,:),   allocatable :: fderold
     121      real, dimension(:,:),   allocatable :: dlwold,sollwdownold
    119122      real, dimension(:,:),   allocatable :: zmeaold,zstdold,zsigold
    120123      real, dimension(:,:),   allocatable :: zgamold,ztheold,zpicold
     
    135138      integer, dimension(4) :: start,counter
    136139      REAL phisinverse(iip1,jjp1)  ! geopotentiel au sol avant inversion
    137       logical topoflag,albedoflag,razvitu
     140      logical topoflag,albedoflag,razvitu,razvitv
    138141      real    albedo
    139142     
     
    318321      allocate(albeold(imold+1,jmold+1),radsolold(imold+1,jmold+1))
    319322      allocate(sollwold(imold+1,jmold+1),solswold(imold+1,jmold+1))
    320       allocate(dlwold(imold+1,jmold+1))
     323      allocate(fderold(imold+1,jmold+1))
     324      allocate(sollwdownold(imold+1,jmold+1),dlwold(imold+1,jmold+1))
    321325      allocate(zmeaold(imold+1,jmold+1),zstdold(imold+1,jmold+1))
    322326      allocate(zsigold(imold+1,jmold+1),zgamold(imold+1,jmold+1))
     
    616620      ENDIF
    617621c
     622      ierr = NF_INQ_VARID (nid, "fder", nvarid)
     623      IF (ierr .NE. NF_NOERR) THEN
     624         PRINT*, "lect_start_archive: Le champ <fder> est absent"
     625         CALL abort
     626      ENDIF
     627#ifdef NC_DOUBLE
     628      ierr = NF_GET_VARA_DOUBLE(nid, nvarid,start,counter,fderold)
     629#else
     630      ierr = NF_GET_VARA_REAL(nid, nvarid,start,counter,fderold)
     631#endif
     632      IF (ierr .NE. NF_NOERR) THEN
     633         PRINT*, "lect_start_archive: Lecture echouee pour <fder>"
     634         CALL abort
     635      ENDIF
     636c
    618637      ierr = NF_INQ_VARID (nid, "dlw", nvarid)
    619638      IF (ierr .NE. NF_NOERR) THEN
     
    628647      IF (ierr .NE. NF_NOERR) THEN
    629648         PRINT*, "lect_start_archive: Lecture echouee pour <dlw>"
     649         CALL abort
     650      ENDIF
     651c
     652      ierr = NF_INQ_VARID (nid, "sollwdown", nvarid)
     653      IF (ierr .NE. NF_NOERR) THEN
     654         PRINT*, "lect_start_archive: Le champ <sollwdown> est absent"
     655         CALL abort
     656      ENDIF
     657#ifdef NC_DOUBLE
     658      ierr = NF_GET_VARA_DOUBLE(nid, nvarid,start,counter,sollwdownold)
     659#else
     660      ierr = NF_GET_VARA_REAL(nid, nvarid,start,counter,sollwdownold)
     661#endif
     662      IF (ierr .NE. NF_NOERR) THEN
     663         PRINT*, "lect_start_archive: Lecture echouee pour <sollwdown>"
    630664         CALL abort
    631665      ENDIF
     
    844878       topoflag = . FALSE .
    845879       CALL getin('topoflag',topoflag)
     880
     881        print*,zmeaold(2,1:10)
    846882
    847883       IF ( topoflag ) then
     
    952988      call gr_dyn_fi (1,iip1,jjp1,ngridmx,solswS,solsw)
    953989
     990      call interp_horiz (fderold,fderS,imold,jmold,iim,jjm,1,
     991     &                   rlonuold,rlatvold,rlonu,rlatv)
     992      call gr_dyn_fi (1,iip1,jjp1,ngridmx,fderS,fder)
     993
    954994      call interp_horiz (dlwold,dlwS,imold,jmold,iim,jjm,1,
    955995     &                   rlonuold,rlatvold,rlonu,rlatv)
    956996      call gr_dyn_fi (1,iip1,jjp1,ngridmx,dlwS,dlw)
     997
     998      call interp_horiz (sollwdownold,sollwdownS,imold,jmold,iim,jjm,1,
     999     &                   rlonuold,rlatvold,rlonu,rlatv)
     1000      call gr_dyn_fi (1,iip1,jjp1,ngridmx,sollwdownS,sollwdown)
    9571001
    9581002      print*,"Nouvelles var physiques OK"
     
    10441088       razvitu = . FALSE .
    10451089       CALL getin('razvitu',razvitu)
     1090       razvitv = . FALSE .
     1091       CALL getin('razvitv',razvitv)
    10461092
    10471093c calcul des champ de vent; passage en vent covariant
     
    10531099      call interp_horiz(var,us,imold,jmold,iim,jjm,llm,
    10541100     &                   rlonuold,rlatvold,rlonu,rlatv)
    1055       write (*,*) 'us ', us (1,2,1)   ! INFO
     1101      write (*,*) 'us ', us (1,2,1)    ! INFO
    10561102
    10571103      call interp_vert
     
    10781124      write (*,*) 'ucov ', ucov (1,2,1)  ! INFO
    10791125c     write(48,*) 'ucov',ucov
     1126! Reseting v=0
     1127      if (razvitv) then
     1128           vnat(:,:,:) = 0.
     1129      endif
     1130      write (*,*) 'vnat ', vnat (1,2,1)    ! INFO
    10801131      do l=1,llm
    10811132        do j = 1, jjm
     
    11141165
    11151166      call writerestartphy('restartphy.nc',tab_cntrl_fi,ngridmx,llm,
    1116      .           rlat,rlon,tsurf,tsoil,albe,solsw, sollw,dlw,
    1117      .           radsol,
     1167     .           rlat,rlon,tsurf,tsoil,albe,solsw, sollw,fder,dlw,
     1168     .           sollwdown,radsol,
    11181169     .           zmea,zstd,zsig,zgam,zthe,zpic,zval,
    11191170     .           t_fi)
Note: See TracChangeset for help on using the changeset viewer.