Ignore:
Timestamp:
Feb 17, 2017, 7:32:49 PM (8 years ago)
Author:
idelkadi
Message:

Traitement des valeurs indefinies par XIOS et correction d'erreur pour le simulateur Modis

Location:
LMDZ5/trunk/libf/phylmd/cosp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/cosp/cosp_output_write_mod.F90

    r2760 r2794  
    1717   CONTAINS
    1818
    19   SUBROUTINE cosp_output_write(Nlevlmdz, Npoints, Ncolumns, itap, dtime, freq_COSP, &
     19  SUBROUTINE cosp_output_write(Nlevlmdz, Npoints, Ncolumns, itap, dtime, freq_COSP, missing_val, &
    2020                               cfg, gbx, vgrid, sglidar, sgradar, stlidar, stradar, &
    2121                               isccp, misr, modis)
     
    3232!!! Variables d'entree
    3333  integer               :: itap, Nlevlmdz, Ncolumns, Npoints
    34   real                  :: freq_COSP, dtime
     34  real                  :: freq_COSP, dtime, missing_val
    3535  type(cosp_config)     :: cfg     ! Control outputs
    3636  type(cosp_gridbox)    :: gbx     ! Gridbox information. Input for COSP
     
    9595     do ip = 1,Npoints
    9696     if(stlidar%lidarcld(ip,k).eq.R_UNDEF)then
    97       stlidar%lidarcld(ip,k)=Cosp_fill_value
     97      stlidar%lidarcld(ip,k)=missing_val
    9898     endif
    9999     enddo
     
    102102      do ip = 1,Npoints
    103103       if(stlidar%cfad_sr(ip,ii,k).eq.R_UNDEF)then
    104         stlidar%cfad_sr(ip,ii,k)=Cosp_fill_value
     104        stlidar%cfad_sr(ip,ii,k)=missing_val
    105105       endif
    106106      enddo
     
    111111   do k = 1,Nlevlmdz
    112112     if(sglidar%beta_mol(ip,k).eq.R_UNDEF)then
    113       sglidar%beta_mol(ip,k)=Cosp_fill_value
     113      sglidar%beta_mol(ip,k)=missing_val
    114114     endif
    115115
    116116     do ii= 1,Ncolumns
    117117       if(sglidar%beta_tot(ip,ii,k).eq.R_UNDEF)then
    118         sglidar%beta_tot(ip,ii,k)=Cosp_fill_value
     118        sglidar%beta_tot(ip,ii,k)=missing_val
    119119       endif
    120120     enddo
     
    126126    do ip = 1,Npoints
    127127     if(stlidar%cldlayer(ip,k).eq.R_UNDEF)then
    128       stlidar%cldlayer(ip,k)=Cosp_fill_value
     128       stlidar%cldlayer(ip,k)=missing_val
    129129     endif
    130130    enddo
     
    133133! AI 11 / 2015
    134134
    135    where(stlidar%parasolrefl == R_UNDEF) stlidar%parasolrefl = 0.0
    136    where(stlidar%lidarcldtmp == R_UNDEF) stlidar%lidarcldtmp = 0.0
    137    where(stlidar%cldlayerphase == R_UNDEF) stlidar%cldlayerphase = 0.0
    138    where(stlidar%lidarcldphase == R_UNDEF) stlidar%lidarcldphase = 0.0
    139    where(stlidar%lidarcldtmp == R_UNDEF) stlidar%lidarcldtmp = 0.0
     135   where(stlidar%parasolrefl == R_UNDEF) stlidar%parasolrefl = missing_val
     136   where(stlidar%lidarcldtmp == R_UNDEF) stlidar%lidarcldtmp = missing_val
     137   where(stlidar%cldlayerphase == R_UNDEF) stlidar%cldlayerphase = missing_val
     138   where(stlidar%lidarcldphase == R_UNDEF) stlidar%lidarcldphase = missing_val
     139   where(stlidar%lidarcldtmp == R_UNDEF) stlidar%lidarcldtmp = missing_val
    140140   
    141141
     
    207207 if (cfg%Llidar_sim .and. cfg%Lradar_sim) then
    208208   where(stradar%lidar_only_freq_cloud == R_UNDEF) &
    209                            stradar%lidar_only_freq_cloud = 0.0
     209                           stradar%lidar_only_freq_cloud = missing_val
    210210   CALL histwrite3d_cosp(o_clcalipso2,stradar%lidar_only_freq_cloud,nvert)
    211211   where(stradar%radar_lidar_tcc == R_UNDEF) &
    212                            stradar%radar_lidar_tcc = 0.0
     212                           stradar%radar_lidar_tcc = missing_val
    213213   CALL histwrite2d_cosp(o_cltlidarradar,stradar%radar_lidar_tcc)
    214214 endif
     
    219219   do ip = 1,Npoints
    220220    if(isccp%totalcldarea(ip).eq.R_UNDEF)then
    221       isccp%totalcldarea(ip)=Cosp_fill_value
     221      isccp%totalcldarea(ip)=missing_val
    222222    endif
    223223    if(isccp%meanptop(ip).eq.R_UNDEF)then
    224       isccp%meanptop(ip)=Cosp_fill_value
     224      isccp%meanptop(ip)=missing_val
    225225    endif
    226226    if(isccp%meantaucld(ip).eq.R_UNDEF)then
    227       isccp%meantaucld(ip)=Cosp_fill_value
     227      isccp%meantaucld(ip)=missing_val
    228228    endif
    229229    if(isccp%meanalbedocld(ip).eq.R_UNDEF)then
    230       isccp%meanalbedocld(ip)=Cosp_fill_value
     230     isccp%meanalbedocld(ip)=missing_val
    231231    endif
    232232    if(isccp%meantb(ip).eq.R_UNDEF)then
    233       isccp%meantb(ip)=Cosp_fill_value
     233     isccp%meantb(ip)=missing_val
    234234    endif
    235235    if(isccp%meantbclr(ip).eq.R_UNDEF)then
    236       isccp%meantbclr(ip)=Cosp_fill_value
     236       isccp%meantbclr(ip)=missing_val
    237237    endif
    238238
     
    240240     do ii=1,7
    241241     if(isccp%fq_isccp(ip,ii,k).eq.R_UNDEF)then
    242       isccp%fq_isccp(ip,ii,k)=Cosp_fill_value
     242      isccp%fq_isccp(ip,ii,k)=missing_val
    243243     endif
    244244     enddo
     
    247247    do ii=1,Ncolumns
    248248     if(isccp%boxtau(ip,ii).eq.R_UNDEF)then
    249        isccp%boxtau(ip,ii)=Cosp_fill_value
     249       isccp%boxtau(ip,ii)=missing_val
    250250     endif
    251251    enddo
     
    253253    do ii=1,Ncolumns
    254254     if(isccp%boxptop(ip,ii).eq.R_UNDEF)then
    255        isccp%boxptop(ip,ii)=Cosp_fill_value
     255      isccp%boxptop(ip,ii)=missing_val
    256256     endif
    257257    enddo
     
    278278       do k=1,MISR_N_CTH
    279279        if(misr%fq_MISR(ip,ii,k).eq.R_UNDEF)then
    280               misr%fq_MISR(ip,ii,k)=Cosp_fill_value
     280            misr%fq_MISR(ip,ii,k)=missing_val
    281281        endif
    282282       enddo
     
    294294  do ip=1,Npoints
    295295    if(modis%Cloud_Fraction_Low_Mean(ip).eq.R_UNDEF)then
    296        modis%Cloud_Fraction_Low_Mean(ip)=Cosp_fill_value
     296      modis%Cloud_Fraction_Low_Mean(ip)=missing_val
    297297    endif
    298298    if(modis%Cloud_Fraction_High_Mean(ip).eq.R_UNDEF)then
    299        modis%Cloud_Fraction_High_Mean(ip)=Cosp_fill_value
     299       modis%Cloud_Fraction_High_Mean(ip)=missing_val
    300300    endif
    301301    if(modis%Cloud_Fraction_Mid_Mean(ip).eq.R_UNDEF)then
    302        modis%Cloud_Fraction_Mid_Mean(ip)=Cosp_fill_value
     302       modis%Cloud_Fraction_Mid_Mean(ip)=missing_val
    303303    endif
    304304    if(modis%Cloud_Fraction_Total_Mean(ip).eq.R_UNDEF)then
    305        modis%Cloud_Fraction_Total_Mean(ip)=Cosp_fill_value
     305       modis%Cloud_Fraction_Total_Mean(ip)=missing_val
    306306    endif
    307307    if(modis%Cloud_Fraction_Water_Mean(ip).eq.R_UNDEF)then
    308        modis%Cloud_Fraction_Water_Mean(ip)=Cosp_fill_value
     308       modis%Cloud_Fraction_Water_Mean(ip)=missing_val
    309309    endif
    310310    if(modis%Cloud_Fraction_Ice_Mean(ip).eq.R_UNDEF)then
    311        modis%Cloud_Fraction_Ice_Mean(ip)=Cosp_fill_value
     311       modis%Cloud_Fraction_Ice_Mean(ip)=missing_val
    312312    endif
    313313    if(modis%Optical_Thickness_Total_Mean(ip).eq.R_UNDEF)then
    314        modis%Optical_Thickness_Total_Mean(ip)=Cosp_fill_value
     314       modis%Optical_Thickness_Total_Mean(ip)=missing_val
    315315    endif
    316316    if(modis%Optical_Thickness_Water_Mean(ip).eq.R_UNDEF)then
    317        modis%Optical_Thickness_Water_Mean(ip)=Cosp_fill_value
     317       modis%Optical_Thickness_Water_Mean(ip)=missing_val
    318318    endif
    319319    if(modis%Optical_Thickness_Ice_Mean(ip).eq.R_UNDEF)then
    320        modis%Optical_Thickness_Ice_Mean(ip)=Cosp_fill_value
     320       modis%Optical_Thickness_Ice_Mean(ip)=missing_val
    321321    endif
    322322    if(modis%Cloud_Particle_Size_Water_Mean(ip).eq.R_UNDEF)then
    323        modis%Cloud_Particle_Size_Water_Mean(ip)=Cosp_fill_value
     323       modis%Cloud_Particle_Size_Water_Mean(ip)=missing_val
    324324    endif
    325325    if(modis%Cloud_Particle_Size_Ice_Mean(ip).eq.R_UNDEF)then
    326        modis%Cloud_Particle_Size_Ice_Mean(ip)=Cosp_fill_value
     326       modis%Cloud_Particle_Size_Ice_Mean(ip)=missing_val
    327327    endif
    328328    if(modis%Cloud_Top_Pressure_Total_Mean(ip).eq.R_UNDEF)then
    329        modis%Cloud_Top_Pressure_Total_Mean(ip)=Cosp_fill_value
     329       modis%Cloud_Top_Pressure_Total_Mean(ip)=missing_val
    330330    endif
    331331    if(modis%Liquid_Water_Path_Mean(ip).eq.R_UNDEF)then
    332        modis%Liquid_Water_Path_Mean(ip)=Cosp_fill_value
     332       modis%Liquid_Water_Path_Mean(ip)=missing_val
    333333    endif
    334334    if(modis%Ice_Water_Path_Mean(ip).eq.R_UNDEF)then
    335        modis%Ice_Water_Path_Mean(ip)=Cosp_fill_value
     335       modis%Ice_Water_Path_Mean(ip)=missing_val
    336336    endif
    337337
    338338  enddo
     339
     340    where(modis%Optical_Thickness_Total_LogMean == R_UNDEF) &
     341          modis%Optical_Thickness_Total_LogMean = missing_val
     342           
     343 
     344    where(modis%Optical_Thickness_Water_LogMean == R_UNDEF) &
     345          modis%Optical_Thickness_Water_LogMean = missing_val
     346
     347    where(modis%Optical_Thickness_Ice_LogMean == R_UNDEF) &
     348          modis%Optical_Thickness_Ice_LogMean = missing_val
    339349   
    340350   CALL histwrite2d_cosp(o_cllmodis,modis%Cloud_Fraction_Low_Mean)
     
    360370       do k=1,7
    361371       if(modis%Optical_Thickness_vs_Cloud_Top_Pressure(ip,ii,k).eq.R_UNDEF)then
    362           modis%Optical_Thickness_vs_Cloud_Top_Pressure(ip,ii,k)=0.
     372          modis%Optical_Thickness_vs_Cloud_Top_Pressure(ip,ii,k)=missing_val
    363373        endif
    364374       enddo
     
    372382
    373383    where(modis%Optical_Thickness_vs_ReffIce == R_UNDEF) &
    374           modis%Optical_Thickness_vs_ReffIce = Cosp_fill_value
     384          modis%Optical_Thickness_vs_ReffIce = missing_val
    375385
    376386    where(modis%Optical_Thickness_vs_ReffLiq == R_UNDEF) &
    377           modis%Optical_Thickness_vs_ReffLiq = Cosp_fill_value
     387          modis%Optical_Thickness_vs_ReffLiq = missing_val
    378388
    379389    do icl=1,7
  • LMDZ5/trunk/libf/phylmd/cosp/modis_simulator.F90

    r2713 r2794  
    538538    Cloud_Fraction_Mid_Mean(1:nPoints)   = Cloud_Fraction_Mid_Mean(1:nPoints)  /nSubcols
    539539    Cloud_Fraction_Low_Mean(1:nPoints)   = Cloud_Fraction_Low_Mean(1:nPoints)  /nSubcols
     540    Cloud_Fraction_Total_Mean(1:nPoints)  = Cloud_Fraction_Total_Mean(1:nPoints) /nSubcols         
    540541
    541542    ! ########################################################################################
  • LMDZ5/trunk/libf/phylmd/cosp/phys_cosp.F90

    r2571 r2794  
    77  subroutine phys_cosp( itap,dtime,freq_cosp, &
    88                        ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, &
    9                         ecrit_mth,ecrit_day,ecrit_hf, ok_all_xml, &
     9                        ecrit_mth,ecrit_day,ecrit_hf, ok_all_xml, missing_val, &
    1010                        Nptslmdz,Nlevlmdz,lon,lat, presnivs,overlaplmdz,sunlit, &
    1111                        ref_liq,ref_ice,fracTerLic,u_wind,v_wind,phis,phi,ph,p,skt,t, &
     
    130130! Declaration necessaires pour les sorties IOIPSL
    131131  integer :: ii
    132   real    :: ecrit_day,ecrit_hf,ecrit_mth
     132  real    :: ecrit_day,ecrit_hf,ecrit_mth, missing_val
    133133  logical :: ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, ok_all_xml
    134134
     
    348348
    349349       print *, 'Calling write output'
    350         call cosp_output_write(Nlevlmdz, Npoints, Ncolumns, itap, dtime, freq_COSP, &
     350        call cosp_output_write(Nlevlmdz, Npoints, Ncolumns, itap, dtime, freq_COSP, missing_val, &
    351351                               cfg, gbx, vgrid, sglidar, sgradar, stlidar, stradar, &
    352352                               isccp, misr, modis)
Note: See TracChangeset for help on using the changeset viewer.