Changeset 1528 for LMDZ4


Ignore:
Timestamp:
May 26, 2011, 2:06:28 PM (14 years ago)
Author:
idelkadi
Message:

Les modificaions concerne la partie Lidar du simulateur COSP :

  1. Correction dans phys_cosp.F90 du bug sur le calcul des altitudes aux milieux et aux interfaces des couches
  2. Rajout du teste "Lidar parfait" (iflag_testlidar=.true. dans lidar_simulator.F90)
  3. Correction d'une erreur sur la dimension du tableau frac_out dans cosp_lidar.F90
  4. Sories sur les niveaux presnivs du modele dans le cas ou l'on desactive l'interpolation sur les 40 niveaux COSP
Location:
LMDZ4/branches/LMDZ4_AR5/libf
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/branches/LMDZ4_AR5/libf/cosp/cosp_lidar.F90

    r1279 r1528  
    6969      mr_cl(:,:) = sghydro%mr_hydro(:,i,:,I_CVCLIQ)
    7070      mr_ci(:,:) = sghydro%mr_hydro(:,i,:,I_CVCICE)
     71      frac_out(:,:) = sgx%frac_out(:,i,:)   
    7172      call lidar_simulator(sgx%Npoints, sgx%Nlevels, 4 &
    7273                 , PARASOL_NREFL, LIDAR_UNDEF  &
     
    7475                 , mr_ll, mr_li, mr_cl, mr_ci &
    7576                 , gbx%Reff(:,:,I_LSCLIQ), gbx%Reff(:,:,I_LSCICE), gbx%Reff(:,:,I_CVCLIQ), gbx%Reff(:,:,I_CVCICE) &
    76                  , sgx%frac_out, gbx%lidar_ice_type, y%beta_mol, beta_tot, tau_tot  &
     77                 , frac_out, gbx%lidar_ice_type, y%beta_mol, beta_tot, tau_tot  &
    7778                 , refle ) ! reflectance
    7879     
  • LMDZ4/branches/LMDZ4_AR5/libf/cosp/ini_histdayCOSP.h

    r1327 r1528  
    1818
    1919! Definition de l'axe vertical
     20       if (use_vgrid) then
    2021        CALL histvert(nid_day_cosp,"height","height","m",Nlevout,vgrid%z,nvert)
    21         print*,'Ok height Nlevout, height =',Nlevout,vgrid%z
     22       else
     23        CALL histvert(nid_day_cosp,"presnivs","Vertical levels","mb",Nlevout,presnivs,nvert)
     24       endif
     25
    2226        CALL histvert(nid_day_cosp,"height_mlev","height_mlev","m",Nlevlmdz,vgrid%mz,nvertm)
    23         print*,'Ok height_mlev Nlevout, height_mlev =',Nlevout,vgrid%mz
    24 !        CALL histvert(nid_day_cosp,"presnivs","Vertical levels","mb",Nlevout,presnivs,nvert)
    2527
    2628        CALL histvert(nid_day_cosp,"sza","solar_zenith_angle","degrees",PARASOL_NREFL,PARASOL_SZA,nvertp)
     
    2830        CALL histvert(nid_day_cosp,"pressure2","pressure","mb",7,ISCCP_PC,nvertisccp)
    2931
    30         CALL histvert(nid_day_cosp,"column","column","count",Ncolumns,column_ax,nvertcol)
     32        CALL histvert(nid_day_cosp,"column","column","count",Ncolumns,column_ax(1:Ncolumns),nvertcol)
    3133
    3234! Sorties LIDAR
  • LMDZ4/branches/LMDZ4_AR5/libf/cosp/ini_histhfCOSP.h

    r1327 r1528  
    1818
    1919! Definition de l'axe vertical
     20       if (use_vgrid) then
    2021        CALL histvert(nid_hf_cosp,"height","height","m",Nlevout,vgrid%z,nvert)
    21         print*,'Ok height Nlevout, height =',Nlevout,vgrid%z
     22       else
     23        CALL histvert(nid_hf_cosp,"presnivs","Vertical levels","mb",Nlevout,presnivs,nvert)
     24       endif
     25
    2226        CALL histvert(nid_hf_cosp,"height_mlev","height_mlev","m",Nlevlmdz,vgrid%mz,nvertm)
    23         print*,'Ok height_mlev Nlevout height_mlev =',Nlevout,vgrid%mz
    24 !        CALL histvert(nid_hf_cosp,"presnivs","Vertical levels","mb",Nlevout,presnivs,nvert)
    2527
    2628        CALL histvert(nid_hf_cosp,"sza","solar_zenith_angle","degrees",PARASOL_NREFL,PARASOL_SZA,nvertp)
     
    2830        CALL histvert(nid_hf_cosp,"pressure2","pressure","mb",7,ISCCP_PC,nvertisccp)
    2931
    30         CALL histvert(nid_hf_cosp,"column","column","count",Ncolumns,column_ax,nvertcol)
     32        CALL histvert(nid_hf_cosp,"column","column","count",Ncolumns,column_ax(1:Ncolumns),nvertcol)
    3133
    3234! Sorties LIDAR
  • LMDZ4/branches/LMDZ4_AR5/libf/cosp/ini_histmthCOSP.h

    r1327 r1528  
    1414        idayref = day_ref
    1515        CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian)
    16 
    1716        CALL histbeg_phy("histmthCOSP",itau_phy,zjulian,dtime,nhori,nid_mth_cosp)
    1817
    1918! Definition de l'axe vertical
     19        print*,'height_mlev=',vgrid%mz
     20       if (use_vgrid) then
    2021        CALL histvert(nid_mth_cosp,"height","height","m",Nlevout,vgrid%z,nvert)
     22       else
     23        CALL histvert(nid_mth_cosp,"presnivs","Vertical levels","Pa",Nlevout,presnivs,nvert,"down")
     24       endif
    2125        CALL histvert(nid_mth_cosp,"height_mlev","height_mlev","m",Nlevlmdz,vgrid%mz,nvertm)
    22 !        CALL histvert(nid_mth_cosp,"presnivs","Vertical levels","mb",Nlevout,presnivs,nvert)
    2326
    2427        CALL histvert(nid_mth_cosp,"sza","solar_zenith_angle","degrees",PARASOL_NREFL,PARASOL_SZA,nvertp)
     
    2629        CALL histvert(nid_mth_cosp,"pressure2","pressure","mb",7,ISCCP_PC,nvertisccp)
    2730
    28         CALL histvert(nid_mth_cosp,"column","column","count",Ncolumns,column_ax,nvertcol)
     31        CALL histvert(nid_mth_cosp,"column","column","count",Ncolumns,column_ax(1:Ncolumns),nvertcol)
    2932
    3033! Sorties LIDAR
     
    5962                     iim,jj_nb,nhori, Nlevout,1,Nlevout,nvert, 32, &
    6063                     "ave(X)", zout,zstomth)
     64!         CALL histdef(nid_mth_cosp, "zlev_m", &
     65!                     "Height at Midel model levels", "m", &
     66!                     iim,jj_nb,nhori, Nlevlmdz,1,Nlevlmdz,nvertm, 32, &
     67!                     "ave(X)", zout,zstomth)
     68!         CALL histdef(nid_mth_cosp, "zlev_b", &
     69!                     "Height at bottom model levels", "m", &
     70!                     iim,jj_nb,nhori, Nlevlmdz,1,Nlevlmdz,nvertm, 32, &
     71!                     "ave(X)", zout,zstomth)
    6172         endif
    6273           if (cfg%Lcfad_lidarsr532) then
  • LMDZ4/branches/LMDZ4_AR5/libf/cosp/lidar_simulator.F90

    r1279 r1528  
    179179      REAL tautot_S_liq(npoints),tautot_S_ice(npoints)     ! for liq and ice clouds
    180180
     181! Abderrahmane 8-2-2011
     182      Logical iflag_testlidar
     183      PARAMETER (iflag_testlidar=.false.)
    181184
    182185!------------------------------------------------------------
     
    384387      END DO
    385388
     389     if (iflag_testlidar) then
     390!+JLD test
     391!     do k=1,nlev
     392!      print*,'Min val de frac_out=',k,minval(frac_out(:,k))
     393!      print*,'Max val de frac_out=',k,maxval(frac_out(:,k))
     394!     enddo
     395       where ( frac_out(:,:).ge.0.5)
     396! Correction AI 9 5 11          pnorm(:,:) = pmol(:,:)*10.
     397       pnorm(:,:) = pmol(:,:)*50.
     398        elsewhere
     399          pnorm(:,:) = pmol(:,:)
     400        endwhere
     401!-JLD test
     402     endif
     403
    386404!-------- End computation Lidar --------------------------
    387405
  • LMDZ4/branches/LMDZ4_AR5/libf/cosp/phys_cosp.F90

    r1368 r1528  
    11! Simulateur COSP : Cfmip Observation Simulator Package
     2
    23! ISCCP, Radar (QuickBeam), Lidar et Parasol (ACTSIM), MISR, RTTOVS
    34!Idelkadi Abderrahmane Aout-Septembre 2009
    4 
    55
    66  subroutine phys_cosp( itap,dtime,freq_cosp, &
     
    88                        ecrit_mth,ecrit_day,ecrit_hf, &
    99                        Nptslmdz,Nlevlmdz,lon,lat, presnivs,overlaplmdz, &
    10                         ref_liq,ref_ice,fracTerLic,u_wind,v_wind,phi,ph,p,skt,t, &
     10                        ref_liq,ref_ice,fracTerLic,u_wind,v_wind,phis,phi,ph,p,skt,t, &
    1111                        sh,rh,tca,cca,mr_lsliq,mr_lsice,fl_lsrainI,fl_lssnowI, &
    1212                        fl_ccrainI,fl_ccsnowI,mr_ozone,dtau_s,dem_s)
     
    2525! u_wind,v_wind,                        !Vents a 10m ???
    2626! phi,                                  !Geopotentiel
     27! phis,                                  !Geopotentiel sol
    2728! ph,                                   !pression pour chaque inter-couche
    2829! p,                                    !Pression aux milieux des couches
     
    8586  integer, save :: isccp_topheight,isccp_topheight_direction,overlap
    8687  integer,save  :: Ncolumns     ! Number of subcolumns in SCOPS
    87   integer,parameter :: Ncollmdz=20
     88!  integer,parameter :: Ncollmdz=20
     89  integer,parameter :: Ncolmax=100
    8890  integer, save :: Npoints      ! Number of gridpoints
    8991!$OMP THREADPRIVATE(Npoints)
     
    126128!$OMP THREADPRIVATE(debut_cosp)
    127129  integer :: itau_wcosp
    128   character(len=10),dimension(Ncollmdz),parameter :: chcol=(/'c01','c02','c03','c04','c05','c06','c07','c08','c09','c10', &
    129                                                    'c11','c12','c13','c14','c15','c16','c17','c18','c19','c20'/)
    130   real,dimension(Ncollmdz) :: column_ax
     130  character(len=2) :: str2
     131  real,dimension(Ncolmax) :: column_ax
     132  character(len=10),save,dimension(Ncolmax) :: chcol
     133
    131134  integer, save :: Nlevout
    132135!$OMP THREADPRIVATE(Nlevout)
     
    137140!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Input variables from LMDZ-GCM
    138141  integer                         :: overlaplmdz   !  overlap type: 1=max, 2=rand, 3=max/rand ! cosp input (output lmdz)
    139 !  real,dimension(Npoints,Nlevels) :: height,phi,p,ph,T,sh,rh,tca,cca,mr_lsliq,mr_lsice,mr_ccliq,mr_ccice, &
    140142  real,dimension(Nptslmdz,Nlevlmdz) :: height,phi,p,ph,T,sh,rh,tca,cca,mr_lsliq,mr_lsice,mr_ccliq,mr_ccice, &
    141143                                     fl_lsrain,fl_lssnow,fl_ccrain,fl_ccsnow,fl_lsgrpl, &
    142                                      zlev,mr_ozone,radliq,radice,dtau_s,dem_s,ref_liq,ref_ice
     144                                     zlev,zlev_half,mr_ozone,radliq,radice,dtau_s,dem_s,ref_liq,ref_ice
    143145  real,dimension(Nptslmdz,Nlevlmdz) ::  fl_lsrainI,fl_lssnowI,fl_ccrainI,fl_ccsnowI
    144   real,dimension(Nptslmdz)        :: lon,lat,skt,fracTerLic,u_wind,v_wind
     146  real,dimension(Nptslmdz)        :: lon,lat,skt,fracTerLic,u_wind,v_wind,phis
    145147  real,dimension(Nlevlmdz)        :: presnivs
    146148  integer                         :: itap,k,ip
     
    165167 if (debut_cosp) then
    166168  NPoints=Nptslmdz
     169  Nlevels=Nlevlmdz
     170 
    167171! Lecture du namelist input
    168172  CALL read_cosp_input
    169173
     174  do ii=1,Ncolumns
     175    write(str2,'(i2.2)')ii
     176    chcol(ii)="c"//str2
     177    column_ax(ii) = real(ii)
     178  enddo
     179
    170180! Clefs Outputs
    171181  call read_cosp_output_nl(cosp_output_nl,cfg)
    172182
    173     if ( (Ncollmdz.ne.Ncolumns).or. (Nlevlmdz.ne.Nlevels) ) then
    174        print*,'Nb points Horiz, Vert, Sub-col passes par physiq.F = ', &
    175                Nptslmdz, Nlevlmdz, Ncollmdz
    176        print*,'Nb points Horiz, Vert, Sub-col lus dans namelist = ', &
    177                Npoints, Nlevels, Ncolumns
    178        print*,'Nb points Horiz, Vert, Sub-col passes par physiq.F est different de celui lu par namelist '
    179        call abort
    180     endif
    181    
    182183    if (overlaplmdz.ne.overlap) then
    183184       print*,'Attention overlaplmdz different de overlap lu dans namelist '
     
    221222        gbx%p = p !
    222223        gbx%ph = ph
    223         gbx%zlev_half = phi/9.81
    224 
    225        do k = 1, Nlevels-1
    226        do ip = 1, Npoints
    227         zlev(ip,k) = phi(ip,k)/9.81 + (phi(ip,k+1)-phi(ip,k))/9.81 * (ph(ip,k)-ph(ip,k+1))/p(ip,k)
    228        enddo
    229        enddo
    230        do ip = 1, Npoints
    231         zlev(ip,Nlevels) = zlev(ip,Nlevels-1)+ 2.*(phi(ip,Nlevels)/9.81-zlev(ip,Nlevels-1))
    232        END DO
    233         gbx%zlev = zlev
     224        gbx%zlev = phi/9.81
     225
     226        zlev_half(:,1) = phis(:)/9.81
     227        do k = 2, Nlevels
     228          do ip = 1, Npoints
     229           zlev_half(ip,k) = phi(ip,k)/9.81 + &
     230               (phi(ip,k)-phi(ip,k-1))/9.81 * (ph(ip,k)-p(ip,k)) / (p(ip,k)-p(ip,k-1))
     231          enddo
     232        enddo
     233        gbx%zlev_half = zlev_half
    234234
    235235        gbx%T = T
     
    275275        gbx%snow_cv = fl_ccsnow  !flux_convective_cloud_snow
    276276
    277 !Attention Teste
    278 !       do k = 1, Nlevels
    279 !        do ip = 1, Npoints
    280 !!     liquid particles :
    281 !         radliq(ip,k) = 12.0e-06
    282 !         if (k.le.3) radliq(ip,k) = 11.0e-06
    283 
    284 !    ice particles :
    285 !        if ( (t(ip,k)-273.15).gt.-81.4 ) then
    286 !          radice(ip,k) = (0.71*(t(ip,k)-273.15)+61.29)*1e-6
    287 !        else
    288 !          radice(ip,k) = 3.5*1e-6
    289 !        endif
    290 !       END DO
    291 !      END DO
    292 
    293 !      gbx%Reff(:,:,I_LSCLIQ) = radliq
    294 !      gbx%Reff(:,:,I_LSCICE) = radice
    295 !      gbx%Reff(:,:,I_CVCLIQ) = radliq
    296 !      gbx%Reff(:,:,I_CVCICE) = radice
    297 !      print*,'radliq(1,:)=',radliq(1,:)
    298 !      print*,'radice(1,:)=',radice(1,:)
    299 
    300277     gbx%Reff(:,:,I_LSCLIQ) = ref_liq*1e-6
    301278     gbx%Reff(:,:,I_LSCICE) = ref_ice*1e-6
    302279     gbx%Reff(:,:,I_CVCLIQ) = ref_liq*1e-6
    303280     gbx%Reff(:,:,I_CVCICE) = ref_ice*1e-6
    304 !     print*,'ref_liq(1,:)=',ref_liq(1,:)*1e-6
    305 !     print*,'ref_liq(1,:)=',ref_ice(1,:)*1e-6
    306281
    307282        ! ISCCP simulator
     
    338313     include "ini_histhfCOSP.h"
    339314 endif
    340 
    341 !   print*,'Fin Initialisation des sorties COSP, debut_cosp =',debut_cosp
    342 !   print*,'R_UNDEF=',R_UNDEF
    343315
    344316   debut_cosp=.false.
  • LMDZ4/branches/LMDZ4_AR5/libf/phylmd/physiq.F

    r1398 r1528  
    32463246     $                   ref_liq,ref_ice,
    32473247     $                   pctsrf(:,is_ter)+pctsrf(:,is_lic),
    3248      $                   zu10m,zv10m,
     3248     $                   zu10m,zv10m,pphis,
    32493249     $                   zphi,paprs(:,1:klev),pplay,zxtsol,t_seri,
    32503250     $                   qx(:,:,ivap),zx_rh,cldfra,rnebcon,flwc,fiwc,
Note: See TracChangeset for help on using the changeset viewer.