Ignore:
Timestamp:
Jul 22, 2024, 9:46:57 AM (4 months ago)
Author:
abarral
Message:

Revert cosp*/ from the trunk, as it's external code
Add missing bits from FCM2 source

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cosp2/cosp.F90

    r5086 r5095  
    402402
    403403    ! Set flag to deallocate rttov types (only done on final call to simulator)
    404     if (size(cospOUT%isccp_meantb) == stop_idx) lrttov_cleanUp = .true.
     404    if (size(cospOUT%isccp_meantb) .eq. stop_idx) lrttov_cleanUp = .true.   
    405405   
    406406    ! ISCCP column
     
    563563       modisIN%w0        => cospIN%ss_alb
    564564       modisIN%Nsunlit   = count(cospgridIN%sunlit > 0)
    565        if (modisIN%Nsunlit > 0) then
     565       if (modisIN%Nsunlit .gt. 0) then
    566566          allocate(modisIN%sunlit(modisIN%Nsunlit),modisIN%pres(modisIN%Nsunlit,cospIN%Nlevels+1))
    567567          modisIN%sunlit    = pack((/ (i, i = 1, Npoints ) /),mask = cospgridIN%sunlit > 0)
    568568          modisIN%pres      = cospgridIN%phalf(int(modisIN%sunlit(:)),:)
    569569       endif
    570        if (count(cospgridIN%sunlit <= 0) > 0) then
     570       if (count(cospgridIN%sunlit <= 0) .gt. 0) then
    571571          allocate(modisIN%notSunlit(count(cospgridIN%sunlit <= 0)))
    572572          modisIN%notSunlit = pack((/ (i, i = 1, Npoints ) /),mask = .not. cospgridIN%sunlit > 0)
     
    731731                                  modisRetrievedCloudTopPressure(i,:),                   &
    732732                                  modisRetrievedTau(i,:),modisRetrievedSize(i,:))
    733           END DO
     733          end do
    734734       endif
    735735    endif
     
    14501450  !         is turned off.
    14511451  !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1452   if (any(cospgridIN%sunlit < 0)) then
     1452  if (any(cospgridIN%sunlit .lt. 0)) then
    14531453     nError=nError+1
    14541454     errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%sunlit contains values out of range (0 or 1)'
     
    15131513          cospOUT%modis_Optical_Thickness_vs_ReffLIQ(:,:,:)            = R_UNDEF
    15141514  endif
    1515   if (any(cospgridIN%at < 0)) then
     1515  if (any(cospgridIN%at .lt. 0)) then   
    15161516       nError=nError+1
    15171517       errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%at contains values out of range (at<0), expected units (K)'
     
    15491549       if (associated(cospOUT%radar_lidar_tcc))       cospOUT%radar_lidar_tcc(:)           = R_UNDEF       
    15501550    endif
    1551     if (any(cospgridIN%pfull < 0)) then
     1551    if (any(cospgridIN%pfull .lt. 0)) then
    15521552       nError=nError+1
    15531553       errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%pfull contains values out of range'
     
    15661566       if (associated(cospOUT%isccp_fq))            cospOUT%isccp_fq(:,:,:)        = R_UNDEF     
    15671567    endif
    1568     if (any(cospgridIN%phalf < 0)) then
     1568    if (any(cospgridIN%phalf .lt. 0)) then
    15691569       nError=nError+1
    15701570       errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%phalf contains values out of range'
     
    16321632       if (associated(cospOUT%calipso_lidarcldtmp))   cospOUT%calipso_lidarcldtmp(:,:,:)   = R_UNDEF     
    16331633    endif
    1634     if (any(cospgridIN%qv < 0)) then
     1634    if (any(cospgridIN%qv .lt. 0)) then
    16351635       nError=nError+1
    16361636       errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%qv contains values out of range'
     
    16491649       if (associated(cospOUT%isccp_fq))            cospOUT%isccp_fq(:,:,:)        = R_UNDEF               
    16501650    endif
    1651     if (any(cospgridIN%hgt_matrix < -300)) then
     1651    if (any(cospgridIN%hgt_matrix .lt. -300)) then
    16521652       nError=nError+1
    16531653       errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%hgt_matrix contains values out of range'
     
    16741674       if (associated(cospOUT%radar_lidar_tcc))           cospOUT%radar_lidar_tcc(:)             = R_UNDEF       
    16751675    endif
    1676     if (any(cospgridIN%hgt_matrix_half < -300)) then
     1676    if (any(cospgridIN%hgt_matrix_half .lt. -300)) then
    16771677       nError=nError+1
    16781678       errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%hgt_matrix_half contains values out of range'
     
    16931693       if (associated(cospOUT%radar_lidar_tcc))       cospOUT%radar_lidar_tcc(:)           = R_UNDEF                 
    16941694    endif
    1695     if (any(cospgridIN%land < 0)) then
     1695    if (any(cospgridIN%land .lt. 0)) then
    16961696       nError=nError+1
    16971697       errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%land contains values out of range'
     
    17081708       if (associated(cospOUT%parasolGrid_refl))      cospOUT%parasolGrid_refl(:,:)        = R_UNDEF
    17091709    endif
    1710     if (any(cospgridIN%skt < 0)) then
     1710    if (any(cospgridIN%skt .lt. 0)) then
    17111711       nError=nError+1
    17121712       errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%skt contains values out of range'
     
    17271727
    17281728        ! RTTOV Inputs
    1729     if (cospgridIN%zenang < -90. .OR. cospgridIN%zenang > 90) then
     1729    if (cospgridIN%zenang .lt. -90. .OR. cospgridIN%zenang .gt. 90) then
    17301730       nError=nError+1
    17311731       errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%zenang contains values out of range'
     
    17331733       if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF       
    17341734    endif
    1735     if (cospgridIN%co2 < 0) then
     1735    if (cospgridIN%co2 .lt. 0) then
    17361736       nError=nError+1
    17371737       errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%co2 contains values out of range'
     
    17391739       if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF       
    17401740    endif
    1741     if (cospgridIN%ch4 < 0) then
     1741    if (cospgridIN%ch4 .lt. 0) then
    17421742       nError=nError+1
    17431743       errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%ch4 contains values out of range'
     
    17451745       if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF       
    17461746    endif
    1747     if (cospgridIN%n2o < 0) then
     1747    if (cospgridIN%n2o .lt. 0) then
    17481748       nError=nError+1
    17491749       errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%n2o contains values out of range'
     
    17511751       if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF       
    17521752    endif
    1753     if (cospgridIN%co< 0) then
     1753    if (cospgridIN%co.lt. 0) then
    17541754       nError=nError+1
    17551755       errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%co contains values out of range'
     
    17571757       if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF       
    17581758    endif
    1759     if (any(cospgridIN%o3 < 0)) then
     1759    if (any(cospgridIN%o3 .lt. 0)) then
    17601760       nError=nError+1
    17611761       errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%o3 contains values out of range'
     
    17631763       if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF       
    17641764    endif
    1765     if (any(cospgridIN%emis_sfc < 0. .OR. cospgridIN%emis_sfc > 1)) then
     1765    if (any(cospgridIN%emis_sfc .lt. 0. .OR. cospgridIN%emis_sfc .gt. 1)) then
    17661766       nError=nError+1
    17671767       errorMessage(nError) = 'ERROR: COSP input variable: cospgridIN%emis_sfc contains values out of range'
     
    17691769       if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF       
    17701770    endif
    1771     if (any(cospgridIN%u_sfc < -100. .OR. cospgridIN%u_sfc > 100.)) then
     1771    if (any(cospgridIN%u_sfc .lt. -100. .OR. cospgridIN%u_sfc .gt. 100.)) then
    17721772       nError=nError+1
    17731773       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%u_sfc contains values out of range'
     
    17751775       Lrttov_subcolumn = .false.
    17761776    endif
    1777     if (any(cospgridIN%v_sfc < -100. .OR. cospgridIN%v_sfc > 100.)) then
     1777    if (any(cospgridIN%v_sfc .lt. -100. .OR. cospgridIN%v_sfc .gt. 100.)) then
    17781778       nError=nError+1
    17791779       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%v_sfc contains values out of range'
     
    17811781       if (associated(cospOUT%rttov_tbs)) cospOUT%rttov_tbs(:,:) = R_UNDEF       
    17821782    endif
    1783     if (any(cospgridIN%lat < -90 .OR. cospgridIN%lat > 90)) then
     1783    if (any(cospgridIN%lat .lt. -90 .OR. cospgridIN%lat .gt. 90)) then
    17841784       nError=nError+1
    17851785       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%lat contains values out of range'
     
    17891789
    17901790    ! COSP_INPUTS
    1791     if (cospIN%emsfc_lw < 0. .OR. cospIN%emsfc_lw > 1.) then
     1791    if (cospIN%emsfc_lw .lt. 0. .OR. cospIN%emsfc_lw .gt. 1.) then
    17921792       nError=nError+1
    17931793       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%emsfc_lw contains values out of range'
     
    18051805       
    18061806    endif
    1807     if (any(cospIN%tau_067 < 0)) then
     1807    if (any(cospIN%tau_067 .lt. 0)) then
    18081808       nError=nError+1
    18091809       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%tau_067 contains values out of range'
     
    18701870       
    18711871    endif
    1872     if (any(cospIN%emiss_11 < 0. .OR. cospIN%emiss_11 > 1)) then
     1872    if (any(cospIN%emiss_11 .lt. 0. .OR. cospIN%emiss_11 .gt. 1)) then
    18731873       nError=nError+1
    18741874       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%emiss_11 contains values out of range'
     
    18861886         
    18871887    endif
    1888     if (any(cospIN%asym < -1. .OR. cospIN%asym > 1)) then
     1888    if (any(cospIN%asym .lt. -1. .OR. cospIN%asym .gt. 1)) then
    18891889       nError=nError+1
    18901890       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%asym contains values out of range'
     
    19321932            cospOUT%modis_Optical_Thickness_vs_ReffLIQ(:,:,:)            = R_UNDEF             
    19331933    endif
    1934     if (any(cospIN%ss_alb < 0 .OR. cospIN%ss_alb > 1)) then
     1934    if (any(cospIN%ss_alb .lt. 0 .OR. cospIN%ss_alb .gt. 1)) then
    19351935       nError=nError+1
    19361936       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%ss_alb contains values out of range'
     
    19781978            cospOUT%modis_Optical_Thickness_vs_ReffLIQ(:,:,:)            = R_UNDEF                 
    19791979    endif
    1980     if (any(cospIN%betatot < 0)) then
     1980    if (any(cospIN%betatot .lt. 0)) then
    19811981       nError=nError+1
    19821982       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%betatot contains values out of range'
     
    19911991       if (associated(cospOUT%calipso_srbval))        cospOUT%calipso_srbval(:)            = R_UNDEF
    19921992    endif
    1993     if (any(cospIN%betatot_liq < 0)) then
     1993    if (any(cospIN%betatot_liq .lt. 0)) then
    19941994       nError=nError+1
    19951995       errorMessage(nError) = ('ERROR: COSP input variable: cospIN%betatot_liq contains values out of range')
     
    20042004       if (associated(cospOUT%calipso_srbval))        cospOUT%calipso_srbval(:)            = R_UNDEF       
    20052005    endif
    2006     if (any(cospIN%betatot_ice < 0)) then
     2006    if (any(cospIN%betatot_ice .lt. 0)) then
    20072007       nError=nError+1
    20082008       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%betatot_ice contains values out of range'
     
    20172017       if (associated(cospOUT%calipso_srbval))        cospOUT%calipso_srbval(:)            = R_UNDEF
    20182018    endif
    2019     if (any(cospIN%beta_mol < 0)) then
     2019    if (any(cospIN%beta_mol .lt. 0)) then
    20202020       nError=nError+1
    20212021       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%beta_mol contains values out of range'
     
    20362036       if (associated(cospOUT%radar_lidar_tcc))       cospOUT%radar_lidar_tcc(:)           = R_UNDEF         
    20372037    endif   
    2038     if (any(cospIN%tautot < 0)) then
     2038    if (any(cospIN%tautot .lt. 0)) then
    20392039       nError=nError+1
    20402040       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%tautot contains values out of range'
     
    20492049       if (associated(cospOUT%calipso_srbval))        cospOUT%calipso_srbval(:)            = R_UNDEF     
    20502050    endif
    2051     if (any(cospIN%tautot_liq < 0)) then
     2051    if (any(cospIN%tautot_liq .lt. 0)) then
    20522052       nError=nError+1
    20532053       errorMessage(nError) = ('ERROR: COSP input variable: cospIN%tautot_liq contains values out of range')
     
    20622062       if (associated(cospOUT%calipso_srbval))        cospOUT%calipso_srbval(:)            = R_UNDEF       
    20632063    endif
    2064     if (any(cospIN%tautot_ice < 0)) then
     2064    if (any(cospIN%tautot_ice .lt. 0)) then
    20652065       nError=nError+1
    20662066       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%tautot_ice contains values out of range'
     
    20752075       if (associated(cospOUT%calipso_srbval))        cospOUT%calipso_srbval(:)            = R_UNDEF       
    20762076    endif
    2077     if (any(cospIN%tau_mol < 0)) then
     2077    if (any(cospIN%tau_mol .lt. 0)) then
    20782078       nError=nError+1
    20792079       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%tau_mol contains values out of range'
     
    20882088       if (associated(cospOUT%calipso_srbval))        cospOUT%calipso_srbval(:)            = R_UNDEF         
    20892089    endif   
    2090     if (any(cospIN%tautot_S_liq < 0)) then
     2090    if (any(cospIN%tautot_S_liq .lt. 0)) then
    20912091       nError=nError+1
    20922092       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%tautot_S_liq contains values out of range'
     
    20962096       if (associated(cospOUT%parasolGrid_refl)) cospOUT%parasolGrid_refl(:,:)  = R_UNDEF
    20972097    endif
    2098     if (any(cospIN%tautot_S_ice < 0)) then
     2098    if (any(cospIN%tautot_S_ice .lt. 0)) then
    20992099       nError=nError+1
    21002100       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%tautot_S_ice contains values out of range'
     
    21042104       if (associated(cospOUT%parasolGrid_refl)) cospOUT%parasolGrid_refl(:,:)  = R_UNDEF       
    21052105    endif   
    2106     if (any(cospIN%z_vol_cloudsat < 0)) then
     2106    if (any(cospIN%z_vol_cloudsat .lt. 0)) then
    21072107       nError=nError+1
    21082108       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%z_vol_cloudsat contains values out of range'
     
    21162116       if (associated(cospOUT%radar_lidar_tcc))           cospOUT%radar_lidar_tcc(:)             = R_UNDEF     
    21172117    endif
    2118     if (any(cospIN%kr_vol_cloudsat < 0)) then
     2118    if (any(cospIN%kr_vol_cloudsat .lt. 0)) then
    21192119       nError=nError+1
    21202120       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%kr_vol_cloudsat contains values out of range'
     
    21282128       if (associated(cospOUT%radar_lidar_tcc))           cospOUT%radar_lidar_tcc(:)             = R_UNDEF     
    21292129    endif   
    2130     if (any(cospIN%g_vol_cloudsat < 0)) then
     2130    if (any(cospIN%g_vol_cloudsat .lt. 0)) then
    21312131       nError=nError+1
    21322132       errorMessage(nError) = 'ERROR: COSP input variable: cospIN%g_vol_cloudsat contains values out of range'
     
    21452145  !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    21462146  ! ISCCP
    2147   if (size(cospIN%frac_out,1)  /= cospIN%Npoints .OR. &
    2148       size(cospIN%tau_067,1)   /= cospIN%Npoints .OR. &
    2149       size(cospIN%emiss_11,1)  /= cospIN%Npoints .OR. &
    2150       size(cospgridIN%skt)     /= cospIN%Npoints .OR. &
    2151       size(cospgridIN%qv,1)    /= cospIN%Npoints .OR. &
    2152       size(cospgridIN%at,1)    /= cospIN%Npoints .OR. &
    2153       size(cospgridIN%phalf,1) /= cospIN%Npoints .OR. &
    2154       size(cospgridIN%sunlit)  /= cospIN%Npoints .OR. &
    2155       size(cospgridIN%pfull,1) /= cospIN%Npoints) then
     2147  if (size(cospIN%frac_out,1)  .ne. cospIN%Npoints .OR. &
     2148      size(cospIN%tau_067,1)   .ne. cospIN%Npoints .OR. &
     2149      size(cospIN%emiss_11,1)  .ne. cospIN%Npoints .OR. &
     2150      size(cospgridIN%skt)     .ne. cospIN%Npoints .OR. &
     2151      size(cospgridIN%qv,1)    .ne. cospIN%Npoints .OR. &
     2152      size(cospgridIN%at,1)    .ne. cospIN%Npoints .OR. &
     2153      size(cospgridIN%phalf,1) .ne. cospIN%Npoints .OR. &
     2154      size(cospgridIN%sunlit)  .ne. cospIN%Npoints .OR. &
     2155      size(cospgridIN%pfull,1) .ne. cospIN%Npoints) then
    21562156      Lisccp_subcolumn = .false.
    21572157      Lisccp_column    = .false.
     
    21592159      errorMessage(nError) = 'ERROR(isccp_simulator): The number of points in the input fields are inconsistent'
    21602160  endif
    2161   if (size(cospIN%frac_out,2) /= cospIN%Ncolumns .OR. &
    2162       size(cospIN%tau_067,2)  /= cospIN%Ncolumns .OR. &
    2163       size(cospIN%emiss_11,2) /= cospIN%Ncolumns) then
     2161  if (size(cospIN%frac_out,2) .ne. cospIN%Ncolumns .OR. &
     2162      size(cospIN%tau_067,2)  .ne. cospIN%Ncolumns .OR. &
     2163      size(cospIN%emiss_11,2) .ne. cospIN%Ncolumns) then
    21642164      Lisccp_subcolumn = .false.
    21652165      Lisccp_column    = .false.
     
    21672167      errorMessage(nError) = 'ERROR(isccp_simulator): The number of sub-columns in the input fields are inconsistent'
    21682168  endif
    2169   if (size(cospIN%frac_out,3)  /= cospIN%Nlevels .OR. &
    2170       size(cospIN%tau_067,3)   /= cospIN%Nlevels .OR. &
    2171       size(cospIN%emiss_11,3)  /= cospIN%Nlevels .OR. &
    2172       size(cospgridIN%qv,2)    /= cospIN%Nlevels .OR. &
    2173       size(cospgridIN%at,2)    /= cospIN%Nlevels .OR. &
    2174       size(cospgridIN%pfull,2) /= cospIN%Nlevels .OR. &
    2175       size(cospgridIN%phalf,2) /= cospIN%Nlevels+1) then
     2169  if (size(cospIN%frac_out,3)  .ne. cospIN%Nlevels .OR. &
     2170      size(cospIN%tau_067,3)   .ne. cospIN%Nlevels .OR. &
     2171      size(cospIN%emiss_11,3)  .ne. cospIN%Nlevels .OR. &
     2172      size(cospgridIN%qv,2)    .ne. cospIN%Nlevels .OR. &
     2173      size(cospgridIN%at,2)    .ne. cospIN%Nlevels .OR. &
     2174      size(cospgridIN%pfull,2) .ne. cospIN%Nlevels .OR. &   
     2175      size(cospgridIN%phalf,2) .ne. cospIN%Nlevels+1) then
    21762176      Lisccp_subcolumn = .false.
    21772177      Lisccp_column    = .false.
     
    21812181     
    21822182  ! MISR
    2183   if (size(cospIN%tau_067,1)        /= cospIN%Npoints .OR. &
    2184       size(cospgridIN%sunlit)       /= cospIN%Npoints .OR. &
    2185       size(cospgridIN%hgt_matrix,1) /= cospIN%Npoints .OR. &
    2186       size(cospgridIN%at,1)         /= cospIN%Npoints) then
     2183  if (size(cospIN%tau_067,1)        .ne. cospIN%Npoints .OR. &
     2184      size(cospgridIN%sunlit)       .ne. cospIN%Npoints .OR. &
     2185      size(cospgridIN%hgt_matrix,1) .ne. cospIN%Npoints .OR. &
     2186      size(cospgridIN%at,1)         .ne. cospIN%Npoints) then
    21872187      Lmisr_subcolumn = .false.
    21882188      Lmisr_column    = .false.
     
    21902190      errorMessage(nError) = 'ERROR(misr_simulator): The number of points in the input fields are inconsistent'
    21912191  endif
    2192   if (size(cospIN%tau_067,2) /= cospIN%Ncolumns) then
     2192  if (size(cospIN%tau_067,2) .ne. cospIN%Ncolumns) then
    21932193      Lmisr_subcolumn = .false.
    21942194      Lmisr_column    = .false.
     
    21962196      errorMessage(nError) = 'ERROR(misr_simulator): The number of sub-columns in the input fields are inconsistent'
    21972197  endif
    2198   if (size(cospIN%tau_067,3)        /= cospIN%Nlevels .OR. &
    2199       size(cospgridIN%hgt_matrix,2) /= cospIN%Nlevels .OR. &
    2200       size(cospgridIN%at,2)         /= cospIN%Nlevels) then
     2198  if (size(cospIN%tau_067,3)        .ne. cospIN%Nlevels .OR. &
     2199      size(cospgridIN%hgt_matrix,2) .ne. cospIN%Nlevels .OR. &
     2200      size(cospgridIN%at,2)         .ne. cospIN%Nlevels) then
    22012201      Lmisr_subcolumn = .false.
    22022202      Lmisr_column    = .false.
     
    22062206
    22072207  ! MODIS
    2208   if (size(cospIN%fracLiq,1) /= cospIN%Npoints .OR. &
    2209       size(cospIN%tau_067,1) /= cospIN%Npoints .OR. &
    2210       size(cospIN%asym,1)    /= cospIN%Npoints .OR. &
    2211       size(cospIN%ss_alb,1)  /= cospIN%Npoints) then
     2208  if (size(cospIN%fracLiq,1) .ne. cospIN%Npoints .OR. &
     2209      size(cospIN%tau_067,1) .ne. cospIN%Npoints .OR. &
     2210      size(cospIN%asym,1)    .ne. cospIN%Npoints .OR. &
     2211      size(cospIN%ss_alb,1)  .ne. cospIN%Npoints) then
    22122212      Lmodis_subcolumn = .false.
    22132213      Lmodis_column    = .false.
     
    22152215      errorMessage(nError) = 'ERROR(modis_simulator): The number of points in the input fields are inconsistent'
    22162216  endif
    2217   if (size(cospIN%fracLiq,2) /= cospIN%Ncolumns .OR. &
    2218       size(cospIN%tau_067,2) /= cospIN%Ncolumns .OR. &
    2219       size(cospIN%asym,2)    /= cospIN%Ncolumns .OR. &
    2220       size(cospIN%ss_alb,2)  /= cospIN%Ncolumns) then
     2217  if (size(cospIN%fracLiq,2) .ne. cospIN%Ncolumns .OR. &
     2218      size(cospIN%tau_067,2) .ne. cospIN%Ncolumns .OR. &
     2219      size(cospIN%asym,2)    .ne. cospIN%Ncolumns .OR. &
     2220      size(cospIN%ss_alb,2)  .ne. cospIN%Ncolumns) then
    22212221      Lmodis_subcolumn = .false.
    22222222      Lmodis_column    = .false.
     
    22242224      errorMessage(nError) = 'ERROR(modis_simulator): The number of sub-columns in the input fields are inconsistent'
    22252225  endif       
    2226   if (size(cospIN%fracLiq,3) /= cospIN%Nlevels .OR. &
    2227       size(cospIN%tau_067,3) /= cospIN%Nlevels .OR. &
    2228       size(cospIN%asym,3)    /= cospIN%Nlevels .OR. &
    2229       size(cospIN%ss_alb,3)  /= cospIN%Nlevels) then
     2226  if (size(cospIN%fracLiq,3) .ne. cospIN%Nlevels .OR. &
     2227      size(cospIN%tau_067,3) .ne. cospIN%Nlevels .OR. &
     2228      size(cospIN%asym,3)    .ne. cospIN%Nlevels .OR. &
     2229      size(cospIN%ss_alb,3)  .ne. cospIN%Nlevels) then
    22302230      Lmodis_subcolumn = .false.
    22312231      Lmodis_column    = .false.
     
    22352235 
    22362236  ! CLOUDSAT   
    2237   if (size(cospIN%z_vol_cloudsat,1)   /= cospIN%Npoints .OR. &
    2238       size(cospIN%kr_vol_cloudsat,1)  /= cospIN%Npoints .OR. &
    2239       size(cospIN%g_vol_cloudsat,1)   /= cospIN%Npoints .OR. &
    2240       size(cospgridIN%hgt_matrix,1)   /= cospIN%Npoints) then
     2237  if (size(cospIN%z_vol_cloudsat,1)   .ne. cospIN%Npoints .OR. &
     2238      size(cospIN%kr_vol_cloudsat,1)  .ne. cospIN%Npoints .OR. &
     2239      size(cospIN%g_vol_cloudsat,1)   .ne. cospIN%Npoints .OR. &
     2240      size(cospgridIN%hgt_matrix,1)   .ne. cospIN%Npoints) then
    22412241      Lcloudsat_subcolumn = .false.
    22422242      Lcloudsat_column    = .false.
     
    22442244      errorMessage(nError) = 'ERROR(cloudsat_simulator): The number of points in the input fields are inconsistent'
    22452245  endif
    2246   if (size(cospIN%z_vol_cloudsat,2)  /= cospIN%Ncolumns .OR. &
    2247       size(cospIN%kr_vol_cloudsat,2) /= cospIN%Ncolumns .OR. &
    2248       size(cospIN%g_vol_cloudsat,2)  /= cospIN%Ncolumns) then
     2246  if (size(cospIN%z_vol_cloudsat,2)  .ne. cospIN%Ncolumns .OR. &
     2247      size(cospIN%kr_vol_cloudsat,2) .ne. cospIN%Ncolumns .OR. &
     2248      size(cospIN%g_vol_cloudsat,2)  .ne. cospIN%Ncolumns) then
    22492249      Lcloudsat_subcolumn = .false.
    22502250      Lcloudsat_column    = .false.
     
    22522252      errorMessage(nError) = 'ERROR(cloudsat_simulator): The number of sub-columns in the input fields are inconsistent'
    22532253  endif       
    2254   if (size(cospIN%z_vol_cloudsat,3)  /= cospIN%Nlevels .OR. &
    2255       size(cospIN%kr_vol_cloudsat,3) /= cospIN%Nlevels .OR. &
    2256       size(cospIN%g_vol_cloudsat,3)  /= cospIN%Nlevels .OR. &
    2257       size(cospgridIN%hgt_matrix,2)  /= cospIN%Nlevels) then
     2254  if (size(cospIN%z_vol_cloudsat,3)  .ne. cospIN%Nlevels .OR. &
     2255      size(cospIN%kr_vol_cloudsat,3) .ne. cospIN%Nlevels .OR. &
     2256      size(cospIN%g_vol_cloudsat,3)  .ne. cospIN%Nlevels .OR. &
     2257      size(cospgridIN%hgt_matrix,2)  .ne. cospIN%Nlevels) then
    22582258      Lcloudsat_subcolumn = .false.
    22592259      Lcloudsat_column    = .false.
     
    22632263
    22642264  ! CALIPSO
    2265   if (size(cospIN%beta_mol,1)    /= cospIN%Npoints .OR. &
    2266       size(cospIN%betatot,1)     /= cospIN%Npoints .OR. &
    2267       size(cospIN%betatot_liq,1) /= cospIN%Npoints .OR. &
    2268       size(cospIN%betatot_ice,1) /= cospIN%Npoints .OR. &
    2269       size(cospIN%tau_mol,1)     /= cospIN%Npoints .OR. &
    2270       size(cospIN%tautot,1)      /= cospIN%Npoints .OR. &
    2271       size(cospIN%tautot_liq,1)  /= cospIN%Npoints .OR. &
    2272       size(cospIN%tautot_ice,1)  /= cospIN%Npoints) then
     2265  if (size(cospIN%beta_mol,1)    .ne. cospIN%Npoints .OR. &
     2266      size(cospIN%betatot,1)     .ne. cospIN%Npoints .OR. &
     2267      size(cospIN%betatot_liq,1) .ne. cospIN%Npoints .OR. &
     2268      size(cospIN%betatot_ice,1) .ne. cospIN%Npoints .OR. &
     2269      size(cospIN%tau_mol,1)     .ne. cospIN%Npoints .OR. &
     2270      size(cospIN%tautot,1)      .ne. cospIN%Npoints .OR. &
     2271      size(cospIN%tautot_liq,1)  .ne. cospIN%Npoints .OR. &
     2272      size(cospIN%tautot_ice,1)  .ne. cospIN%Npoints) then
    22732273      Lcalipso_subcolumn = .false.
    22742274      Lcalipso_column    = .false.
     
    22762276      errorMessage(nError) = 'ERROR(calipso_simulator): The number of points in the input fields are inconsistent'
    22772277  endif         
    2278    if (size(cospIN%betatot,2)     /= cospIN%Ncolumns .OR. &
    2279        size(cospIN%betatot_liq,2) /= cospIN%Ncolumns .OR. &
    2280        size(cospIN%betatot_ice,2) /= cospIN%Ncolumns .OR. &
    2281        size(cospIN%tautot,2)      /= cospIN%Ncolumns .OR. &
    2282        size(cospIN%tautot_liq,2)  /= cospIN%Ncolumns .OR. &
    2283        size(cospIN%tautot_ice,2)  /= cospIN%Ncolumns) then
     2278   if (size(cospIN%betatot,2)     .ne. cospIN%Ncolumns .OR. &
     2279       size(cospIN%betatot_liq,2) .ne. cospIN%Ncolumns .OR. &
     2280       size(cospIN%betatot_ice,2) .ne. cospIN%Ncolumns .OR. &
     2281       size(cospIN%tautot,2)      .ne. cospIN%Ncolumns .OR. &
     2282       size(cospIN%tautot_liq,2)  .ne. cospIN%Ncolumns .OR. &
     2283       size(cospIN%tautot_ice,2)  .ne. cospIN%Ncolumns) then
    22842284       Lcalipso_subcolumn = .false.
    22852285       Lcalipso_column    = .false.
     
    22872287      errorMessage(nError) = 'ERROR(calipso_simulator): The number of sub-columns in the input fields are inconsistent'
    22882288  endif       
    2289   if (size(cospIN%beta_mol,2)    /= cospIN%Nlevels .OR. &
    2290       size(cospIN%betatot,3)     /= cospIN%Nlevels .OR. &
    2291       size(cospIN%betatot_liq,3) /= cospIN%Nlevels .OR. &
    2292       size(cospIN%betatot_ice,3) /= cospIN%Nlevels .OR. &
    2293       size(cospIN%tau_mol,2)     /= cospIN%Nlevels .OR. &
    2294       size(cospIN%tautot,3)      /= cospIN%Nlevels .OR. &
    2295       size(cospIN%tautot_liq,3)  /= cospIN%Nlevels .OR. &
    2296       size(cospIN%tautot_ice,3)  /= cospIN%Nlevels) then
     2289  if (size(cospIN%beta_mol,2)    .ne. cospIN%Nlevels .OR. &
     2290      size(cospIN%betatot,3)     .ne. cospIN%Nlevels .OR. &
     2291      size(cospIN%betatot_liq,3) .ne. cospIN%Nlevels .OR. &
     2292      size(cospIN%betatot_ice,3) .ne. cospIN%Nlevels .OR. &
     2293      size(cospIN%tau_mol,2)     .ne. cospIN%Nlevels .OR. &
     2294      size(cospIN%tautot,3)      .ne. cospIN%Nlevels .OR. &
     2295      size(cospIN%tautot_liq,3)  .ne. cospIN%Nlevels .OR. &
     2296      size(cospIN%tautot_ice,3)  .ne. cospIN%Nlevels) then
    22972297      Lcalipso_subcolumn = .false.
    22982298      Lcalipso_column    = .false.
     
    23022302 
    23032303  ! PARASOL
    2304   if (size(cospIN%tautot_S_liq,1) /= cospIN%Npoints .OR. &
    2305       size(cospIN%tautot_S_ice,1) /= cospIN%Npoints) then
     2304  if (size(cospIN%tautot_S_liq,1) .ne. cospIN%Npoints .OR. &
     2305      size(cospIN%tautot_S_ice,1) .ne. cospIN%Npoints) then
    23062306      Lparasol_subcolumn = .false.
    23072307      Lparasol_column    = .false.
     
    23092309      errorMessage(nError) = 'ERROR(parasol_simulator): The number of points in the input fields are inconsistent'
    23102310  endif
    2311   if (size(cospIN%tautot_S_liq,2) /= cospIN%Ncolumns .OR. &
    2312       size(cospIN%tautot_S_ice,2) /= cospIN%Ncolumns) then
     2311  if (size(cospIN%tautot_S_liq,2) .ne. cospIN%Ncolumns .OR. &
     2312      size(cospIN%tautot_S_ice,2) .ne. cospIN%Ncolumns) then
    23132313      Lparasol_subcolumn = .false.
    23142314      Lparasol_column    = .false.
     
    23182318 
    23192319  ! RTTOV
    2320   if (size(cospgridIN%pfull,1)           /= cospIN%Npoints .OR. &
    2321       size(cospgridIN%at,1)              /= cospIN%Npoints .OR. &
    2322       size(cospgridIN%qv,1)              /= cospIN%Npoints .OR. &
    2323       size(cospgridIN%hgt_matrix_half,1) /= cospIN%Npoints .OR. &
    2324       size(cospgridIN%u_sfc)             /= cospIN%Npoints .OR. &
    2325       size(cospgridIN%v_sfc)             /= cospIN%Npoints .OR. &
    2326       size(cospgridIN%skt)               /= cospIN%Npoints .OR. &
    2327       size(cospgridIN%phalf,1)           /= cospIN%Npoints .OR. &
    2328       size(cospgridIN%qv,1)              /= cospIN%Npoints .OR. &
    2329       size(cospgridIN%land)              /= cospIN%Npoints .OR. &
    2330       size(cospgridIN%lat)               /= cospIN%Npoints) then
     2320  if (size(cospgridIN%pfull,1)           .ne. cospIN%Npoints .OR. &
     2321      size(cospgridIN%at,1)              .ne. cospIN%Npoints .OR. &
     2322      size(cospgridIN%qv,1)              .ne. cospIN%Npoints .OR. &
     2323      size(cospgridIN%hgt_matrix_half,1) .ne. cospIN%Npoints .OR. &
     2324      size(cospgridIN%u_sfc)             .ne. cospIN%Npoints .OR. &
     2325      size(cospgridIN%v_sfc)             .ne. cospIN%Npoints .OR. &
     2326      size(cospgridIN%skt)               .ne. cospIN%Npoints .OR. &
     2327      size(cospgridIN%phalf,1)           .ne. cospIN%Npoints .OR. &
     2328      size(cospgridIN%qv,1)              .ne. cospIN%Npoints .OR. &
     2329      size(cospgridIN%land)              .ne. cospIN%Npoints .OR. &
     2330      size(cospgridIN%lat)               .ne. cospIN%Npoints) then
    23312331      Lrttov_subcolumn = .false.
    23322332      Lrttov_column    = .false.
     
    23342334      errorMessage(nError) = 'ERROR(rttov_simulator): The number of points in the input fields are inconsistent'
    23352335  endif     
    2336   if (size(cospgridIN%pfull,2)           /= cospIN%Nlevels   .OR. &
    2337       size(cospgridIN%at,2)              /= cospIN%Nlevels   .OR. &
    2338       size(cospgridIN%qv,2)              /= cospIN%Nlevels   .OR. &
    2339       size(cospgridIN%hgt_matrix_half,2) /= cospIN%Nlevels+1 .OR. &
    2340       size(cospgridIN%phalf,2)           /= cospIN%Nlevels+1 .OR. &
    2341       size(cospgridIN%qv,2)              /= cospIN%Nlevels) then
     2336  if (size(cospgridIN%pfull,2)           .ne. cospIN%Nlevels   .OR. &
     2337      size(cospgridIN%at,2)              .ne. cospIN%Nlevels   .OR. &
     2338      size(cospgridIN%qv,2)              .ne. cospIN%Nlevels   .OR. &
     2339      size(cospgridIN%hgt_matrix_half,2) .ne. cospIN%Nlevels+1 .OR. &
     2340      size(cospgridIN%phalf,2)           .ne. cospIN%Nlevels+1 .OR. &
     2341      size(cospgridIN%qv,2)              .ne. cospIN%Nlevels) then
    23422342      Lrttov_subcolumn = .false.
    23432343      Lrttov_column    = .false.
Note: See TracChangeset for help on using the changeset viewer.