Ignore:
Timestamp:
Jul 22, 2024, 9:29:09 PM (7 months ago)
Author:
abarral
Message:

Replace most uses of CPP_DUST by the corresponding logical defined in lmdz_cppkeys_wrapper.F90
Convert several files from .F to .f90 to allow Dust to compile w/o rrtm/ecrad
Create lmdz_yoerad.f90
(lint) Remove "!" on otherwise empty line

Location:
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2
Files:
35 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/MISR_simulator.F90

    r5095 r5099  
    22! Copyright (c) 2009, Roger Marchand, version 1.2
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History
    3030! May 2015 - D. Swales - Modified for COSPv2.0
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/array_lib.F90

    r3491 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History:
    3030! 10/16/03  John Haynes   - Original version (haynes@atmos.colostate.edu)
    3131! 01/31/06  John Haynes   - IDL to Fortran 90
    3232! 01/01/15  Dustin Swales - Modified for COSPv2.0
    33 !
     33
    3434! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    3535module array_lib
     
    4747    !   Finds the index of an array that is closest to a value, plus the
    4848    !   difference between the value found and the value specified
    49     !
     49
    5050    ! Inputs:
    5151    !   [list]   an array of sequential values
     
    5353    ! Optional input:
    5454    !   [sort]   set to 1 if [list] is in unknown/non-sequential order
    55     !
     55
    5656    ! Returns:
    5757    !   index of [list] that is closest to [val]
    58     !
     58
    5959    ! Optional output:
    6060    !   [dist]   set to variable containing [list([result])] - [val]
    61     !
     61
    6262    ! Requires:
    6363    !   mrgrnk library
    64     !
     64
    6565    ! ##########################################################################
    6666
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp.F90

    r5095 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History:
    3030! May 2015- D. Swales - Original version
    3131! Mar 2018- R. Guzman - Added OPAQ diagnostics and GLID simulator
    3232! Apr 2018- R. Guzman - Added ATLID simulator
    33 !
     33
    3434! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    3535
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_atlid_interface.F90

    r3491 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History
    3030! Apr 2018 - R. Guzman - Original version
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_calipso_interface.F90

    r3491 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History
    3030! May 2015 - D. Swales - Original version
     
    6969    ! derived from CALIPSO-GOCCP observations at 120m vertical grid
    7070    ! (Cesana and Chepfer, JGR, 2013).
    71     !
     71
    7272    ! Relationship between ATBice and ATBperp,ice for ice particles:
    7373    !                ATBperp,ice = Alpha*ATBice
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_cloudsat_interface.F90

    r3491 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History
    3030! May 2015 - D. Swales - Original version
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_config.F90

    r3723 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History:
    3030! Jul 2007 - A. Bodas-Salcedo - Initial version
     
    3939! Mar 2018 - R. Guzman        - Added LIDAR_NTYPE for the OPAQ diagnostics
    4040! Apr 2018 - R. Guzman        - Added parameters for GROUND LIDAR and ATLID simulators
    41 !
     41
    4242! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    4343
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_errorHandling.F90

    r3491 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History:
    3030! May 2015- D. Swales - Original version
    31 !
     31
    3232! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    3333
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_grLidar532_interface.F90

    r3491 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History
    3030! Apr 2018 - R. Guzman - Original version
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_isccp_interface.F90

    r3491 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History
    3030! May 2015 - D. Swales - Original version
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_kinds.F90

    r3491 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History:
    3030! May 2015- D. Swales - Original version
    31 !
     31
    3232! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    3333MODULE cosp_kinds
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_misr_interface.F90

    r3491 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History
    3030! May 2015 - D. Swales - Original version
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_modis_interface.F90

    r3491 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History
    3030! May 2015 - D. Swales - Original version
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_optics.F90

    r5095 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History:
    3030! 05/01/15  Dustin Swales - Original version
    3131! 04/04/18  Rodrigo Guzman- Added CALIOP-like Ground LIDar routines (GLID)
    3232! 10/04/18  Rodrigo Guzman- Added ATLID-like (EarthCare) lidar routines (ATLID)
    33 !
     33
    3434! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    3535module cosp_optics
     
    5050  ! ##########################################################################
    5151  !                          COSP_SIMULATOR_OPTICS
    52   !
     52
    5353  ! Used by: ISCCP, MISR and MODIS simulators
    5454  ! ##########################################################################
     
    107107  ! ##############################################################################
    108108  !                           MODIS_OPTICS_PARTITION
    109   !
     109
    110110  ! For the MODIS simulator, there are times when only a sinlge optical depth
    111111  ! profile, cloud-ice and cloud-water are provided. In this case, the optical
     
    154154  ! ########################################################################################
    155155  !                                   MODIS_OPTICS
    156   !
     156
    157157  ! ########################################################################################
    158158  subroutine modis_optics(nPoints,nLevels,nSubCols,tauLIQ,sizeLIQ,tauICE,sizeICE,fracLIQ, g, w0)
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_parasol_interface.F90

    r3491 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History
    3030! May 2015 - D. Swales - Original version
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_phys_constants.F90

    r3491 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History:
    3030! May 2015- D. Swales - Original version
    31 !
     31
    3232! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    3333MODULE cosp_phys_constants
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_stats.F90

    r5095 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History:
    3030! Jul 2007 - A. Bodas-Salcedo - Initial version
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_utils.F90

    r3723 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History:
    3030! Jul 2007 - A. Bodas-Salcedo - Initial version
    3131! May 2015 - Dustin Swales    - Modified for COSPv2.0
    32 !
     32
    3333! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    3434MODULE MOD_COSP_UTILS
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/icarus.F90

    r5095 r5099  
    22! Copyright (c) 2009, Lawrence Livemore National Security Limited Liability
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History
    3030! May 2015 - D. Swales - Modified for COSPv2.0
     
    251251       ! ############################################################################
    252252       !                        Clear-sky radiance calculation
    253        !       
     253
    254254       ! Compute water vapor continuum emissivity this treatment follows Schwarkzopf
    255255       ! and Ramasamy JGR 1999,vol 104, pages 9467-9499. The emissivity is calculated
     
    329329       ! ################################################################################# 
    330330       !                            Cloud-Top Temperature
    331        !
     331
    332332       ! Now that you have the top of atmosphere radiance, account for ISCCP
    333333       ! procedures to determine cloud top temperature account for partially
     
    392392    ! ####################################################################################
    393393    !                           Cloud-Top Pressure
    394     !
     394
    395395    ! The 2 methods differ according to whether or not you use the physical cloud
    396396    ! top pressure (isccp_top_height = 2) or the radiatively determined cloud top
     
    516516    ! ####################################################################################
    517517    !                 Determines ISCCP cloud type frequencies
    518     !
     518
    519519    ! Now that boxptop and boxtau have been determined, determine amount of each of the
    520520    ! 49 ISCCP cloud types. Also compute grid box mean cloud top pressure and
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lidar_simulator.F90

    r5095 r5099  
    22! Copyright (c) 2009, Centre National de la Recherche Scientifique
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History
    3030! May 2007: ActSim code of M. Chiriaco and H. Chepfer rewritten by S. Bony
    31 !
     31
    3232! May 2008, H. Chepfer:
    3333! - Units of pressure inputs: Pa
    3434! - Non Spherical particles : LS Ice NS coefficients, CONV Ice NS coefficients
    3535! - New input: ice_type (0=ice-spheres ; 1=ice-non-spherical)
    36 !
     36
    3737! June 2008, A. Bodas-Salcedo:
    3838! - Ported to Fortran 90 and optimisation changes
    39 !
     39
    4040! August 2008, J-L Dufresne:
    4141! - Optimisation changes (sum instructions suppressed)
    42 !
     42
    4343! October 2008, S. Bony,  H. Chepfer and J-L. Dufresne : 
    4444! - Interface with COSP v2.0:
     
    4747!      depolarisation diagnostic removed
    4848!      parasol (polder) reflectances (for 5 different solar zenith angles) added
    49 !
     49
    5050! December 2008, S. Bony,  H. Chepfer and J-L. Dufresne :
    5151! - Modification of the integration of the lidar equation.
    5252! - change the cloud detection threshold
    53 !
     53
    5454! April 2008, A. Bodas-Salcedo:
    5555! - Bug fix in computation of pmol and pnorm of upper layer
    56 !
     56
    5757! April 2008, J-L. Dufresne
    5858! - Bug fix in computation of pmol and pnorm, thanks to Masaki Satoh: a factor 2
    5959! was missing. This affects the ATB values but not the cloud fraction.
    60 !
     60
    6161! January 2013, G. Cesana and H. Chepfer:
    6262! - Add the perpendicular component of the backscattered signal (pnorm_perp_tot) in the arguments
     
    6565! Reference: Cesana G. and H. Chepfer (2013): Evaluation of the cloud water phase
    6666! in a climate model using CALIPSO-GOCCP, J. Geophys. Res., doi: 10.1002/jgrd.50376
    67 !
     67
    6868! May 2015 - D. Swales - Modified for COSPv2.0
    69 !
     69
    7070! Mar 2018 - R. Guzman - Added OPAQ subroutines
    7171! References OPAQ:
    72 !
     72
    7373!       Guzman et al. (2017): Direct atmosphere opacity observations from CALIPSO provide
    7474! new constraints on cloud-radiation interactions. JGR-Atmospheres, DOI: 10.1002/2016JD025946
     
    7676! the altitude at which a spaceborne lidar beam is fully attenuated. AMT, 10, 4659-4685,
    7777! https://doi.org/10.5194/amt-10-4659-2017
    78 !
     78
    7979! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    8080module mod_lidar_simulator
     
    9090  ! derived from CALIPSO-GOCCP observations at 120m vertical grid
    9191  ! (Cesana and Chepfer, JGR, 2013).
    92   !
     92
    9393  ! Relationship between ATBice and ATBperp,ice for ice particles:
    9494  !                ATBperp,ice = Alpha*ATBice
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_construct_destroy_mod.F90

    r3491 r5099  
    11!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2 !
     2
    33! Module pour construir et detruire les variables "cospIN", "cospstateIN" et "cospOUT"
    4 !
     4
    55!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    66
     
    118118  ! ######################################################################################
    119119  ! SUBROUTINE construct_cosp_outputs
    120   !
     120
    121121  ! This subroutine allocates output fields based on input logical flag switches.
    122122  ! ###################################################################################### 
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_interface.F90

    r5095 r5099  
    11!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2 !
     2
    33! Nouveau code d'interface entre LMDZ et COSPv2 (version 2)
    44! L'ancienne interface s'appelait "phys_cosp2" et avait ete concue pour COSPv1.4.
     
    99! Cette version de COSP propose aussi de nombreux nouveaux diagnostics, notamment pour
    1010! le simulateur lidar (diagnostics CALIPSO-OPAQ, lidar sol 532nm et lidar ATLID 355nm).
    11 !
     11
    1212! Interface reecrite par R.Guzman (01/2019), a partir de l'interface initiale concue
    1313! et ecrite par A.Idelkadi
    14 !
     14
    1515!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1616!  subroutine phys_cosp2( itap,dtime,freq_cosp, &
     
    8787
    8888!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    89 !
     89
    9090! Declaration des variables
    91 !
     91
    9292!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    9393
     
    211211
    212212!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    213 !
     213
    214214! 1) Lecture du fichier "cosp_input_nl.txt", parametres d'entree pour COSP
    215 !
     215
    216216!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    217217
     
    356356
    357357!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    358 !
     358
    359359! 3) Calculs des champs d'entree COSP a partir des variables LMDZ
    360 !
     360
    361361!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    362362
     
    427427
    428428!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    429 !
     429
    430430! 4a) On construit la variable cospOUT qui contient tous les diagnostics de sortie.
    431431! Elle sera remplie lors de l'appel du simulateur COSP
    432 !
     432
    433433!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    434434
     
    437437
    438438!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    439 !
     439
    440440! 4b) On construit la variable cospstateIN que l'on va remplir avec les champs LMDZ
    441441! Les champ verticaux doivent etre donnes a l'envers, c-a-d : (Nlevels:1) = (TOA:SFC)
    442 !
     442
    443443!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    444444
     
    463463
    464464!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    465 !
     465
    466466! 4c) On construit la variable cospIN qui contient les proprietes optiques subcolumn
    467467! pour COSP. Elle sera essentiellement remplie dans la subroutine subsample_and_optics
    468468! ou sont appeles SCOPS, PREC_SCOPS et les subroutines qui calculent les signaux
    469469! simules pour chaque simulateur actif.
    470 !
     470
    471471!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    472472
     
    477477
    478478!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    479 !
     479
    480480! 5) Appel de subsample_and_optics : Les champs verticaux doivent etre donnes a
    481481! l'envers comme pour le remplissage de cospstateIN, c-a-d : (Nlevels:1) = (TOA:SFC)
    482 !
     482
    483483!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    484484
     
    503503
    504504!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    505 !
     505
    506506! 6) On appelle le simulateur COSPv2
    507 !
     507
    508508!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    509509
     
    516516
    517517!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    518 !
     518
    519519! 7a) Ecriture des sorties 1: on cree d'abord les fichiers NCDF pour ecrire les sorties
    520520! en appelant lmdz_cosp_output_open (lors du premier appel de cette interface pour les
    521521! 2 options d'ecriture), ou sont definis les axes et les caracteristiques
    522522! des fichiers de sortie avec les diagnostics.
    523 !
     523
    524524!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    525525
     
    541541
    542542!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    543 !
     543
    544544! 7b) Ecriture des sorties 2: le remplissage des fichiers de sortie se fait a chaque
    545545! appel de cette interface avec une difference entre les 2 options d'ecriture:
    546 !
     546
    547547! AVEC xios, on commence a remplir les fichiers de sortie a partir du DEUXIEME
    548548! appel de cette interface (lorsque cosp_init_flag = 1).
    549 !
     549
    550550! SANS xios, on commence a remplir les fichiers de sortie a partir du PREMIER
    551551! appel de cette interface (lorsque cosp_init_flag = 1).
    552 !
     552
    553553!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    554554
     
    558558
    559559!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    560 !
     560
    561561! 8) On libere la memoire allouee lors de cet appel a l'interface
    562 !
     562
    563563!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    564564
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_output_mod.F90

    r5095 r5099  
    33!! La routine cosp_output_open (appelee 1 seule fois dans phy_cosp.F90) permet :
    44!! de creer les fichiers avec leurs grilles horizontales et verticales
    5 !
     5
    66! R.Guzman jan 2019 (mise a jour pour COSPv2)
    77! On change le nom du module a "lmdz_cosp_output_mod" et celui de la routine a "lmdz_cosp_output_open"
    88! pour qu'on sache qu'il s'agit d'un module specifique a l'implementation de COSP dans LMDZ
    9 !
     9
    1010!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1111  MODULE lmdz_cosp_output_mod
     
    347347!!! Variables d'entree
    348348
    349   ! ug Variables utilisées pour récupérer le calendrier pour xios
     349  ! ug Variables utilis�es pour r�cup�rer le calendrier pour xios
    350350  INTEGER :: x_an, x_mois, x_jour
    351351  REAL :: x_heure
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_output_write_mod.F90

    r5095 r5099  
    11!!!! Abderrahmane Idelkadi aout 2013 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    22! Module pour definir (au 1er appel) et ecrire les variables dans les fichiers de sortie cosp
    3 !
     3
    44! R.Guzman jan 2019 (mise a jour pour COSPv2)
    55! On change le nom du module a "lmdz_cosp_output_write_mod" et celui de la routine a "lmdz_cosp_output_write"
    66! pour qu on sache qu il s agit d un module specifique a l implementation de COSP dans LMDZ
    7 !
     7
    88!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    99   MODULE lmdz_cosp_output_write_mod
     
    669669    CHARACTER(LEN=20) :: typeecrit
    670670
    671     ! ug On récupère le type écrit de la structure:
    672     !       Assez moche, Ã|  refaire si meilleure méthode...
     671    ! ug On récupère le type écrit de la structure:
     672    !       Assez moche, �|  refaire si meilleure méthode...
    673673    IF (INDEX(var%cosp_typeecrit(iff), "once") > 0) THEN
    674674       typeecrit = 'once'
     
    765765      END IF
    766766
    767     ! ug On récupère le type écrit de la structure:
    768     !       Assez moche, Ã|  refaire si meilleure méthode...
     767    ! ug On récupère le type écrit de la structure:
     768    !       Assez moche, �|  refaire si meilleure méthode...
    769769    IF (INDEX(var%cosp_typeecrit(iff), "once") > 0) THEN
    770770       typeecrit = 'once'
     
    827827    IF (prt_level >= 9) WRITE(lunout,*)'Begin histrwrite2d ',var%name
    828828
    829   ! On regarde si on est dans la phase de définition ou d'écriture:
     829  ! On regarde si on est dans la phase de définition ou d'écriture:
    830830  IF(.NOT.cosp_varsdefined) THEN
    831831!$OMP MASTER
    832832      print*,'var, cosp_varsdefined dans cosp_varsdefined ',var%name, cosp_varsdefined
    833       !Si phase de définition.... on définit
     833      !Si phase de définition.... on définit
    834834      CALL conf_cospoutputs(var%name,var%cles)
    835835      DO iff=1, 3
     
    840840!$OMP END MASTER
    841841  ELSE
    842     !Et sinon on.... écrit
     842    !Et sinon on.... écrit
    843843    IF (SIZE(field)/=klon) &
    844844  CALL abort_physic('iophy::histwrite2d_cosp','Field first DIMENSION not equal to klon',1)
     
    921921               nom=var%name
    922922      END IF
    923   ! On regarde si on est dans la phase de définition ou d'écriture:
     923  ! On regarde si on est dans la phase de définition ou d'écriture:
    924924  IF(.NOT.cosp_varsdefined) THEN
    925       !Si phase de définition.... on définit
     925      !Si phase de définition.... on définit
    926926!$OMP MASTER
    927927      CALL conf_cospoutputs(var%name,var%cles)
     
    933933!$OMP END MASTER
    934934  ELSE
    935     !Et sinon on.... écrit
     935    !Et sinon on.... écrit
    936936    IF (SIZE(field,1)/=klon) &
    937937   CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)                                 
     
    10001000
    10011001  IF(cosp_varsdefined) THEN
    1002     !Et sinon on.... écrit
     1002    !Et sinon on.... écrit
    10031003    IF (SIZE(field,1)/=klon) &
    10041004   CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)           
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_subsample_and_optics_mod.F90

    r5095 r5099  
    11!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2 !
     2
    33! Module pour remplir la variable "cospIN", calculs des proprietes optiques subcolumn
    44! pour les differents simulateurs
    5 !
     5
    66!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    77
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/math_lib.F90

    r5095 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History:
    3030! July 2006: John Haynes      - Initial version
    3131! May 2015:  Dustin Swales    - Modified for COSPv2.0
    32 !
     32
    3333! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    3434module math_lib
     
    4949    !   evalues the integral (f ds) between f(index=i1) and f(index=i2)
    5050    !   using the AVINT procedure
    51     !
     51
    5252    ! Inputs:
    5353    !   [f]    functional values
     
    5555    !   [i1]   index of lower limit
    5656    !   [i2]   index of upper limit
    57     !
     57
    5858    ! Returns:
    5959    !   result of path integral
    60     !
     60
    6161    ! Notes:
    6262    !   [s] may be in forward or reverse numerical order
    63     !
     63
    6464    ! Requires:
    6565    !   mrgrnk package
    66     !
     66
    6767    ! Created:
    6868    !   02/02/06  John Haynes (haynes@atmos.colostate.edu)
     
    114114    ! Purpose:
    115115    !   estimate the integral of unevenly spaced data
    116     !
     116
    117117    ! Inputs:
    118118    !   [ftab]     functional values
     
    121121    !   [a]        lower limit of integration
    122122    !   [b]        upper limit of integration
    123     !
     123
    124124    ! Outputs:
    125125    !   [result]   approximate value of integral
    126     !
     126
    127127    ! Reference:
    128128    !   From SLATEC libraries, in public domain
    129     !
     129
    130130    !***********************************************************************
    131     !
     131
    132132    !  AVINT estimates the integral of unevenly spaced data.
    133     !
     133
    134134    !  Discussion:
    135     !
     135
    136136    !    The method uses overlapping parabolas and smoothing.
    137     !
     137
    138138    !  Modified:
    139     !
     139
    140140    !    30 October 2000
    141141    !    4 January 2008, A. Bodas-Salcedo. Error control for XTAB taken out of
    142142    !                    loop to allow vectorization.
    143     !
     143
    144144    !  Reference:
    145     !
     145
    146146    !    Philip Davis and Philip Rabinowitz,
    147147    !    Methods of Numerical Integration,
    148148    !    Blaisdell Publishing, 1967.
    149     !
     149
    150150    !    P E Hennion,
    151151    !    Algorithm 77,
     
    153153    !    Communications of the Association for Computing Machinery,
    154154    !    Volume 5, page 96, 1962.
    155     !
     155
    156156    !  Parameters:
    157     !
     157
    158158    !    Input, real ( kind = 8 ) FTAB(NTAB), the function values,
    159159    !    FTAB(I) = F(XTAB(I)).
    160     !
     160
    161161    !    Input, real ( kind = 8 ) XTAB(NTAB), the abscissas at which the
    162162    !    function values are given.  The XTAB's must be distinct
    163163    !    and in ascending order.
    164     !
     164
    165165    !    Input, integer NTAB, the number of entries in FTAB and
    166166    !    XTAB.  NTAB must be at least 3.
    167     !
     167
    168168    !    Input, real ( kind = 8 ) A, the lower limit of integration.  A should
    169169    !    be, but need not be, near one endpoint of the interval
    170170    !    (X(1), X(NTAB)).
    171     !
     171
    172172    !    Input, real ( kind = 8 ) B, the upper limit of integration.  B should
    173173    !    be, but need not be, near one endpoint of the interval
    174174    !    (X(1), X(NTAB)).
    175     !
     175
    176176    !    Output, real ( kind = 8 ) RESULT, the approximate value of the integral.
    177177    ! ########################################################################## 
     
    328328  ! Purpose:
    329329  !   Returns the gamma function
    330   !
     330
    331331  ! Input:
    332332  !   [x]   value to compute gamma function of
    333   !
     333
    334334  ! Returns:
    335335  !   gamma(x)
    336   !
     336
    337337  ! Coded:
    338338  !   02/02/06  John Haynes (haynes@atmos.colostate.edu)
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/mo_rng.F90

    r5095 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History:
    3030! May 2015- D. Swales - Original version
    31 !
     31
    3232! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    3333MODULE mod_rng
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/modis_simulator.F90

    r5095 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History
    3030! May 2009:      Robert Pincus - Initial version
     
    3737! May 2015:      Dustin Swales - Modified for COSPv2.0
    3838! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    39 !
     39
    4040! Notes on using the MODIS simulator:
    4141!  *) You may provide either layer-by-layer values of optical thickness at 0.67 and 2.1
     
    4848!     the MODIS retrieval libraries (parameters re_water_min, re_ice_min, etc.) the
    4949!     simulator returns missing values (re_fill)
    50 !
     50
    5151! When error conditions are encountered this code calls the function complain_and_die,
    5252! supplied at the bottom of this module. Users probably want to replace this with
    5353! something more graceful.
    54 !
     54
    5555module mod_modis_sim
    5656  USE MOD_COSP_CONFIG, only: R_UNDEF,modis_histTau,modis_histPres,numMODISTauBins,       &
     
    102102  ! ########################################################################################
    103103  ! MODIS simulator using specified liquid and ice optical thickness in each layer
    104   !
     104
    105105  ! Note: this simulator operates on all points; to match MODIS itself night-time
    106106  !       points should be excluded
    107   !
     107
    108108  ! Note: the simulator requires as input the optical thickness and cloud top pressure
    109109  !       derived from the ISCCP simulator run with parameter top_height = 1.
     
    443443        deltaX = tauLimit - totalTau
    444444        totalTau = totalTau + deltaX
    445         !
     445
    446446        ! Result for trapezoidal rule when you take less than a full step
    447447        !   tauIncrement is a layer-integrated value
    448         !
     448
    449449        totalProduct = totalProduct           &
    450450                     + pressure(i-1) * deltaX &
     
    534534   
    535535    if(diff(lowerBound) * diff(upperBound) < 0) then     
    536       !
     536
    537537      ! Interpolate the root position linearly if we bracket the root
    538       !
     538
    539539      interpolate_to_min = x(upperBound) - &
    540540                           diff(upperBound) * (x(upperBound) - x(lowerBound)) / (diff(upperBound) - diff(lowerBound))
     
    611611 
    612612  elemental function get_g_nir (phase, re)
    613     !
     613
    614614    ! Polynomial fit for asummetry parameter g in MODIS band 7 (near IR) as a function
    615615    !   of size for ice and water
    616616    ! Fits from Steve Platnick
    617     !
    618617
    619618    integer, intent(in) :: phase
     
    647646        real(wp),    intent(in) :: re
    648647        real(wp)                :: get_ssa_nir
    649         !
     648
    650649        ! Polynomial fit for single scattering albedo in MODIS band 7 (near IR) as a function
    651650        !   of size for ice and water
    652651        ! Fits from Steve Platnick
    653         !
     652
    654653        real(wp), dimension(4), parameter :: ice_coefficients   = (/ 0.9625, -1.8069e-2, 3.3281e-4,-2.2865e-6/)
    655654        real(wp), dimension(3), parameter :: water_coefficients = (/ 1.0044, -1.1397e-2, 1.3300e-4 /)
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/mrgrnk.F90

    r5095 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History:
    3030! May 2015:  Dustin Swales    - Modified for COSPv2.0
    31 !
     31
    3232! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    3333Module m_mrgrnk
     
    5656    ! __________________________________________________________
    5757    Real (wp) :: XVALA, XVALB
    58     !
     58
    5959    Integer, Dimension (SIZE(IRNGT)) :: JWRKT
    6060    Integer :: LMTNA, LMTNC, IRNG1, IRNG2
    6161    Integer :: NVAL, IIND, IWRKD, IWRK, IWRKF, JINDA, IINDA, IINDB
    62     !
     62
    6363    NVAL = Min (SIZE(XDONT), SIZE(IRNGT))
    6464    Select Case (NVAL)
     
    7171       Continue
    7272    End Select
    73     !
     73
    7474    ! Fill-in the index array, creating ordered couples
    75     !
     75
    7676    Do IIND = 2, NVAL, 2
    7777       If (XDONT(IIND-1) <= XDONT(IIND)) Then
     
    8686       IRNGT (NVAL) = NVAL
    8787    End If
    88     !
     88
    8989    ! We will now have ordered subsets A - B - A - B - ...
    9090    ! and merge A and B couples into C - C - ...
    91     !
     91
    9292    LMTNA = 2
    9393    LMTNC = 4
    94     !
     94
    9595    ! First iteration. The length of the ordered subsets goes from 2 to 4
    96     !
     96
    9797    Do
    9898       If (NVAL <= 2) Exit
    99        !
     99
    100100       ! Loop on merges of A and B into C
    101        !
     101
    102102       Do IWRKD = 0, NVAL - 1, 4
    103103          If ((IWRKD+4) > NVAL) Then
    104104             If ((IWRKD+2) >= NVAL) Exit
    105              !
     105
    106106             ! 1 2 3
    107              !
     107
    108108             If (XDONT(IRNGT(IWRKD+2)) <= XDONT(IRNGT(IWRKD+3))) Exit
    109              !
     109
    110110             ! 1 3 2
    111              !
     111
    112112             If (XDONT(IRNGT(IWRKD+1)) <= XDONT(IRNGT(IWRKD+3))) Then
    113113                IRNG2 = IRNGT (IWRKD+2)
    114114                IRNGT (IWRKD+2) = IRNGT (IWRKD+3)
    115115                IRNGT (IWRKD+3) = IRNG2
    116                 !
     116
    117117                ! 3 1 2
    118                 !
     118
    119119             Else
    120120                IRNG1 = IRNGT (IWRKD+1)
     
    125125             Exit
    126126          End If
    127           !
     127
    128128          ! 1 2 3 4
    129           !
     129
    130130          If (XDONT(IRNGT(IWRKD+2)) <= XDONT(IRNGT(IWRKD+3))) Cycle
    131           !
     131
    132132          ! 1 3 x x
    133           !
     133
    134134          If (XDONT(IRNGT(IWRKD+1)) <= XDONT(IRNGT(IWRKD+3))) Then
    135135             IRNG2 = IRNGT (IWRKD+2)
     
    143143                IRNGT (IWRKD+4) = IRNG2
    144144             End If
    145              !
     145
    146146             ! 3 x x x
    147              !
     147
    148148          Else
    149149             IRNG1 = IRNGT (IWRKD+1)
     
    168168          End If
    169169       End Do
    170        !
     170
    171171       ! The Cs become As and Bs
    172        !
     172
    173173       LMTNA = 4
    174174       Exit
    175175    End Do
    176     !
     176
    177177    ! Iteration loop. Each time, the length of the ordered subsets
    178178    ! is doubled.
    179     !
     179
    180180    Do
    181181       If (LMTNA >= NVAL) Exit
    182182       IWRKF = 0
    183183       LMTNC = 2 * LMTNC
    184        !
     184
    185185       ! Loop on merges of A and B into C
    186        !
     186
    187187       Do
    188188          IWRK = IWRKF
     
    196196          IINDA = 1
    197197          IINDB = JINDA + 1
    198           !
     198
    199199          ! Shortcut for the case when the max of A is smaller
    200200          ! than the min of B. This line may be activated when the
    201201          ! initial set is already close to sorted.
    202           !
     202
    203203          ! IF (XDONT(IRNGT(JINDA)) <= XDONT(IRNGT(IINDB))) CYCLE
    204           !
     204
    205205          ! One steps in the C subset, that we build in the final rank array
    206           !
     206
    207207          ! Make a copy of the rank array for the merge iteration
    208           !
     208
    209209          JWRKT (1:LMTNA) = IRNGT (IWRKD:JINDA)
    210           !
     210
    211211          XVALA = XDONT (JWRKT(IINDA))
    212212          XVALB = XDONT (IRNGT(IINDB))
    213           !
     213
    214214          Do
    215215             IWRK = IWRK + 1
    216              !
     216
    217217             ! We still have unprocessed values in both A and B
    218              !
     218
    219219             If (XVALA > XVALB) Then
    220220                IRNGT (IWRK) = IRNGT (IINDB)
     
    232232                XVALA = XDONT (JWRKT(IINDA))
    233233             End If
    234              !
     234
    235235          End Do
    236236       End Do
    237        !
     237
    238238       ! The Cs become As and Bs
    239        !
     239
    240240       LMTNA = 2 * LMTNA
    241241    End Do
    242     !
     242
    243243    Return
    244     !
     244
    245245  End Subroutine D_mrgrnk
    246246 
     
    256256    ! __________________________________________________________
    257257    Real(wp) :: XVALA, XVALB
    258     !
     258
    259259    Integer, Dimension (SIZE(IRNGT)) :: JWRKT
    260260    Integer :: LMTNA, LMTNC, IRNG1, IRNG2
    261261    Integer :: NVAL, IIND, IWRKD, IWRK, IWRKF, JINDA, IINDA, IINDB
    262     !
     262
    263263    NVAL = Min (SIZE(XDONT), SIZE(IRNGT))
    264264    Select Case (NVAL)
     
    271271       Continue
    272272    End Select
    273     !
     273
    274274    ! Fill-in the index array, creating ordered couples
    275     !
     275
    276276    Do IIND = 2, NVAL, 2
    277277       If (XDONT(IIND-1) <= XDONT(IIND)) Then
     
    286286       IRNGT (NVAL) = NVAL
    287287    End If
    288     !
     288
    289289    ! We will now have ordered subsets A - B - A - B - ...
    290290    ! and merge A and B couples into C - C - ...
    291     !
     291
    292292    LMTNA = 2
    293293    LMTNC = 4
    294     !
     294
    295295    ! First iteration. The length of the ordered subsets goes from 2 to 4
    296     !
     296
    297297    Do
    298298       If (NVAL <= 2) Exit
    299        !
     299
    300300       ! Loop on merges of A and B into C
    301        !
     301
    302302       Do IWRKD = 0, NVAL - 1, 4
    303303          If ((IWRKD+4) > NVAL) Then
    304304             If ((IWRKD+2) >= NVAL) Exit
    305              !
     305
    306306             ! 1 2 3
    307              !
     307
    308308             If (XDONT(IRNGT(IWRKD+2)) <= XDONT(IRNGT(IWRKD+3))) Exit
    309              !
     309
    310310             ! 1 3 2
    311              !
     311
    312312             If (XDONT(IRNGT(IWRKD+1)) <= XDONT(IRNGT(IWRKD+3))) Then
    313313                IRNG2 = IRNGT (IWRKD+2)
    314314                IRNGT (IWRKD+2) = IRNGT (IWRKD+3)
    315315                IRNGT (IWRKD+3) = IRNG2
    316                 !
     316
    317317                ! 3 1 2
    318                 !
     318
    319319             Else
    320320                IRNG1 = IRNGT (IWRKD+1)
     
    325325             Exit
    326326          End If
    327           !
     327
    328328          ! 1 2 3 4
    329           !
     329
    330330          If (XDONT(IRNGT(IWRKD+2)) <= XDONT(IRNGT(IWRKD+3))) Cycle
    331           !
     331
    332332          ! 1 3 x x
    333           !
     333
    334334          If (XDONT(IRNGT(IWRKD+1)) <= XDONT(IRNGT(IWRKD+3))) Then
    335335             IRNG2 = IRNGT (IWRKD+2)
     
    343343                IRNGT (IWRKD+4) = IRNG2
    344344             End If
    345              !
     345
    346346             ! 3 x x x
    347              !
     347
    348348          Else
    349349             IRNG1 = IRNGT (IWRKD+1)
     
    368368          End If
    369369       End Do
    370        !
     370
    371371       ! The Cs become As and Bs
    372        !
     372
    373373       LMTNA = 4
    374374       Exit
    375375    End Do
    376     !
     376
    377377    ! Iteration loop. Each time, the length of the ordered subsets
    378378    ! is doubled.
    379     !
     379
    380380    Do
    381381       If (LMTNA >= NVAL) Exit
    382382       IWRKF = 0
    383383       LMTNC = 2 * LMTNC
    384        !
     384
    385385       ! Loop on merges of A and B into C
    386        !
     386
    387387       Do
    388388          IWRK = IWRKF
     
    396396          IINDA = 1
    397397          IINDB = JINDA + 1
    398           !
     398
    399399          ! Shortcut for the case when the max of A is smaller
    400400          ! than the min of B. This line may be activated when the
    401401          ! initial set is already close to sorted.
    402           !
     402
    403403          ! IF (XDONT(IRNGT(JINDA)) <= XDONT(IRNGT(IINDB))) CYCLE
    404           !
     404
    405405          ! One steps in the C subset, that we build in the final rank array
    406           !
     406
    407407          ! Make a copy of the rank array for the merge iteration
    408           !
     408
    409409          JWRKT (1:LMTNA) = IRNGT (IWRKD:JINDA)
    410           !
     410
    411411          XVALA = XDONT (JWRKT(IINDA))
    412412          XVALB = XDONT (IRNGT(IINDB))
    413           !
     413
    414414          Do
    415415             IWRK = IWRK + 1
    416              !
     416
    417417             ! We still have unprocessed values in both A and B
    418              !
     418
    419419             If (XVALA > XVALB) Then
    420420                IRNGT (IWRK) = IRNGT (IINDB)
     
    432432                XVALA = XDONT (JWRKT(IINDA))
    433433             End If
    434              !
     434
    435435          End Do
    436436       End Do
    437        !
     437
    438438       ! The Cs become As and Bs
    439        !
     439
    440440       LMTNA = 2 * LMTNA
    441441    End Do
    442     !
     442
    443443    Return
    444     !
     444
    445445  End Subroutine R_mrgrnk
    446446  Subroutine I_mrgrnk (XDONT, IRNGT)
     
    455455    ! __________________________________________________________
    456456    Integer :: XVALA, XVALB
    457     !
     457
    458458    Integer, Dimension (SIZE(IRNGT)) :: JWRKT
    459459    Integer :: LMTNA, LMTNC, IRNG1, IRNG2
    460460    Integer :: NVAL, IIND, IWRKD, IWRK, IWRKF, JINDA, IINDA, IINDB
    461     !
     461
    462462    NVAL = Min (SIZE(XDONT), SIZE(IRNGT))
    463463    Select Case (NVAL)
     
    470470       Continue
    471471    End Select
    472     !
     472
    473473    ! Fill-in the index array, creating ordered couples
    474     !
     474
    475475    Do IIND = 2, NVAL, 2
    476476       If (XDONT(IIND-1) <= XDONT(IIND)) Then
     
    485485       IRNGT (NVAL) = NVAL
    486486    End If
    487     !
     487
    488488    ! We will now have ordered subsets A - B - A - B - ...
    489489    ! and merge A and B couples into C - C - ...
    490     !
     490
    491491    LMTNA = 2
    492492    LMTNC = 4
    493     !
     493
    494494    ! First iteration. The length of the ordered subsets goes from 2 to 4
    495     !
     495
    496496    Do
    497497       If (NVAL <= 2) Exit
    498        !
     498
    499499       ! Loop on merges of A and B into C
    500        !
     500
    501501       Do IWRKD = 0, NVAL - 1, 4
    502502          If ((IWRKD+4) > NVAL) Then
    503503             If ((IWRKD+2) >= NVAL) Exit
    504              !
     504
    505505             ! 1 2 3
    506              !
     506
    507507             If (XDONT(IRNGT(IWRKD+2)) <= XDONT(IRNGT(IWRKD+3))) Exit
    508              !
     508
    509509             ! 1 3 2
    510              !
     510
    511511             If (XDONT(IRNGT(IWRKD+1)) <= XDONT(IRNGT(IWRKD+3))) Then
    512512                IRNG2 = IRNGT (IWRKD+2)
    513513                IRNGT (IWRKD+2) = IRNGT (IWRKD+3)
    514514                IRNGT (IWRKD+3) = IRNG2
    515                 !
     515
    516516                ! 3 1 2
    517                 !
     517
    518518             Else
    519519                IRNG1 = IRNGT (IWRKD+1)
     
    524524             Exit
    525525          End If
    526           !
     526
    527527          ! 1 2 3 4
    528           !
     528
    529529          If (XDONT(IRNGT(IWRKD+2)) <= XDONT(IRNGT(IWRKD+3))) Cycle
    530           !
     530
    531531          ! 1 3 x x
    532           !
     532
    533533          If (XDONT(IRNGT(IWRKD+1)) <= XDONT(IRNGT(IWRKD+3))) Then
    534534             IRNG2 = IRNGT (IWRKD+2)
     
    542542                IRNGT (IWRKD+4) = IRNG2
    543543             End If
    544              !
     544
    545545             ! 3 x x x
    546              !
     546
    547547          Else
    548548             IRNG1 = IRNGT (IWRKD+1)
     
    567567          End If
    568568       End Do
    569        !
     569
    570570       ! The Cs become As and Bs
    571        !
     571
    572572       LMTNA = 4
    573573       Exit
    574574    End Do
    575     !
     575
    576576    ! Iteration loop. Each time, the length of the ordered subsets
    577577    ! is doubled.
    578     !
     578
    579579    Do
    580580       If (LMTNA >= NVAL) Exit
    581581       IWRKF = 0
    582582       LMTNC = 2 * LMTNC
    583        !
     583
    584584       ! Loop on merges of A and B into C
    585        !
     585
    586586       Do
    587587          IWRK = IWRKF
     
    595595          IINDA = 1
    596596          IINDB = JINDA + 1
    597           !
     597
    598598          ! Shortcut for the case when the max of A is smaller
    599599          ! than the min of B. This line may be activated when the
    600600          ! initial set is already close to sorted.
    601           !
     601
    602602          ! IF (XDONT(IRNGT(JINDA)) <= XDONT(IRNGT(IINDB))) CYCLE
    603           !
     603
    604604          ! One steps in the C subset, that we build in the final rank array
    605           !
     605
    606606          ! Make a copy of the rank array for the merge iteration
    607           !
     607
    608608          JWRKT (1:LMTNA) = IRNGT (IWRKD:JINDA)
    609           !
     609
    610610          XVALA = XDONT (JWRKT(IINDA))
    611611          XVALB = XDONT (IRNGT(IINDB))
    612           !
     612
    613613          Do
    614614             IWRK = IWRK + 1
    615              !
     615
    616616             ! We still have unprocessed values in both A and B
    617              !
     617
    618618             If (XVALA > XVALB) Then
    619619                IRNGT (IWRK) = IRNGT (IINDB)
     
    631631                XVALA = XDONT (JWRKT(IINDA))
    632632             End If
    633              !
     633
    634634          End Do
    635635       End Do
    636        !
     636
    637637       ! The Cs become As and Bs
    638        !
     638
    639639       LMTNA = 2 * LMTNA
    640640    End Do
    641     !
     641
    642642    Return
    643     !
     643
    644644  End Subroutine I_mrgrnk
    645645end module m_mrgrnk
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/optics_lib.F90

    r5095 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History:
    3030! July 2006: John Haynes      - Initial version
    3131! May 2015:  Dustin Swales    - Modified for COSPv2.0
    32 !
     32
    3333! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    3434module optics_lib
     
    4444  subroutine m_wat(freq, tk, n_r, n_i)
    4545    ! ############################################################################
    46     ! 
     46
    4747    ! Purpose:
    4848    !   compute complex index of refraction of liquid water
    49     !
     49
    5050    ! Inputs:
    5151    !   [freq]    frequency (GHz)
    5252    !   [tk]       temperature (K)
    53     !
     53
    5454    ! Outputs:
    5555    !   [n_r]     real part index of refraction
    5656    !   [n_i]     imaginary part index of refraction
    57     !
     57
    5858    ! Reference:
    5959    !   Based on the work of Ray (1972)
    60     !
     60
    6161    ! Coded:
    6262    !   03/22/05  John Haynes (haynes@atmos.colostate.edu)
     
    111111  subroutine m_ice(freq,t,n_r,n_i)
    112112    ! ##########################################################################
    113     !
     113
    114114    ! Purpose:
    115115    !   compute complex index of refraction of ice
    116     !
     116
    117117    ! Inputs:
    118118    !   [freq]    frequency (GHz)
    119119    !   [t]       temperature (K)
    120     !
     120
    121121    ! Outputs:
    122122    !   [n_r]     real part index of refraction
    123123    !   [n_i]     imaginary part index of refraction
    124     !
     124
    125125    ! Reference:
    126126    !    Fortran 90 port from IDL of REFICE by Stephen G. Warren
    127     !
     127
    128128    ! Modified:
    129129    !   05/31/05  John Haynes (haynes@atmos.colostate.edu)
     
    505505    ! Allowable wavelength range extends from 0.045 microns to 8.6 meter
    506506    ! temperature dependence only considered beyond 167 microns.
    507     !
     507
    508508    ! interpolation is done     n_r  vs. log(xlam)
    509509    !                           n_r  vs.        t
    510510    !                       log(n_i) vs. log(xlam)
    511511    !                       log(n_i) vs.        t
    512     !
     512
    513513    ! Stephen G. Warren - 1983
    514514    ! Dept. of Atmospheric Sciences
    515515    ! University of Washington
    516516    ! Seattle, Wa  98195
    517     !
     517
    518518    ! Based on
    519     !
     519
    520520    !    Warren,S.G.,1984.
    521521    !    Optical constants of ice from the ultraviolet to the microwave.
    522522    !    Applied Optics,23,1206-1225
    523     !
     523
    524524    ! Reference temperatures are -1.0,-5.0,-20.0, and -60.0 deg C
    525525    ! #####################################################################
     
    594594  Subroutine MieInt(Dx, SCm, Inp, Dqv, Dqxt, Dqsc, Dbsc, Dg, Xs1, Xs2, DPh, Error)
    595595    ! ##########################################################################
    596     !
     596
    597597    !     General purpose Mie scattering routine for single particles
    598598    !     Author: R Grainger 1990
     
    601601    !     code to ensure correct calculation of backscatter coeficient
    602602    !     Options/Extend_Source
    603     !
     603
    604604    ! ##########################################################################
    605605    ! INPUTS
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/parasol.F90

    r5095 r5099  
    22! Copyright (c) 2009, Centre National de la Recherche Scientifique
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History
    3030! December 2008, S. Bony,  H. Chepfer and J-L. Dufresne :
     
    4646    !          of cloud water and cloud fraction in each sub-column of each model
    4747    !          gridbox.
    48     !
    49     !
     48
     49
    5050    ! December 2008, S. Bony,  H. Chepfer and J-L. Dufresne :
    5151    ! - optimization for vectorization
    52     !
     52
    5353    ! Version 2.0 (October 2008)
    5454    ! Version 2.1 (December 2008)
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/prec_scops.F90

    r5095 r5099  
    22! Copyright (c) 2008, Lawrence Livermore National Security Limited Liability Corporation
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History:
    3030! May 2015- D. Swales - Modified for COSPv2.0
    31 !
     31
    3232! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    3333module mod_prec_scops
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/quickbeam.F90

    r5095 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History
    3030! 11/2005: John Haynes - Created
     
    3333! 01/2008  'Do while' to determine if hydrometeor(s) present in volume
    3434!           changed for vectorization purposes (A. Bodas-Salcedo)
    35 !
     35
    3636! 07/2010  V3.0 ... Modified to load or save scale factors to disk as a Look-Up Table (LUT)
    3737!  ... All hydrometeor and radar simulator properties now included in hp structure
     
    4040!     Also ... Support of Morrison 2-moment style microphyscis (Np_matrix) added
    4141!  ... Changes implement by Roj Marchand following work by Laura Fowler
    42 !
     42
    4343!   10/2011  Modified ngate loop to go in either direction depending on flag
    4444!     hp%radar_at_layer_one.  This affects the direction in which attenuation is summed.
    45 !
     45
    4646!     Also removed called to AVINT for gas and hydrometeor attenuation and replaced with simple
    4747!     summation. (Roger Marchand)
     
    315315  ! ######################################################################################
    316316  ! SUBROUTINE cloudsat_precipOccurence
    317   !
     317
    318318  ! Notes from July 2016: Add precip flag also looped over subcolumns
    319319  ! Modified by Tristan L'Ecuyer (TSL) to add precipitation flagging
     
    321321  ! To mimic the satellite algorithm, this code applies thresholds to non-attenuated
    322322  ! reflectivities, Ze_non, consistent with those outlined in Haynes et al, JGR (2009).
    323   !
     323
    324324  ! Procedures/Notes:
    325   !
     325
    326326  ! (1) If the 2-way attenuation exceeds 40 dB, the pixel will be flagged as 'heavy rain'
    327327  ! consistent with the multiple-scattering analysis of Battaglia et al, JGR (2008).
     
    334334  ! due to differening attenuation corrections from hydrometeors aloft, the non-attenuated
    335335  ! reflectivities used in the computation of this flag cannot vary across sub-columns.
    336   !
     336
    337337  ! radar_prec_flag = 1-Rain possible 2-Rain probable 3-Rain certain
    338338  !                   4-Snow possible 5-Snow certain
     
    340340  !                   8-Heavy Rain
    341341  !                   9- default value
    342   !
     342
    343343  ! Modified by Dustin Swales (University of Colorado) for use with COSP2.
    344344  ! *NOTE* All inputs (Ze_out, Ze_non_out, fracPrecipIce) are at a single level from the
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/quickbeam_optics.F90

    r5095 r5099  
    22! Copyright (c) 2015, Regents of the University of Colorado
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History:
    3030! May 2015:  Dustin Swales - Initial version
    31 !
     31
    3232! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    3333module mod_quickbeam_optics
     
    251251                         ! alternative is to comment out above two lines and use the following block
    252252                         ! MG Mie approach - adjust density of sphere with D = D_characteristic to match particle density
    253                          !
     253
    254254                         ! rcfg%rho_eff(tp,1:ns,iRe_type) = (6/pi)*sd%apm(tp)*(Di*1E-6)**(sd%bpm(tp)-3)   !MG Mie approach
    255255                         
     
    354354    ! Purpose:
    355355    !   Calculates Effective Radius (1/2 distribution 3rd moment / 2nd moment).
    356     !
     356
    357357    !   For some distribution types, the total number concentration (per kg), Np
    358358    !   may be optionally specified.   Should be set to zero, otherwise.
    359     !
     359
    360360    !   Roj Marchand July 2010
    361     !
     361
    362362    ! Inputs:
    363     !
     363
    364364    !   [Q]        hydrometeor mixing ratio (g/kg)  ! not needed for some distribution types
    365365    !   [Np]       Optional Total number concentration (per kg).  0 = use defaults (p1, p2, p3)
    366366    !   [rho_a]    ambient air density (kg m^-3)   
    367     !
     367
    368368    !   Distribution parameters as per quickbeam documentation.
    369369    !   [dtype]    distribution type
     
    371371    !   [bmp]      b params for mass
    372372    !   [p1],[p2],[p3]  distribution parameters
    373     !
     373
    374374    ! Outputs:
    375375    !   [Re]       Effective radius, 1/2 the 3rd moment/2nd moment (um)
    376     !
     376
    377377    ! Created:
    378378    !   July 2010  Roj Marchand
    379379    ! Modified:
    380380    !   12/18/14  Dustin Swales: Define type REALs as double precision (dustin.swales@noaa.gov)
    381     !
     381
    382382    ! ##############################################################################################
    383383    ! ##############################################################################################
     
    549549    ! Purpose:
    550550    !   Create a discrete drop size distribution
    551     !
     551
    552552    !   Starting with Quickbeam V3, this routine now allows input of
    553553    !   both effective radius (Re) and total number concentration (Nt)
    554554    !   Roj Marchand July 2010
    555     !
     555
    556556    !   The version in Quickbeam v.104 was modified to allow Re but not Nt
    557557    !   This is a significantly modified form for the version     
    558     !
     558
    559559    !   Originally Part of QuickBeam v1.03 by John Haynes
    560560    !   http://reef.atmos.colostate.edu/haynes/radarsim
    561     !
     561
    562562    ! Inputs:
    563     !
     563
    564564    !   [Q]        hydrometeor mixing ratio (g/kg)
    565565    !   [Re]       Optional Effective Radius (microns).  0 = use defaults (p1, p2, p3)
    566     !
     566
    567567    !   [D]        array of discrete drop sizes (um) where we desire to know the number concentraiton n(D).
    568568    !   [nsizes]   number of elements of [D]
    569     !
     569
    570570    !   [dtype]    distribution type
    571571    !   [rho_a]    ambient air density (kg m^-3)
     
    575575    !   [rho_c]    alternate constant density (kg m^-3)
    576576    !   [p1],[p2],[p3]  distribution parameters
    577     !
     577
    578578    ! Input/Output:
    579579    !   [apm]      a parameter for mass (kg m^[-bpm])
    580580    !   [bmp]      b params for mass
    581     !
     581
    582582    ! Outputs:
    583583    !   [N]        discrete concentrations (cm^-3 um^-1)
    584584    !              or, for monodisperse, a constant (1/cm^3)
    585     !
     585
    586586    ! Requires:
    587587    !   function infind
    588     !
     588
    589589    ! Created:
    590590    !   11/28/05  John Haynes (haynes@atmos.colostate.edu)
     
    868868    !   Part of QuickBeam v1.03 by John Haynes
    869869    !   http://reef.atmos.colostate.edu/haynes/radarsim
    870     !
     870
    871871    ! Inputs:
    872872    !   [freq]      radar frequency (GHz)
     
    881881    !   [qs]        ... efficiencies; otherwise set to -1
    882882    !   [rho_e]     medium effective density (kg m^-3) (-1 = pure)
    883     !
     883
    884884    ! Outputs:
    885885    !   [z_eff]     unattenuated effective reflectivity factor (mm^6/m^3)
    886886    !   [z_ray]     reflectivity factor, Rayleigh only (mm^6/m^3)
    887887    !   [kr]        attenuation coefficient (db km^-1)
    888     !
     888
    889889    ! Created:
    890890    !   11/28/05  John Haynes (haynes@atmos.colostate.edu)
     
    10461046    ! Purpose:
    10471047    !   Compute 2-way gaseous attenuation through a volume in microwave
    1048     !
     1048
    10491049    ! Inputs:
    10501050    !   [PRES_mb]   pressure (mb) (hPa)
     
    10521052    !   [RH]        relative humidity (%)
    10531053    !   [f]         frequency (GHz), < 300 GHz
    1054     !
     1054
    10551055    ! Returns:
    10561056    !   2-way gaseous attenuation (dB/km)
    1057     !
     1057
    10581058    ! Reference:
    10591059    !   Uses method of Liebe (1985)
    1060     !
     1060
    10611061    ! Created:
    10621062    !   12/09/05  John Haynes (haynes@atmos.colostate.edu)
     
    12341234    ! ##############################################################################################
    12351235    ! Purpose:
    1236     !
     1236
    12371237    !   Initialize variables used by the radar simulator.
    12381238    !   Part of QuickBeam v3.0 by John Haynes and Roj Marchand
    1239     !   
     1239
    12401240    ! Inputs: 
    12411241    !   NAME            SIZE        DESCRIPTION
     
    12441244    ! Outputs:
    12451245    !   [sd]                        Structure that define hydrometeor types
    1246     !
     1246
    12471247    ! Local variables:
    12481248    !   [n_hydro]       (1)         Number of hydrometeor types
     
    12651265    ! ####################################################################################
    12661266    ! NOTES on HCLASS variables
    1267     !
     1267
    12681268    ! TYPE - Set to
    12691269    ! 1 for modified gamma distribution,
     
    12721272    ! 4 for monodisperse distribution,
    12731273    ! 5 for lognormal distribution.
    1274         !
     1274
    12751275    ! PHASE - Set to 0 for liquid, 1 for ice.
    12761276    ! DMIN  - The minimum drop size for this class (micron), ignored for monodisperse.
     
    12861286    ! BPM - The beta_m coefficient in equation (1), see section 4.1.
    12871287    ! RHO - Hydrometeor density (kg m-3 ).
    1288     !
     1288
    12891289    ! P1, P2, P3 - are default distribution parameters that depend on the type
    12901290    ! of distribution (see quickmbeam documentation for more information)
    1291     !
     1291
    12921292    ! Modified Gamma (must set P3 and one of P1 or P2)
    12931293    ! P1 - Set to the total particle number concentration Nt /rho_a (kg-1 ), where
     
    12951295    ! P2 - Set to the particle mean diameter D (micron).
    12961296    ! P3 - Set to the distribution width nu.
    1297     !
     1297
    12981298    ! Exponetial (set one of)
    12991299    ! P1 - Set to a constant intercept parameter N0 (m-4).
    13001300    ! P2 - Set to a constant lambda (micron-1).
    1301     !
     1301
    13021302    ! Power Law
    13031303    ! P1 - Set this to the value of a constant power law parameter br
    1304     !
     1304
    13051305    ! Monodisperse
    13061306    ! P1 - Set to a constant diameter D0 (micron) = Re.
    1307     !
     1307
    13081308    ! Log-normal (must set P3 and one of P1 or P2)
    13091309    ! P1 - Set to the total particle number concentration Nt /rho_a (kg-1 )
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/scops.F90

    r5095 r5099  
    22! Copyright (c) 2009, British Crown Copyright, the Met Office
    33! All rights reserved.
    4 !
     4
    55! Redistribution and use in source and binary forms, with or without modification, are
    66! permitted provided that the following conditions are met:
    7 !
     7
    88! 1. Redistributions of source code must retain the above copyright notice, this list of
    99!    conditions and the following disclaimer.
    10 !
     10
    1111! 2. Redistributions in binary form must reproduce the above copyright notice, this list
    1212!    of conditions and the following disclaimer in the documentation and/or other
    1313!    materials provided with the distribution.
    14 !
     14
    1515! 3. Neither the name of the copyright holder nor the names of its contributors may be
    1616!    used to endorse or promote products derived from this software without specific prior
    1717!    written permission.
    18 !
     18
    1919! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    2020! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     
    2626! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    2727! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    28 !
     28
    2929! History
    3030! May 2015 - D. Swales - Modified for COSPv2.0
Note: See TracChangeset for help on using the changeset viewer.