Ignore:
Timestamp:
Oct 9, 2012, 3:35:26 PM (13 years ago)
Author:
Laurent Fairhead
Message:

Version testing basée sur la r1628

http://lmdz.lmd.jussieu.fr/utilisateurs/distribution-du-modele/versions-intermediaires


Testing release based on r1628

Location:
LMDZ5/branches/testing
Files:
1 deleted
30 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/testing

  • LMDZ5/branches/testing/libf/phylmd/calwake.F

    r1403 r1665  
    6060      REAL wake_dtKE(klon,klev),wake_dqKE(klon,klev)
    6161      REAL wake_dtPBL(klon,klev),wake_dqPBL(klon,klev)
    62       REAL wake_omg(klon,klev+1),wake_dp_deltomg(klon,klev)
     62      REAL wake_omg(klon,klev),wake_dp_deltomg(klon,klev)
    6363      REAL wake_spread(klon,klev),wake_Cstar(klon)
    6464      REAL wake_ddeltat(klon,klev),wake_ddeltaq(klon,klev)
     
    8484      REAL tu(klon,klev),qu(klon,klev)
    8585      REAL hw(klon),sigmaw(klon),wape(klon),fip(klon),gfl(klon)
    86       REAL omgbdth(klon,klev),dp_omgb(klon,klev)
     86      REAL omgbdth(klon,klev+1),dp_omgb(klon,klev)
    8787      REAL dtKE(klon,klev),dqKE(klon,klev)
    8888      REAL dtPBL(klon,klev),dqPBL(klon,klev)
  • LMDZ5/branches/testing/libf/phylmd/climb_hq_mod.F90

    r1084 r1665  
    252252       Bcoef(i) = -1. * RG / buf
    253253    END DO
     254    acoef(knon+1: klon) = 0.
     255    bcoef(knon+1: klon) = 0.
    254256
    255257  END SUBROUTINE calc_coef
  • LMDZ5/branches/testing/libf/phylmd/climb_wind_mod.F90

    r1067 r1665  
    209209       Bcoef(i) = -RG/buf
    210210    END DO
     211    acoef(knon+1: klon) = 0.
     212    bcoef(knon+1: klon) = 0.
    211213
    212214  END SUBROUTINE calc_coef
  • LMDZ5/branches/testing/libf/phylmd/coef_diff_turb_mod.F90

    r1067 r1665  
    389389!           calculer la fraction nuageuse (processus humide):
    390390!
    391           zfr = (zq+ratqs*zq-zqs) / (2.0*ratqs*zq)
     391          if (zq /= 0.) then
     392             zfr = (zq+ratqs*zq-zqs) / (2.0*ratqs*zq)
     393          else
     394             zfr = 0.
     395          end if
    392396          zfr = MAX(0.0,MIN(1.0,zfr))
    393397          IF (.NOT.richum) zfr = 0.0
  • LMDZ5/branches/testing/libf/phylmd/concvl.F

    r1664 r1665  
    248248         DO i = 1, klon
    249249          cbmf(i) = 0.
    250           plcl(i) = 0.
     250!          plcl(i) = 0.
    251251          sigd(i) = 0.
    252252         ENDDO
     
    256256      plfc(:)  = 0.
    257257      wbeff(:) = 100.
     258      plcl(:) = 0.
    258259
    259260      DO k = 1, klev+1
  • LMDZ5/branches/testing/libf/phylmd/cpl_mod.F90

    r1454 r1665  
    345345       IF (is_sequential) THEN
    346346          ndexcs(:) = 0
    347           itau_w = itau_phy + itime
     347          itau_w = itau_phy + itime + start_time * day_step / iphysiq
    348348          DO i = 1, maxrecv
    349349            IF (inforecv(i)%action) THEN
     
    12321232    IF (is_sequential) THEN
    12331233       ndexct(:) = 0
    1234        itau_w = itau_phy + itime
     1234       itau_w = itau_phy + itime + start_time * day_step / iphysiq
    12351235       CALL histwrite(nidct,'tauxe',itau_w,tmp_taux,iim*(jjm+1),ndexct)
    12361236       CALL histwrite(nidct,'tauyn',itau_w,tmp_tauy,iim*(jjm+1),ndexct)
  • LMDZ5/branches/testing/libf/phylmd/iostart.F90

    r1403 r1665  
    177177         ierr=NF90_GET_VAR(nid_start,varid,field_glo)
    178178         IF (ierr/=NF90_NOERR) THEN
     179           ! La variable exist dans le fichier mais la lecture a echouee.
    179180           PRINT*, 'phyetat0: Lecture echouee pour <'//field_name//'>'
    180            CALL abort
     181
     182           IF (field_name=='CLWCON' .OR. field_name=='RNEBCON' .OR. field_name=='RATQS') THEN
     183              ! Essaye de lire le variable sur surface uniqument, comme fait avant
     184              field_glo(:)=0.
     185              ierr=NF90_GET_VAR(nid_start,varid,field_glo(1:klon_glo))
     186              IF (ierr/=NF90_NOERR) THEN
     187                 PRINT*, 'phyetat0: Lecture echouee aussi en 2D pour <'//field_name//'>'
     188                 CALL abort
     189              ELSE
     190                 PRINT*, 'phyetat0: La variable <'//field_name//'> lu sur surface seulement'!, selon ancien format, le reste mis a zero'
     191              END IF
     192           ELSE
     193              CALL abort
     194           ENDIF
    181195         ENDIF
    182196
  • LMDZ5/branches/testing/libf/phylmd/limit_read_mod.F90

    r1001 r1665  
    150150   
    151151    INCLUDE "indicesol.h"
     152    INCLUDE "iniprint.h"
    152153
    153154! In- and ouput arguments
     
    165166!$OMP THREADPRIVATE(lmt_pas)
    166167    LOGICAL, SAVE                             :: first_call=.TRUE.
    167 !$OMP THREADPRIVATE(first_call)   
     168!$OMP THREADPRIVATE(first_call) 
     169    INTEGER, SAVE                             :: jour_lu = -1
     170!$OMP THREADPRIVATE(jour_lu) 
    168171! Locals variables
    169172!****************************************************************************************
     
    209212
    210213    is_modified = .FALSE.
    211     IF (MOD(itime-1, lmt_pas) == 0) THEN   ! time to read
     214    IF (MOD(itime-1, lmt_pas) == 0 .OR. jour_lu /= jour ) THEN   ! time to read
     215       jour_lu = jour
    212216       is_modified = .TRUE.
    213217!$OMP MASTER  ! Only master thread
  • LMDZ5/branches/testing/libf/phylmd/phyetat0.F

    r1458 r1665  
    749749      ENDIF
    750750
    751       u_ancien = 0.0   !AXC: We don't have u_ancien and v_ancien in the start
    752       v_ancien = 0.0   !AXC: files, therefore they have to be initialized.
    753 c
     751      CALL get_field("UANCIEN",u_ancien,found)
     752      IF (.NOT. found) THEN
     753         PRINT*, "phyetat0: Le champ <UANCIEN> est absent"
     754         PRINT*, "Depart legerement fausse. Mais je continue"
     755         ancien_ok = .FALSE.
     756      ENDIF
     757
     758      CALL get_field("VANCIEN",v_ancien,found)
     759      IF (.NOT. found) THEN
     760         PRINT*, "phyetat0: Le champ <VANCIEN> est absent"
     761         PRINT*, "Depart legerement fausse. Mais je continue"
     762         ancien_ok = .FALSE.
     763      ENDIF
    754764
    755765      clwcon=0.
    756       CALL get_field("CLWCON",clwcon(:,1),found)
     766      CALL get_field("CLWCON",clwcon,found)
    757767      IF (.NOT. found) THEN
    758768         PRINT*, "phyetat0: Le champ CLWCON est absent"
     
    766776c
    767777      rnebcon = 0.
    768       CALL get_field("RNEBCON",rnebcon(:,1),found)
     778      CALL get_field("RNEBCON",rnebcon,found)
    769779      IF (.NOT. found) THEN
    770780         PRINT*, "phyetat0: Le champ RNEBCON est absent"
     
    781791c
    782792      ratqs=0.
    783       CALL get_field("RATQS",ratqs(:,1),found)
     793      CALL get_field("RATQS",ratqs,found)
    784794      IF (.NOT. found) THEN
    785795         PRINT*, "phyetat0: Le champ <RATQS> est absent"
  • LMDZ5/branches/testing/libf/phylmd/phyredem.F

    r1458 r1665  
    267267     
    268268      CALL put_field("QANCIEN","QANCIEN",q_ancien)
    269      
     269
     270      CALL put_field("UANCIEN","",u_ancien)
     271
     272      CALL put_field("VANCIEN","",v_ancien)
     273
    270274      CALL put_field("RUGMER","Longueur de rugosite sur mer",
    271275     .               frugs(:,is_oce))
    272276     
    273       CALL put_field("CLWCON","Eau liquide convective",clwcon(:,1))
    274      
    275       CALL put_field("RNEBCON","Nebulosite convective",rnebcon(:,1))
    276      
    277       CALL put_field("RATQS", "Ratqs",ratqs(:,1))
     277      CALL put_field("CLWCON","Eau liquide convective",clwcon)
     278     
     279      CALL put_field("RNEBCON","Nebulosite convective",rnebcon)
     280     
     281      CALL put_field("RATQS", "Ratqs",ratqs)
    278282c
    279283c run_off_lic_0
  • LMDZ5/branches/testing/libf/phylmd/phys_output_mod.F90

    r1664 r1665  
    13181318          ! Couplage conv-CL
    13191319          IF (iflag_con.GE.3) THEN
    1320              IF (iflag_coupl>=1) THEN
    13211320                CALL histdef2d(iff,clef_stations(iff), &
    13221321                     o_ale_bl%flag,o_ale_bl%name, "ALE BL", "m2/s2")
    13231322                CALL histdef2d(iff,clef_stations(iff), &
    13241323                     o_alp_bl%flag,o_alp_bl%name, "ALP BL", "m2/s2")
    1325              ENDIF
    13261324          ENDIF !(iflag_con.GE.3)
    13271325
     
    14911489                CALL histdef2d(iff,clef_stations(iff), &
    14921490                     o_alp_wk%flag,o_alp_wk%name, "ALP WK", "m2/s2")
    1493                 CALL histdef2d(iff,clef_stations(iff), &
    1494                      o_ale%flag,o_ale%name, "ALE", "m2/s2")
    1495                 CALL histdef2d(iff,clef_stations(iff), &
    1496                      o_alp%flag,o_alp%name, "ALP", "W/m2")
    1497                 CALL histdef2d(iff,clef_stations(iff),o_cin%flag,o_cin%name, "Convective INhibition", "m2/s2")
    1498                 CALL histdef2d(iff,clef_stations(iff),o_wape%flag,o_WAPE%name, "WAPE", "m2/s2")
    14991491                CALL histdef2d(iff,clef_stations(iff),o_wake_h%flag,o_wake_h%name, "wake_h", "-")
    15001492                CALL histdef2d(iff,clef_stations(iff),o_wake_s%flag,o_wake_s%name, "wake_s", "-")
     
    15041496                CALL histdef3d(iff,clef_stations(iff),o_wake_deltaq%flag,o_wake_deltaq%name, "wake_deltaq", " ")
    15051497                CALL histdef3d(iff,clef_stations(iff),o_wake_omg%flag,o_wake_omg%name, "wake_omg", " ")
     1498                CALL histdef2d(iff,clef_stations(iff),o_wape%flag,o_WAPE%name, "WAPE", "m2/s2")
    15061499             ENDIF
     1500             CALL histdef2d(iff,clef_stations(iff), &
     1501                     o_ale%flag,o_ale%name, "ALE", "m2/s2")
     1502             CALL histdef2d(iff,clef_stations(iff), &
     1503                     o_alp%flag,o_alp%name, "ALP", "W/m2")
     1504             CALL histdef2d(iff,clef_stations(iff),o_cin%flag,o_cin%name, "Convective INhibition", "m2/s2")
    15071505             CALL histdef3d(iff,clef_stations(iff),o_Vprecip%flag,o_Vprecip%name, "precipitation vertical profile", "-")
    15081506             CALL histdef3d(iff,clef_stations(iff),o_ftd%flag,o_ftd%name, "tend temp due aux descentes precip", "-")
     
    18591857    if ( type == 'day'.or.type == 'days'.or.type == 'jours'.or.type == 'jour' ) timestep = ttt * dayseconde
    18601858    if ( type == 'mounths'.or.type == 'mth'.or.type == 'mois' ) then
    1861        write(lunout,*)'annee_ref,day_ref mon_len',annee_ref,day_ref,ioget_mon_len(annee_ref,day_ref)
     1859       write(lunout,*)'annee_ref,day_ref mon_len',annee_ref,day_ref,mth_len
    18621860       timestep = ttt * dayseconde * mth_len
    18631861    endif
  • LMDZ5/branches/testing/libf/phylmd/phys_output_write.h

    r1664 r1665  
    1       itau_w = itau_phy + itap
     1      itau_w = itau_phy + itap + start_time * day_step / iphysiq
    22
    33      DO iff=1,nfiles
     
    801801! Couplage convection-couche limite
    802802      IF (iflag_con.GE.3) THEN
    803       IF (iflag_coupl>=1) THEN
    804803       IF (o_ale_bl%flag(iff)<=lev_files(iff)) THEN
    805804       CALL histwrite_phy(nid_files(iff),clef_stations(iff),
     
    810809     $o_alp_bl%name,itau_w,alp_bl)
    811810       ENDIF
    812       ENDIF !iflag_coupl>=1
    813811      ENDIF !(iflag_con.GE.3)
    814812
     
    825823       ENDIF
    826824
    827        IF (o_ale%flag(iff)<=lev_files(iff)) THEN
    828        CALL histwrite_phy(nid_files(iff),clef_stations(iff),
    829      $o_ale%name,itau_w,ale)
    830        ENDIF
    831        IF (o_alp%flag(iff)<=lev_files(iff)) THEN
    832        CALL histwrite_phy(nid_files(iff),clef_stations(iff),
    833      $o_alp%name,itau_w,alp)
    834        ENDIF
    835        IF (o_cin%flag(iff)<=lev_files(iff)) THEN
    836        CALL histwrite_phy(nid_files(iff),clef_stations(iff),
    837      $o_cin%name,itau_w,cin)
    838        ENDIF
    839825       IF (o_wape%flag(iff)<=lev_files(iff)) THEN
    840826       CALL histwrite_phy(nid_files(iff),clef_stations(iff),
     
    883869      ENDIF ! iflag_wake>=1
    884870
     871       IF (o_ale%flag(iff)<=lev_files(iff)) THEN
     872       CALL histwrite_phy(nid_files(iff),clef_stations(iff),
     873     $o_ale%name,itau_w,ale)
     874       ENDIF
     875       IF (o_alp%flag(iff)<=lev_files(iff)) THEN
     876       CALL histwrite_phy(nid_files(iff),clef_stations(iff),
     877     $o_alp%name,itau_w,alp)
     878       ENDIF
     879       IF (o_cin%flag(iff)<=lev_files(iff)) THEN
     880       CALL histwrite_phy(nid_files(iff),clef_stations(iff),
     881     $o_cin%name,itau_w,cin)
     882       ENDIF
    885883        IF (o_Vprecip%flag(iff)<=lev_files(iff)) THEN
    886884       CALL histwrite_phy(nid_files(iff),clef_stations(iff),
  • LMDZ5/branches/testing/libf/phylmd/physiq.F

    r1664 r1665  
    614614      REAL dd_t(klon,klev),dd_q(klon,klev)
    615615
    616       real, save :: alp_bl_prescr=0.
    617       real, save :: ale_bl_prescr=0.
     616      real, save :: alp_bl_prescr=0.1
     617      real, save :: ale_bl_prescr=4.
    618618
    619619      real, save :: ale_max=1000.
     
    791791cIM
    792792      EXTERNAL haut2bas  !variables de haut en bas
    793       INTEGER lnblnk1
    794       EXTERNAL lnblnk1   !enleve les blancs a la fin d'une variable de type
    795                          !caracter
    796793      EXTERNAL ini_undefSTD  !initialise a 0 une variable a 1 niveau de pression
    797794      EXTERNAL undefSTD      !somme les valeurs definies d'1 var a 1 niveau de pression
     
    12201217      INTEGER :: nbtr_tmp ! Number of tracer inside concvl
    12211218      REAL, dimension(klon,klev) :: sh_in ! Specific humidity entering in phytrac
     1219      integer iostat
    12221220
    12231221cIM for NMC files
     
    14921490cCR:04.12.07: initialisations poches froides
    14931491c Controle de ALE et ALP pour la fermeture convective (jyg)
    1494           if (iflag_wake>=1) then
    1495             CALL ini_wake(0.,0.,it_wape_prescr,wape_prescr,fip_prescr
     1492         CALL ini_wake(0.,0.,it_wape_prescr,wape_prescr,fip_prescr
    14961493     s                  ,alp_bl_prescr, ale_bl_prescr)
    14971494c 11/09/06 rajout initialisation ALE et ALP du wake et PBL(YU)
    14981495c        print*,'apres ini_wake iflag_cldcon=', iflag_cldcon
    1499           endif
    15001496
    15011497        do i = 1,klon
     
    15081504      nCFMIP=npCFMIP
    15091505      OPEN(98,file='npCFMIP_param.data',status='old',
    1510      $          form='formatted',err=999)
     1506     $          form='formatted',iostat=iostat)
     1507            if (iostat == 0) then
    15111508      READ(98,*,end=998) nCFMIP
    15121509998   CONTINUE
     
    15401537     $tabijGCM, lonGCM, latGCM, iGCM, jGCM)
    15411538c
    1542 999      CONTINUE
     1539            else
     1540               ALLOCATE(tabijGCM(0))
     1541               ALLOCATE(lonGCM(0), latGCM(0))
     1542               ALLOCATE(iGCM(0), jGCM(0))
     1543            end if
    15431544         ENDIF !debut
    15441545 
     
    20412042c
    20422043
    2043       CALL pbl_surface(
    2044      e     dtime,     date0,     itap,    days_elapsed+1,
    2045      e     debut,     lafin,
    2046      e     rlon,      rlat,      rugoro,  rmu0,     
    2047      e     rain_fall, snow_fall, solsw,   sollw,   
    2048      e     t_seri,    q_seri,    u_seri,  v_seri,   
    2049      e     pplay,     paprs,     pctsrf,           
    2050      +     ftsol,     falb1,     falb2,   u10m,   v10m,
    2051      s     sollwdown, cdragh,    cdragm,  u1,    v1,
    2052      s     albsol1,   albsol2,   sens,    evap, 
    2053      s     zxtsol,    zxfluxlat, zt2m,    qsat2m,
    2054      s     d_t_vdf,   d_q_vdf,   d_u_vdf, d_v_vdf,
    2055      s     coefh,     coefm,     slab_wfbils,               
    2056      d     qsol,      zq2m,      s_pblh,  s_lcl,
    2057      d     s_capCL,   s_oliqCL,  s_cteiCL,s_pblT,
    2058      d     s_therm,   s_trmb1,   s_trmb2, s_trmb3,
    2059      d     zxrugs,    zu10m,     zv10m,   fder,
    2060      d     zxqsurf,   rh2m,      zxfluxu, zxfluxv,
    2061      d     frugs,     agesno,    fsollw,  fsolsw,
    2062      d     d_ts,      fevap,     fluxlat, t2m,
    2063      d     wfbils,    wfbilo,    fluxt,   fluxu,  fluxv,
    2064      -     dsens,     devap,     zxsnow,
    2065      -     zxfluxt,   zxfluxq,   q2m,     fluxq, pbl_tke )
     2044      if (iflag_pbl/=0) then
     2045
     2046        CALL pbl_surface(
     2047     e       dtime,     date0,     itap,    days_elapsed+1,
     2048     e       debut,     lafin,
     2049     e       rlon,      rlat,      rugoro,  rmu0,     
     2050     e       rain_fall, snow_fall, solsw,   sollw,   
     2051     e       t_seri,    q_seri,    u_seri,  v_seri,   
     2052     e       pplay,     paprs,     pctsrf,           
     2053     +       ftsol,     falb1,     falb2,   u10m,   v10m,
     2054     s       sollwdown, cdragh,    cdragm,  u1,    v1,
     2055     s       albsol1,   albsol2,   sens,    evap, 
     2056     s       zxtsol,    zxfluxlat, zt2m,    qsat2m,
     2057     s       d_t_vdf,   d_q_vdf,   d_u_vdf, d_v_vdf,
     2058     s       coefh,     coefm,     slab_wfbils,               
     2059     d       qsol,      zq2m,      s_pblh,  s_lcl,
     2060     d       s_capCL,   s_oliqCL,  s_cteiCL,s_pblT,
     2061     d       s_therm,   s_trmb1,   s_trmb2, s_trmb3,
     2062     d       zxrugs,    zu10m,     zv10m,   fder,
     2063     d       zxqsurf,   rh2m,      zxfluxu, zxfluxv,
     2064     d       frugs,     agesno,    fsollw,  fsolsw,
     2065     d       d_ts,      fevap,     fluxlat, t2m,
     2066     d       wfbils,    wfbilo,    fluxt,   fluxu,  fluxv,
     2067     -       dsens,     devap,     zxsnow,
     2068     -       zxfluxt,   zxfluxq,   q2m,     fluxq, pbl_tke )
    20662069
    20672070
    20682071!-----------------------------------------------------------------------------------------
    20692072! ajout des tendances de la diffusion turbulente
    2070       CALL add_phys_tend(d_u_vdf,d_v_vdf,d_t_vdf,d_q_vdf,dql0,'vdf')
     2073        CALL add_phys_tend(d_u_vdf,d_v_vdf,d_t_vdf,d_q_vdf,dql0,'vdf')
    20712074!-----------------------------------------------------------------------------------------
    20722075
    2073       if (mydebug) then
    2074         call writefield_phy('u_seri',u_seri,llm)
    2075         call writefield_phy('v_seri',v_seri,llm)
    2076         call writefield_phy('t_seri',t_seri,llm)
    2077         call writefield_phy('q_seri',q_seri,llm)
    2078       endif
    2079 
    2080 
    2081       IF (ip_ebil_phy.ge.2) THEN
    2082         ztit='after surface_main'
    2083         CALL diagetpq(airephy,ztit,ip_ebil_phy,2,2,dtime
     2076        if (mydebug) then
     2077          call writefield_phy('u_seri',u_seri,llm)
     2078          call writefield_phy('v_seri',v_seri,llm)
     2079          call writefield_phy('t_seri',t_seri,llm)
     2080          call writefield_phy('q_seri',q_seri,llm)
     2081        endif
     2082
     2083
     2084        IF (ip_ebil_phy.ge.2) THEN
     2085          ztit='after surface_main'
     2086          CALL diagetpq(airephy,ztit,ip_ebil_phy,2,2,dtime
    20842087     e      , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay
    20852088     s      , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec)
    2086          call diagphy(airephy,ztit,ip_ebil_phy
     2089          call diagphy(airephy,ztit,ip_ebil_phy
    20872090     e      , zero_v, zero_v, zero_v, zero_v, sens
    20882091     e      , evap  , zero_v, zero_v, ztsol
    20892092     e      , d_h_vcol, d_qt, d_ec
    20902093     s      , fs_bound, fq_bound )
    2091       END IF
     2094        END IF
     2095
     2096      ENDIF
    20922097
    20932098c =================================================================== c
     
    22392244cdans le thermique sinon
    22402245       if (iflag_coupl.eq.0) then
    2241           if (debut.and.prt_level.gt.9)
    2242      $                     WRITE(lunout,*)'ALE et ALP imposes'
    2243           do i = 1,klon
    2244 con ne couple que ale
    2245 c           ALE(i) = max(ale_wake(i),Ale_bl(i))
    2246             ALE(i) = max(ale_wake(i),ale_bl_prescr)
    2247 con ne couple que alp
    2248 c           ALP(i) = alp_wake(i) + Alp_bl(i)
    2249             ALP(i) = alp_wake(i) + alp_bl_prescr
    2250           enddo
     2246          if (debut.and.prt_level.gt.9)WRITE(lunout,*) 'ALE&ALP imposes'
     2247          Ale_bl(1:klon) = ale_bl_prescr
     2248          Alp_bl(1:klon) = alp_bl_prescr
    22512249       else
    22522250         IF(prt_level>9)WRITE(lunout,*)'ALE et ALP couples au thermique'
    2253 !         do i = 1,klon
    2254 !             ALE(i) = max(ale_wake(i),Ale_bl(i))
    2255 ! avant        ALP(i) = alp_wake(i) + Alp_bl(i)
    2256 !             ALP(i) = alp_wake(i) + Alp_bl(i) + alp_offset ! modif sb
    2257 !         write(20,*)'ALE',ALE(i),Ale_bl(i),ale_wake(i)
    2258 !         write(21,*)'ALP',ALP(i),Alp_bl(i),alp_wake(i)
    2259 !         enddo
     2251       endif
    22602252
    22612253!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    22642256! w si <0
    22652257!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     2258
    22662259       do i = 1,klon
    22672260          ALE(i) = max(ale_wake(i),Ale_bl(i))
     
    22762269          endif
    22772270       enddo
     2271
    22782272!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    22792273
    2280        endif
    22812274       do i=1,klon
    22822275          if (alp(i)>alp_max) then
     
    26342627c  ==============
    26352628
    2636 ! Dans le cas où on active les thermiques, on fait partir l'ajustement
     2629! Dans le cas o\`u on active les thermiques, on fait partir l'ajustement
    26372630! a partir du sommet des thermiques.
    26382631! Dans le cas contraire, on demarre au niveau 1.
     
    28212814! FH 22/09/2009
    28222815! La ligne ci-dessous faisait osciller le modele et donnait une solution
    2823 ! assymptotique bidon et dépendant fortement du pas de temps.
     2816! asymptotique bidon et d\'ependant fortement du pas de temps.
    28242817!        ratqs(:,:)=sqrt(ratqs(:,:)**2+ratqss(:,:)**2)
    28252818!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    35763569
    35773570       IF (ok_hines) then
    3578 
    35793571         CALL hines_gwd(klon,klev,dtime,paprs,pplay,
    35803572     i                  rlat,t_seri,u_seri,v_seri,
     
    35843576c  ajout des tendances
    35853577        CALL add_phys_tend(d_u_hin,d_v_hin,d_t_hin,dq0,dql0,'hin')
    3586 
    35873578      ENDIF
    3588 c
    3589 
    3590 c
    3591 cIM cf. FLott BEG
     3579
    35923580C STRESS NECESSAIRES: TOUTE LA PHYSIQUE
    35933581
     
    36143602cIM calcul composantes axiales du moment angulaire et couple des montagnes
    36153603c
    3616       IF (is_sequential) THEN
     3604      IF (is_sequential .and. ok_orodr) THEN
    36173605     
    36183606        CALL aaam_bud (27,klon,klev,jD_cur-jD_ref,jH_cur,
  • LMDZ5/branches/testing/libf/phylmd/phytrac.F90

    r1664 r1665  
    214214     SELECT CASE(type_trac)
    215215     CASE('lmdz')
    216         CALL traclmdz_init(pctsrf, ftsol, tr_seri, t_seri, pplay, sh, pdtphys, aerosol, lessivage)
     216        CALL traclmdz_init(pctsrf, xlat, xlon, ftsol, tr_seri, t_seri, pplay, sh, pdtphys, aerosol, lessivage)
    217217     CASE('inca')
    218218        source(:,:)=0.
  • LMDZ5/branches/testing/libf/phylmd/readaerosol.F90

    r1492 r1665  
    247247 
    248248       WRITE(lunout,*) 'reading variable ',TRIM(varname),' in file ', TRIM(fname)
    249        CALL check_err( nf90_open(TRIM(fname), NF90_NOWRITE, ncid) )
     249       CALL check_err( nf90_open(TRIM(fname), NF90_NOWRITE, ncid), "pb open "//trim(varname) )
    250250
    251251! Test for equal longitudes and latitudes in file and model
    252252!****************************************************************************************
    253253       ! Read and test longitudes
    254        CALL check_err( nf90_inq_varid(ncid, 'lon', varid) )
    255        CALL check_err( nf90_get_var(ncid, varid, lon_src(:)) )
     254       CALL check_err( nf90_inq_varid(ncid, 'lon', varid),"pb inq lon" )
     255       CALL check_err( nf90_get_var(ncid, varid, lon_src(:)),"pb get lon" )
    256256       
    257257       IF (maxval(ABS(lon_src - io_lon)) > 0.001) THEN
     
    264264
    265265       ! Read and test latitudes
    266        CALL check_err( nf90_inq_varid(ncid, 'lat', varid) )
    267        CALL check_err( nf90_get_var(ncid, varid, lat_src(:)) )
     266       CALL check_err( nf90_inq_varid(ncid, 'lat', varid),"pb inq lat" )
     267       CALL check_err( nf90_get_var(ncid, varid, lat_src(:)),"pb get lat" )
    268268
    269269       ! Invert source latitudes
     
    311311! 2) Find vertical dimension klev_src
    312312!****************************************************************************************
    313        CALL check_err( nf90_inquire_dimension(ncid, dimid, len = klev_src) )
     313       CALL check_err( nf90_inquire_dimension(ncid, dimid, len = klev_src),"pb inq dim for PRESNIVS or lev" )
    314314       
    315315     ! Allocate variables depending on the number of vertical levels
     
    330330!**************************************************************************************************
    331331       ierr = nf90_inq_dimid(ncid, 'TIME',dimid)
    332        CALL check_err( nf90_inquire_dimension(ncid, dimid, len = nbr_tsteps) )
     332       CALL check_err( nf90_inquire_dimension(ncid, dimid, len = nbr_tsteps),"pb inq dim TIME" )
    333333!       IF (nbr_tsteps /= 12 .AND. nbr_tsteps /= 14) THEN
    334334       IF (nbr_tsteps /= 12 ) THEN
     
    339339!****************************************************************************************
    340340          ! Get variable id
    341           CALL check_err( nf90_inq_varid(ncid, TRIM(varname), varid) )
     341          CALL check_err( nf90_inq_varid(ncid, TRIM(varname), varid),"pb inq var "//TRIM(varname) )
    342342         
    343343          ! Get the variable
    344           CALL check_err( nf90_get_var(ncid, varid, varyear(:,:,:,:)) )
     344          CALL check_err( nf90_get_var(ncid, varid, varyear(:,:,:,:)),"pb get var "//TRIM(varname) )
    345345         
    346346! ++) Read surface pression, 12 month in one variable
    347347!****************************************************************************************
    348348          ! Get variable id
    349           CALL check_err( nf90_inq_varid(ncid, "ps", varid) )
     349          CALL check_err( nf90_inq_varid(ncid, "ps", varid),"pb inq var ps" )
    350350          ! Get the variable
    351           CALL check_err( nf90_get_var(ncid, varid, psurf_glo2D) )
     351          CALL check_err( nf90_get_var(ncid, varid, psurf_glo2D),"pb get var ps" )
    352352         
    353353! ++) Read mass load, 12 month in one variable
    354354!****************************************************************************************
    355355          ! Get variable id
    356           CALL check_err( nf90_inq_varid(ncid, "load_"//TRIM(varname), varid) )
     356          CALL check_err( nf90_inq_varid(ncid, "load_"//TRIM(varname), varid) ,"pb inq var load_"//TRIM(varname))
    357357          ! Get the variable
    358           CALL check_err( nf90_get_var(ncid, varid, load_glo2D) )
     358          CALL check_err( nf90_get_var(ncid, varid, load_glo2D),"pb get var load_"//TRIM(varname) )
    359359         
    360360! ++) Read ap
    361361!****************************************************************************************
    362362          ! Get variable id
    363           CALL check_err( nf90_inq_varid(ncid, "ap", varid) )
     363          CALL check_err( nf90_inq_varid(ncid, "ap", varid),"pb inq var ap" )
    364364          ! Get the variable
    365           CALL check_err( nf90_get_var(ncid, varid, pt_ap) )
     365          CALL check_err( nf90_get_var(ncid, varid, pt_ap),"pb get var ap" )
    366366
    367367! ++) Read b
    368368!****************************************************************************************
    369369          ! Get variable id
    370           CALL check_err( nf90_inq_varid(ncid, "b", varid) )
     370          CALL check_err( nf90_inq_varid(ncid, "b", varid),"pb inq var b" )
    371371          ! Get the variable
    372           CALL check_err( nf90_get_var(ncid, varid, pt_b) )
     372          CALL check_err( nf90_get_var(ncid, varid, pt_b),"pb get var b" )
    373373
    374374! ++) Read p0 : reference pressure
    375375!****************************************************************************************
    376376          ! Get variable id
    377           CALL check_err( nf90_inq_varid(ncid, "p0", varid) )
     377          CALL check_err( nf90_inq_varid(ncid, "p0", varid),"pb inq var p0" )
    378378          ! Get the variable
    379           CALL check_err( nf90_get_var(ncid, varid, p0) )
     379          CALL check_err( nf90_get_var(ncid, varid, p0),"pb get var p0" )
    380380         
    381381
     
    412412             
    413413             ! Get variable id
    414              CALL check_err( nf90_inq_varid(ncid, TRIM(cvar), varid) )
     414             CALL check_err( nf90_inq_varid(ncid, TRIM(cvar), varid),"pb inq var "//TRIM(cvar) )
    415415             
    416416             ! Get the variable
    417              CALL check_err( nf90_get_var(ncid, varid, varmth) )
     417             CALL check_err( nf90_get_var(ncid, varid, varmth),"pb get var "//TRIM(cvar) )
    418418             
    419419             ! Store in variable for the whole year
     
    432432! 4) Close file 
    433433!****************************************************************************************
    434        CALL check_err( nf90_close(ncid) )
     434       CALL check_err( nf90_close(ncid),"pb in close" )
    435435     
    436436
     
    570570
    571571
    572   SUBROUTINE check_err(status)
     572  SUBROUTINE check_err(status,text)
    573573    USE netcdf
    574574    IMPLICIT NONE
     
    576576    INCLUDE "iniprint.h"
    577577    INTEGER, INTENT (IN) :: status
     578    CHARACTER(len=*), INTENT (IN), OPTIONAL :: text
    578579
    579580    IF (status /= NF90_NOERR) THEN
    580        WRITE(lunout,*) 'Error in get_aero_fromfile ',status
     581       WRITE(lunout,*) 'Error in get_aero_fromfile, netcdf error code = ',status
     582       IF (PRESENT(text)) THEN
     583          WRITE(lunout,*) 'Error in get_aero_fromfile : ',text
     584       END IF
    581585       CALL abort_gcm('get_aero_fromfile',trim(nf90_strerror(status)),1)
    582586    END IF
  • LMDZ5/branches/testing/libf/phylmd/readaerosol_interp.F90

    r1492 r1665  
    175175     ! Reading values corresponding to the closest year taking into count the choice of aer_type.
    176176     ! For aer_type=scenario interpolation between 2 data sets is done in readaerosol.
    177      ! If aer_type=mix1 or mix2, the run type and file name depends on the aerosol.
     177     ! If aer_type=mix1, mix2 or mix3, the run type and file name depends on the aerosol.
    178178     IF (aer_type=='preind' .OR. aer_type=='actuel' .OR. aer_type=='annuel' .OR. aer_type=='scenario') THEN
    179179        ! Standard case
     
    196196        ELSE
    197197           filename='aerosols'
     198           type='preind'
     199        END IF
     200     ELSE  IF (aer_type == 'mix3') THEN
     201        ! Special case using a mix of annual sulfate file and natrual aerosols
     202        IF (name_aero(id_aero) == 'SO4') THEN
     203           filename='aerosols'
     204           type='annuel'
     205        ELSE
     206           filename='aerosols'
    198207           type='preind'
    199208        END IF
  • LMDZ5/branches/testing/libf/phylmd/traclmdz_mod.F90

    r1454 r1665  
    8484
    8585
    86   SUBROUTINE traclmdz_init(pctsrf, ftsol, tr_seri, t_seri, pplay, sh, pdtphys, aerosol, lessivage)
     86  SUBROUTINE traclmdz_init(pctsrf, xlat, xlon, ftsol, tr_seri, t_seri, pplay, sh, pdtphys, aerosol, lessivage)
    8787    ! This subroutine allocates and initialize module variables and control variables.
    8888    ! Initialization of the tracers should be done here only for those not found in the restart file.
     
    9999! Input variables
    100100    REAL,DIMENSION(klon,nbsrf),INTENT(IN)     :: pctsrf ! Pourcentage de sol f(nature du sol)
     101    REAL,DIMENSION(klon),INTENT(IN)           :: xlat   ! latitudes en degres pour chaque point
     102    REAL,DIMENSION(klon),INTENT(IN)           :: xlon   ! longitudes en degres pour chaque point
    101103    REAL,DIMENSION(klon,nbsrf),INTENT(IN)     :: ftsol  ! Temperature du sol (surf)(Kelvin)
    102104    REAL,DIMENSION(klon,klev,nbtr),INTENT(INOUT) :: tr_seri! Concentration Traceur [U/KgA] 
  • LMDZ5/branches/testing/libf/phylmd/wrgradsfi.F

    r776 r1665  
    2323c   local
    2424
    25       integer lm,l,lnblnk
     25      integer lm,l
    2626
    2727
  • LMDZ5/branches/testing/libf/phylmd/write_bilKP_ave.h

    r776 r1665  
    99c Champs 2D:
    1010c
    11       itau_w = itau_phy + itap
     11      itau_w = itau_phy + itap + start_time * day_step / iphysiq
    1212c
    1313cym      CALL gr_fi_ecrit(klev, klon,iim,jjmp1, ue_lay,zx_tmp_3d)
  • LMDZ5/branches/testing/libf/phylmd/write_bilKP_ins.h

    r776 r1665  
    77      ndex3d = 0
    88c
    9       itau_w = itau_phy + itap
     9      itau_w = itau_phy + itap + start_time * day_step / iphysiq
    1010c
    1111c Champs 3D:
  • LMDZ5/branches/testing/libf/phylmd/write_histISCCP.h

    r1403 r1665  
    99       ndex3d = 0
    1010c
    11        itau_w = itau_phy + itap
     11       itau_w = itau_phy + itap + start_time * day_step / iphysiq
    1212c
    1313       IF(type_run.EQ."ENSP".OR.type_run.EQ."CLIM") THEN
  • LMDZ5/branches/testing/libf/phylmd/write_histREGDYN.h

    r776 r1665  
    88
    99      ndex3d = 0
    10       itau_w = itau_phy + itap
     10      itau_w = itau_phy + itap + start_time * day_step / iphysiq
    1111c
    1212       CALL histwrite(nid_regdyn,"hw1",itau_w,histoW(:,:,:,1),
  • LMDZ5/branches/testing/libf/phylmd/write_histdayNMC.h

    r1539 r1665  
    55c
    66       ndex3d = 0
    7        itau_w = itau_phy + itap
     7       itau_w = itau_phy + itap + start_time * day_step / iphysiq
    88ccc
    99c  Champs interpolles sur des niveaux de pression du NMC
  • LMDZ5/branches/testing/libf/phylmd/write_histday_seri.h

    r996 r1665  
    77c
    88      ndex2d = 0
    9       itau_w = itau_phy + itap
     9      itau_w = itau_phy + itap + start_time * day_step / iphysiq
    1010c
    1111c Champs 2D:
  • LMDZ5/branches/testing/libf/phylmd/write_histhf3d.h

    r776 r1665  
    77      ndex3d = 0
    88c
    9       itau_w = itau_phy + itap
     9      itau_w = itau_phy + itap + start_time * day_step / iphysiq
    1010c
    1111c Champs 3D:
  • LMDZ5/branches/testing/libf/phylmd/write_histhfNMC.h

    r1539 r1665  
    55c
    66       ndex3d = 0
    7        itau_w = itau_phy + itap
     7       itau_w = itau_phy + itap + start_time * day_step / iphysiq
    88ccc
    99c  Champs interpolles sur des niveaux de pression du NMC
  • LMDZ5/branches/testing/libf/phylmd/write_histmthNMC.h

    r1539 r1665  
    55c
    66       ndex3d = 0
    7        itau_w = itau_phy + itap
     7       itau_w = itau_phy + itap + start_time * day_step / iphysiq
    88ccc
    99c  Champs interpolles sur des niveaux de pression du NMC
  • LMDZ5/branches/testing/libf/phylmd/write_histrac.h

    r1664 r1665  
    55  IF (ecrit_tra > 0.) THEN
    66     
    7      itau_w = itau_phy + nstep
     7     itau_w = itau_phy + nstep + start_time * day_step / iphysiq
    88     
    99     CALL histwrite_phy(nid_tra,.FALSE.,"phis",itau_w,pphis)
  • LMDZ5/branches/testing/libf/phylmd/write_paramLMDZ_phy.h

    r1538 r1665  
    2727c
    2828      ndex2d = 0
    29       itau_w = itau_phy + itap
     29      itau_w = itau_phy + itap + start_time * day_step / iphysiq
    3030c
    3131c Variables globales
Note: See TracChangeset for help on using the changeset viewer.