Changeset 5099 for LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2
- Timestamp:
- Jul 22, 2024, 9:29:09 PM (7 months ago)
- 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 2 2 ! Copyright (c) 2009, Roger Marchand, version 1.2 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History 30 30 ! May 2015 - D. Swales - Modified for COSPv2.0 -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/array_lib.F90
r3491 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History: 30 30 ! 10/16/03 John Haynes - Original version (haynes@atmos.colostate.edu) 31 31 ! 01/31/06 John Haynes - IDL to Fortran 90 32 32 ! 01/01/15 Dustin Swales - Modified for COSPv2.0 33 ! 33 34 34 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 35 35 module array_lib … … 47 47 ! Finds the index of an array that is closest to a value, plus the 48 48 ! difference between the value found and the value specified 49 ! 49 50 50 ! Inputs: 51 51 ! [list] an array of sequential values … … 53 53 ! Optional input: 54 54 ! [sort] set to 1 if [list] is in unknown/non-sequential order 55 ! 55 56 56 ! Returns: 57 57 ! index of [list] that is closest to [val] 58 ! 58 59 59 ! Optional output: 60 60 ! [dist] set to variable containing [list([result])] - [val] 61 ! 61 62 62 ! Requires: 63 63 ! mrgrnk library 64 ! 64 65 65 ! ########################################################################## 66 66 -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp.F90
r5095 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History: 30 30 ! May 2015- D. Swales - Original version 31 31 ! Mar 2018- R. Guzman - Added OPAQ diagnostics and GLID simulator 32 32 ! Apr 2018- R. Guzman - Added ATLID simulator 33 ! 33 34 34 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 35 35 -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_atlid_interface.F90
r3491 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History 30 30 ! Apr 2018 - R. Guzman - Original version -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_calipso_interface.F90
r3491 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History 30 30 ! May 2015 - D. Swales - Original version … … 69 69 ! derived from CALIPSO-GOCCP observations at 120m vertical grid 70 70 ! (Cesana and Chepfer, JGR, 2013). 71 ! 71 72 72 ! Relationship between ATBice and ATBperp,ice for ice particles: 73 73 ! ATBperp,ice = Alpha*ATBice -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_cloudsat_interface.F90
r3491 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History 30 30 ! May 2015 - D. Swales - Original version -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_config.F90
r3723 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History: 30 30 ! Jul 2007 - A. Bodas-Salcedo - Initial version … … 39 39 ! Mar 2018 - R. Guzman - Added LIDAR_NTYPE for the OPAQ diagnostics 40 40 ! Apr 2018 - R. Guzman - Added parameters for GROUND LIDAR and ATLID simulators 41 ! 41 42 42 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 43 43 -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_errorHandling.F90
r3491 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History: 30 30 ! May 2015- D. Swales - Original version 31 ! 31 32 32 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 33 33 -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_grLidar532_interface.F90
r3491 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History 30 30 ! Apr 2018 - R. Guzman - Original version -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_isccp_interface.F90
r3491 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History 30 30 ! May 2015 - D. Swales - Original version -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_kinds.F90
r3491 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History: 30 30 ! May 2015- D. Swales - Original version 31 ! 31 32 32 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 33 33 MODULE cosp_kinds -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_misr_interface.F90
r3491 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History 30 30 ! May 2015 - D. Swales - Original version -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_modis_interface.F90
r3491 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History 30 30 ! May 2015 - D. Swales - Original version -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_optics.F90
r5095 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History: 30 30 ! 05/01/15 Dustin Swales - Original version 31 31 ! 04/04/18 Rodrigo Guzman- Added CALIOP-like Ground LIDar routines (GLID) 32 32 ! 10/04/18 Rodrigo Guzman- Added ATLID-like (EarthCare) lidar routines (ATLID) 33 ! 33 34 34 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 35 35 module cosp_optics … … 50 50 ! ########################################################################## 51 51 ! COSP_SIMULATOR_OPTICS 52 ! 52 53 53 ! Used by: ISCCP, MISR and MODIS simulators 54 54 ! ########################################################################## … … 107 107 ! ############################################################################## 108 108 ! MODIS_OPTICS_PARTITION 109 ! 109 110 110 ! For the MODIS simulator, there are times when only a sinlge optical depth 111 111 ! profile, cloud-ice and cloud-water are provided. In this case, the optical … … 154 154 ! ######################################################################################## 155 155 ! MODIS_OPTICS 156 ! 156 157 157 ! ######################################################################################## 158 158 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 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History 30 30 ! May 2015 - D. Swales - Original version -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_phys_constants.F90
r3491 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History: 30 30 ! May 2015- D. Swales - Original version 31 ! 31 32 32 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 33 33 MODULE cosp_phys_constants -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_stats.F90
r5095 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History: 30 30 ! Jul 2007 - A. Bodas-Salcedo - Initial version -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_utils.F90
r3723 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History: 30 30 ! Jul 2007 - A. Bodas-Salcedo - Initial version 31 31 ! May 2015 - Dustin Swales - Modified for COSPv2.0 32 ! 32 33 33 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 34 34 MODULE MOD_COSP_UTILS -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/icarus.F90
r5095 r5099 2 2 ! Copyright (c) 2009, Lawrence Livemore National Security Limited Liability 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History 30 30 ! May 2015 - D. Swales - Modified for COSPv2.0 … … 251 251 ! ############################################################################ 252 252 ! Clear-sky radiance calculation 253 ! 253 254 254 ! Compute water vapor continuum emissivity this treatment follows Schwarkzopf 255 255 ! and Ramasamy JGR 1999,vol 104, pages 9467-9499. The emissivity is calculated … … 329 329 ! ################################################################################# 330 330 ! Cloud-Top Temperature 331 ! 331 332 332 ! Now that you have the top of atmosphere radiance, account for ISCCP 333 333 ! procedures to determine cloud top temperature account for partially … … 392 392 ! #################################################################################### 393 393 ! Cloud-Top Pressure 394 ! 394 395 395 ! The 2 methods differ according to whether or not you use the physical cloud 396 396 ! top pressure (isccp_top_height = 2) or the radiatively determined cloud top … … 516 516 ! #################################################################################### 517 517 ! Determines ISCCP cloud type frequencies 518 ! 518 519 519 ! Now that boxptop and boxtau have been determined, determine amount of each of the 520 520 ! 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 2 2 ! Copyright (c) 2009, Centre National de la Recherche Scientifique 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History 30 30 ! May 2007: ActSim code of M. Chiriaco and H. Chepfer rewritten by S. Bony 31 ! 31 32 32 ! May 2008, H. Chepfer: 33 33 ! - Units of pressure inputs: Pa 34 34 ! - Non Spherical particles : LS Ice NS coefficients, CONV Ice NS coefficients 35 35 ! - New input: ice_type (0=ice-spheres ; 1=ice-non-spherical) 36 ! 36 37 37 ! June 2008, A. Bodas-Salcedo: 38 38 ! - Ported to Fortran 90 and optimisation changes 39 ! 39 40 40 ! August 2008, J-L Dufresne: 41 41 ! - Optimisation changes (sum instructions suppressed) 42 ! 42 43 43 ! October 2008, S. Bony, H. Chepfer and J-L. Dufresne : 44 44 ! - Interface with COSP v2.0: … … 47 47 ! depolarisation diagnostic removed 48 48 ! parasol (polder) reflectances (for 5 different solar zenith angles) added 49 ! 49 50 50 ! December 2008, S. Bony, H. Chepfer and J-L. Dufresne : 51 51 ! - Modification of the integration of the lidar equation. 52 52 ! - change the cloud detection threshold 53 ! 53 54 54 ! April 2008, A. Bodas-Salcedo: 55 55 ! - Bug fix in computation of pmol and pnorm of upper layer 56 ! 56 57 57 ! April 2008, J-L. Dufresne 58 58 ! - Bug fix in computation of pmol and pnorm, thanks to Masaki Satoh: a factor 2 59 59 ! was missing. This affects the ATB values but not the cloud fraction. 60 ! 60 61 61 ! January 2013, G. Cesana and H. Chepfer: 62 62 ! - Add the perpendicular component of the backscattered signal (pnorm_perp_tot) in the arguments … … 65 65 ! Reference: Cesana G. and H. Chepfer (2013): Evaluation of the cloud water phase 66 66 ! in a climate model using CALIPSO-GOCCP, J. Geophys. Res., doi: 10.1002/jgrd.50376 67 ! 67 68 68 ! May 2015 - D. Swales - Modified for COSPv2.0 69 ! 69 70 70 ! Mar 2018 - R. Guzman - Added OPAQ subroutines 71 71 ! References OPAQ: 72 ! 72 73 73 ! Guzman et al. (2017): Direct atmosphere opacity observations from CALIPSO provide 74 74 ! new constraints on cloud-radiation interactions. JGR-Atmospheres, DOI: 10.1002/2016JD025946 … … 76 76 ! the altitude at which a spaceborne lidar beam is fully attenuated. AMT, 10, 4659-4685, 77 77 ! https://doi.org/10.5194/amt-10-4659-2017 78 ! 78 79 79 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 80 80 module mod_lidar_simulator … … 90 90 ! derived from CALIPSO-GOCCP observations at 120m vertical grid 91 91 ! (Cesana and Chepfer, JGR, 2013). 92 ! 92 93 93 ! Relationship between ATBice and ATBperp,ice for ice particles: 94 94 ! ATBperp,ice = Alpha*ATBice -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_construct_destroy_mod.F90
r3491 r5099 1 1 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 ! 2 3 3 ! Module pour construir et detruire les variables "cospIN", "cospstateIN" et "cospOUT" 4 ! 4 5 5 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 6 6 … … 118 118 ! ###################################################################################### 119 119 ! SUBROUTINE construct_cosp_outputs 120 ! 120 121 121 ! This subroutine allocates output fields based on input logical flag switches. 122 122 ! ###################################################################################### -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_interface.F90
r5095 r5099 1 1 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 ! 2 3 3 ! Nouveau code d'interface entre LMDZ et COSPv2 (version 2) 4 4 ! L'ancienne interface s'appelait "phys_cosp2" et avait ete concue pour COSPv1.4. … … 9 9 ! Cette version de COSP propose aussi de nombreux nouveaux diagnostics, notamment pour 10 10 ! le simulateur lidar (diagnostics CALIPSO-OPAQ, lidar sol 532nm et lidar ATLID 355nm). 11 ! 11 12 12 ! Interface reecrite par R.Guzman (01/2019), a partir de l'interface initiale concue 13 13 ! et ecrite par A.Idelkadi 14 ! 14 15 15 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 ! subroutine phys_cosp2( itap,dtime,freq_cosp, & … … 87 87 88 88 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 89 ! 89 90 90 ! Declaration des variables 91 ! 91 92 92 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 93 93 … … 211 211 212 212 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 213 ! 213 214 214 ! 1) Lecture du fichier "cosp_input_nl.txt", parametres d'entree pour COSP 215 ! 215 216 216 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 217 217 … … 356 356 357 357 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 358 ! 358 359 359 ! 3) Calculs des champs d'entree COSP a partir des variables LMDZ 360 ! 360 361 361 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 362 362 … … 427 427 428 428 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 429 ! 429 430 430 ! 4a) On construit la variable cospOUT qui contient tous les diagnostics de sortie. 431 431 ! Elle sera remplie lors de l'appel du simulateur COSP 432 ! 432 433 433 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 434 434 … … 437 437 438 438 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 439 ! 439 440 440 ! 4b) On construit la variable cospstateIN que l'on va remplir avec les champs LMDZ 441 441 ! Les champ verticaux doivent etre donnes a l'envers, c-a-d : (Nlevels:1) = (TOA:SFC) 442 ! 442 443 443 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 444 444 … … 463 463 464 464 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 465 ! 465 466 466 ! 4c) On construit la variable cospIN qui contient les proprietes optiques subcolumn 467 467 ! pour COSP. Elle sera essentiellement remplie dans la subroutine subsample_and_optics 468 468 ! ou sont appeles SCOPS, PREC_SCOPS et les subroutines qui calculent les signaux 469 469 ! simules pour chaque simulateur actif. 470 ! 470 471 471 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 472 472 … … 477 477 478 478 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 479 ! 479 480 480 ! 5) Appel de subsample_and_optics : Les champs verticaux doivent etre donnes a 481 481 ! l'envers comme pour le remplissage de cospstateIN, c-a-d : (Nlevels:1) = (TOA:SFC) 482 ! 482 483 483 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 484 484 … … 503 503 504 504 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 505 ! 505 506 506 ! 6) On appelle le simulateur COSPv2 507 ! 507 508 508 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 509 509 … … 516 516 517 517 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 518 ! 518 519 519 ! 7a) Ecriture des sorties 1: on cree d'abord les fichiers NCDF pour ecrire les sorties 520 520 ! en appelant lmdz_cosp_output_open (lors du premier appel de cette interface pour les 521 521 ! 2 options d'ecriture), ou sont definis les axes et les caracteristiques 522 522 ! des fichiers de sortie avec les diagnostics. 523 ! 523 524 524 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 525 525 … … 541 541 542 542 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 543 ! 543 544 544 ! 7b) Ecriture des sorties 2: le remplissage des fichiers de sortie se fait a chaque 545 545 ! appel de cette interface avec une difference entre les 2 options d'ecriture: 546 ! 546 547 547 ! AVEC xios, on commence a remplir les fichiers de sortie a partir du DEUXIEME 548 548 ! appel de cette interface (lorsque cosp_init_flag = 1). 549 ! 549 550 550 ! SANS xios, on commence a remplir les fichiers de sortie a partir du PREMIER 551 551 ! appel de cette interface (lorsque cosp_init_flag = 1). 552 ! 552 553 553 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 554 554 … … 558 558 559 559 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 560 ! 560 561 561 ! 8) On libere la memoire allouee lors de cet appel a l'interface 562 ! 562 563 563 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 564 564 -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_output_mod.F90
r5095 r5099 3 3 !! La routine cosp_output_open (appelee 1 seule fois dans phy_cosp.F90) permet : 4 4 !! de creer les fichiers avec leurs grilles horizontales et verticales 5 ! 5 6 6 ! R.Guzman jan 2019 (mise a jour pour COSPv2) 7 7 ! On change le nom du module a "lmdz_cosp_output_mod" et celui de la routine a "lmdz_cosp_output_open" 8 8 ! pour qu'on sache qu'il s'agit d'un module specifique a l'implementation de COSP dans LMDZ 9 ! 9 10 10 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 11 11 MODULE lmdz_cosp_output_mod … … 347 347 !!! Variables d'entree 348 348 349 ! ug Variables utilis ées pour récupérer le calendrier pour xios349 ! ug Variables utilis�es pour r�cup�rer le calendrier pour xios 350 350 INTEGER :: x_an, x_mois, x_jour 351 351 REAL :: x_heure -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_output_write_mod.F90
r5095 r5099 1 1 !!!! Abderrahmane Idelkadi aout 2013 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2 2 ! Module pour definir (au 1er appel) et ecrire les variables dans les fichiers de sortie cosp 3 ! 3 4 4 ! R.Guzman jan 2019 (mise a jour pour COSPv2) 5 5 ! On change le nom du module a "lmdz_cosp_output_write_mod" et celui de la routine a "lmdz_cosp_output_write" 6 6 ! pour qu on sache qu il s agit d un module specifique a l implementation de COSP dans LMDZ 7 ! 7 8 8 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 9 9 MODULE lmdz_cosp_output_write_mod … … 669 669 CHARACTER(LEN=20) :: typeecrit 670 670 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... 673 673 IF (INDEX(var%cosp_typeecrit(iff), "once") > 0) THEN 674 674 typeecrit = 'once' … … 765 765 END IF 766 766 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... 769 769 IF (INDEX(var%cosp_typeecrit(iff), "once") > 0) THEN 770 770 typeecrit = 'once' … … 827 827 IF (prt_level >= 9) WRITE(lunout,*)'Begin histrwrite2d ',var%name 828 828 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: 830 830 IF(.NOT.cosp_varsdefined) THEN 831 831 !$OMP MASTER 832 832 print*,'var, cosp_varsdefined dans cosp_varsdefined ',var%name, cosp_varsdefined 833 !Si phase de d éfinition.... on définit833 !Si phase de définition.... on définit 834 834 CALL conf_cospoutputs(var%name,var%cles) 835 835 DO iff=1, 3 … … 840 840 !$OMP END MASTER 841 841 ELSE 842 !Et sinon on.... écrit842 !Et sinon on.... écrit 843 843 IF (SIZE(field)/=klon) & 844 844 CALL abort_physic('iophy::histwrite2d_cosp','Field first DIMENSION not equal to klon',1) … … 921 921 nom=var%name 922 922 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: 924 924 IF(.NOT.cosp_varsdefined) THEN 925 !Si phase de d éfinition.... on définit925 !Si phase de définition.... on définit 926 926 !$OMP MASTER 927 927 CALL conf_cospoutputs(var%name,var%cles) … … 933 933 !$OMP END MASTER 934 934 ELSE 935 !Et sinon on.... écrit935 !Et sinon on.... écrit 936 936 IF (SIZE(field,1)/=klon) & 937 937 CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1) … … 1000 1000 1001 1001 IF(cosp_varsdefined) THEN 1002 !Et sinon on.... écrit1002 !Et sinon on.... écrit 1003 1003 IF (SIZE(field,1)/=klon) & 1004 1004 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 1 1 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 ! 2 3 3 ! Module pour remplir la variable "cospIN", calculs des proprietes optiques subcolumn 4 4 ! pour les differents simulateurs 5 ! 5 6 6 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 7 7 -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/math_lib.F90
r5095 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History: 30 30 ! July 2006: John Haynes - Initial version 31 31 ! May 2015: Dustin Swales - Modified for COSPv2.0 32 ! 32 33 33 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 34 34 module math_lib … … 49 49 ! evalues the integral (f ds) between f(index=i1) and f(index=i2) 50 50 ! using the AVINT procedure 51 ! 51 52 52 ! Inputs: 53 53 ! [f] functional values … … 55 55 ! [i1] index of lower limit 56 56 ! [i2] index of upper limit 57 ! 57 58 58 ! Returns: 59 59 ! result of path integral 60 ! 60 61 61 ! Notes: 62 62 ! [s] may be in forward or reverse numerical order 63 ! 63 64 64 ! Requires: 65 65 ! mrgrnk package 66 ! 66 67 67 ! Created: 68 68 ! 02/02/06 John Haynes (haynes@atmos.colostate.edu) … … 114 114 ! Purpose: 115 115 ! estimate the integral of unevenly spaced data 116 ! 116 117 117 ! Inputs: 118 118 ! [ftab] functional values … … 121 121 ! [a] lower limit of integration 122 122 ! [b] upper limit of integration 123 ! 123 124 124 ! Outputs: 125 125 ! [result] approximate value of integral 126 ! 126 127 127 ! Reference: 128 128 ! From SLATEC libraries, in public domain 129 ! 129 130 130 !*********************************************************************** 131 ! 131 132 132 ! AVINT estimates the integral of unevenly spaced data. 133 ! 133 134 134 ! Discussion: 135 ! 135 136 136 ! The method uses overlapping parabolas and smoothing. 137 ! 137 138 138 ! Modified: 139 ! 139 140 140 ! 30 October 2000 141 141 ! 4 January 2008, A. Bodas-Salcedo. Error control for XTAB taken out of 142 142 ! loop to allow vectorization. 143 ! 143 144 144 ! Reference: 145 ! 145 146 146 ! Philip Davis and Philip Rabinowitz, 147 147 ! Methods of Numerical Integration, 148 148 ! Blaisdell Publishing, 1967. 149 ! 149 150 150 ! P E Hennion, 151 151 ! Algorithm 77, … … 153 153 ! Communications of the Association for Computing Machinery, 154 154 ! Volume 5, page 96, 1962. 155 ! 155 156 156 ! Parameters: 157 ! 157 158 158 ! Input, real ( kind = 8 ) FTAB(NTAB), the function values, 159 159 ! FTAB(I) = F(XTAB(I)). 160 ! 160 161 161 ! Input, real ( kind = 8 ) XTAB(NTAB), the abscissas at which the 162 162 ! function values are given. The XTAB's must be distinct 163 163 ! and in ascending order. 164 ! 164 165 165 ! Input, integer NTAB, the number of entries in FTAB and 166 166 ! XTAB. NTAB must be at least 3. 167 ! 167 168 168 ! Input, real ( kind = 8 ) A, the lower limit of integration. A should 169 169 ! be, but need not be, near one endpoint of the interval 170 170 ! (X(1), X(NTAB)). 171 ! 171 172 172 ! Input, real ( kind = 8 ) B, the upper limit of integration. B should 173 173 ! be, but need not be, near one endpoint of the interval 174 174 ! (X(1), X(NTAB)). 175 ! 175 176 176 ! Output, real ( kind = 8 ) RESULT, the approximate value of the integral. 177 177 ! ########################################################################## … … 328 328 ! Purpose: 329 329 ! Returns the gamma function 330 ! 330 331 331 ! Input: 332 332 ! [x] value to compute gamma function of 333 ! 333 334 334 ! Returns: 335 335 ! gamma(x) 336 ! 336 337 337 ! Coded: 338 338 ! 02/02/06 John Haynes (haynes@atmos.colostate.edu) -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/mo_rng.F90
r5095 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History: 30 30 ! May 2015- D. Swales - Original version 31 ! 31 32 32 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 33 33 MODULE mod_rng -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/modis_simulator.F90
r5095 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History 30 30 ! May 2009: Robert Pincus - Initial version … … 37 37 ! May 2015: Dustin Swales - Modified for COSPv2.0 38 38 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 39 ! 39 40 40 ! Notes on using the MODIS simulator: 41 41 ! *) You may provide either layer-by-layer values of optical thickness at 0.67 and 2.1 … … 48 48 ! the MODIS retrieval libraries (parameters re_water_min, re_ice_min, etc.) the 49 49 ! simulator returns missing values (re_fill) 50 ! 50 51 51 ! When error conditions are encountered this code calls the function complain_and_die, 52 52 ! supplied at the bottom of this module. Users probably want to replace this with 53 53 ! something more graceful. 54 ! 54 55 55 module mod_modis_sim 56 56 USE MOD_COSP_CONFIG, only: R_UNDEF,modis_histTau,modis_histPres,numMODISTauBins, & … … 102 102 ! ######################################################################################## 103 103 ! MODIS simulator using specified liquid and ice optical thickness in each layer 104 ! 104 105 105 ! Note: this simulator operates on all points; to match MODIS itself night-time 106 106 ! points should be excluded 107 ! 107 108 108 ! Note: the simulator requires as input the optical thickness and cloud top pressure 109 109 ! derived from the ISCCP simulator run with parameter top_height = 1. … … 443 443 deltaX = tauLimit - totalTau 444 444 totalTau = totalTau + deltaX 445 ! 445 446 446 ! Result for trapezoidal rule when you take less than a full step 447 447 ! tauIncrement is a layer-integrated value 448 ! 448 449 449 totalProduct = totalProduct & 450 450 + pressure(i-1) * deltaX & … … 534 534 535 535 if(diff(lowerBound) * diff(upperBound) < 0) then 536 ! 536 537 537 ! Interpolate the root position linearly if we bracket the root 538 ! 538 539 539 interpolate_to_min = x(upperBound) - & 540 540 diff(upperBound) * (x(upperBound) - x(lowerBound)) / (diff(upperBound) - diff(lowerBound)) … … 611 611 612 612 elemental function get_g_nir (phase, re) 613 ! 613 614 614 ! Polynomial fit for asummetry parameter g in MODIS band 7 (near IR) as a function 615 615 ! of size for ice and water 616 616 ! Fits from Steve Platnick 617 !618 617 619 618 integer, intent(in) :: phase … … 647 646 real(wp), intent(in) :: re 648 647 real(wp) :: get_ssa_nir 649 ! 648 650 649 ! Polynomial fit for single scattering albedo in MODIS band 7 (near IR) as a function 651 650 ! of size for ice and water 652 651 ! Fits from Steve Platnick 653 ! 652 654 653 real(wp), dimension(4), parameter :: ice_coefficients = (/ 0.9625, -1.8069e-2, 3.3281e-4,-2.2865e-6/) 655 654 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 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History: 30 30 ! May 2015: Dustin Swales - Modified for COSPv2.0 31 ! 31 32 32 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 33 33 Module m_mrgrnk … … 56 56 ! __________________________________________________________ 57 57 Real (wp) :: XVALA, XVALB 58 ! 58 59 59 Integer, Dimension (SIZE(IRNGT)) :: JWRKT 60 60 Integer :: LMTNA, LMTNC, IRNG1, IRNG2 61 61 Integer :: NVAL, IIND, IWRKD, IWRK, IWRKF, JINDA, IINDA, IINDB 62 ! 62 63 63 NVAL = Min (SIZE(XDONT), SIZE(IRNGT)) 64 64 Select Case (NVAL) … … 71 71 Continue 72 72 End Select 73 ! 73 74 74 ! Fill-in the index array, creating ordered couples 75 ! 75 76 76 Do IIND = 2, NVAL, 2 77 77 If (XDONT(IIND-1) <= XDONT(IIND)) Then … … 86 86 IRNGT (NVAL) = NVAL 87 87 End If 88 ! 88 89 89 ! We will now have ordered subsets A - B - A - B - ... 90 90 ! and merge A and B couples into C - C - ... 91 ! 91 92 92 LMTNA = 2 93 93 LMTNC = 4 94 ! 94 95 95 ! First iteration. The length of the ordered subsets goes from 2 to 4 96 ! 96 97 97 Do 98 98 If (NVAL <= 2) Exit 99 ! 99 100 100 ! Loop on merges of A and B into C 101 ! 101 102 102 Do IWRKD = 0, NVAL - 1, 4 103 103 If ((IWRKD+4) > NVAL) Then 104 104 If ((IWRKD+2) >= NVAL) Exit 105 ! 105 106 106 ! 1 2 3 107 ! 107 108 108 If (XDONT(IRNGT(IWRKD+2)) <= XDONT(IRNGT(IWRKD+3))) Exit 109 ! 109 110 110 ! 1 3 2 111 ! 111 112 112 If (XDONT(IRNGT(IWRKD+1)) <= XDONT(IRNGT(IWRKD+3))) Then 113 113 IRNG2 = IRNGT (IWRKD+2) 114 114 IRNGT (IWRKD+2) = IRNGT (IWRKD+3) 115 115 IRNGT (IWRKD+3) = IRNG2 116 ! 116 117 117 ! 3 1 2 118 ! 118 119 119 Else 120 120 IRNG1 = IRNGT (IWRKD+1) … … 125 125 Exit 126 126 End If 127 ! 127 128 128 ! 1 2 3 4 129 ! 129 130 130 If (XDONT(IRNGT(IWRKD+2)) <= XDONT(IRNGT(IWRKD+3))) Cycle 131 ! 131 132 132 ! 1 3 x x 133 ! 133 134 134 If (XDONT(IRNGT(IWRKD+1)) <= XDONT(IRNGT(IWRKD+3))) Then 135 135 IRNG2 = IRNGT (IWRKD+2) … … 143 143 IRNGT (IWRKD+4) = IRNG2 144 144 End If 145 ! 145 146 146 ! 3 x x x 147 ! 147 148 148 Else 149 149 IRNG1 = IRNGT (IWRKD+1) … … 168 168 End If 169 169 End Do 170 ! 170 171 171 ! The Cs become As and Bs 172 ! 172 173 173 LMTNA = 4 174 174 Exit 175 175 End Do 176 ! 176 177 177 ! Iteration loop. Each time, the length of the ordered subsets 178 178 ! is doubled. 179 ! 179 180 180 Do 181 181 If (LMTNA >= NVAL) Exit 182 182 IWRKF = 0 183 183 LMTNC = 2 * LMTNC 184 ! 184 185 185 ! Loop on merges of A and B into C 186 ! 186 187 187 Do 188 188 IWRK = IWRKF … … 196 196 IINDA = 1 197 197 IINDB = JINDA + 1 198 ! 198 199 199 ! Shortcut for the case when the max of A is smaller 200 200 ! than the min of B. This line may be activated when the 201 201 ! initial set is already close to sorted. 202 ! 202 203 203 ! IF (XDONT(IRNGT(JINDA)) <= XDONT(IRNGT(IINDB))) CYCLE 204 ! 204 205 205 ! One steps in the C subset, that we build in the final rank array 206 ! 206 207 207 ! Make a copy of the rank array for the merge iteration 208 ! 208 209 209 JWRKT (1:LMTNA) = IRNGT (IWRKD:JINDA) 210 ! 210 211 211 XVALA = XDONT (JWRKT(IINDA)) 212 212 XVALB = XDONT (IRNGT(IINDB)) 213 ! 213 214 214 Do 215 215 IWRK = IWRK + 1 216 ! 216 217 217 ! We still have unprocessed values in both A and B 218 ! 218 219 219 If (XVALA > XVALB) Then 220 220 IRNGT (IWRK) = IRNGT (IINDB) … … 232 232 XVALA = XDONT (JWRKT(IINDA)) 233 233 End If 234 ! 234 235 235 End Do 236 236 End Do 237 ! 237 238 238 ! The Cs become As and Bs 239 ! 239 240 240 LMTNA = 2 * LMTNA 241 241 End Do 242 ! 242 243 243 Return 244 ! 244 245 245 End Subroutine D_mrgrnk 246 246 … … 256 256 ! __________________________________________________________ 257 257 Real(wp) :: XVALA, XVALB 258 ! 258 259 259 Integer, Dimension (SIZE(IRNGT)) :: JWRKT 260 260 Integer :: LMTNA, LMTNC, IRNG1, IRNG2 261 261 Integer :: NVAL, IIND, IWRKD, IWRK, IWRKF, JINDA, IINDA, IINDB 262 ! 262 263 263 NVAL = Min (SIZE(XDONT), SIZE(IRNGT)) 264 264 Select Case (NVAL) … … 271 271 Continue 272 272 End Select 273 ! 273 274 274 ! Fill-in the index array, creating ordered couples 275 ! 275 276 276 Do IIND = 2, NVAL, 2 277 277 If (XDONT(IIND-1) <= XDONT(IIND)) Then … … 286 286 IRNGT (NVAL) = NVAL 287 287 End If 288 ! 288 289 289 ! We will now have ordered subsets A - B - A - B - ... 290 290 ! and merge A and B couples into C - C - ... 291 ! 291 292 292 LMTNA = 2 293 293 LMTNC = 4 294 ! 294 295 295 ! First iteration. The length of the ordered subsets goes from 2 to 4 296 ! 296 297 297 Do 298 298 If (NVAL <= 2) Exit 299 ! 299 300 300 ! Loop on merges of A and B into C 301 ! 301 302 302 Do IWRKD = 0, NVAL - 1, 4 303 303 If ((IWRKD+4) > NVAL) Then 304 304 If ((IWRKD+2) >= NVAL) Exit 305 ! 305 306 306 ! 1 2 3 307 ! 307 308 308 If (XDONT(IRNGT(IWRKD+2)) <= XDONT(IRNGT(IWRKD+3))) Exit 309 ! 309 310 310 ! 1 3 2 311 ! 311 312 312 If (XDONT(IRNGT(IWRKD+1)) <= XDONT(IRNGT(IWRKD+3))) Then 313 313 IRNG2 = IRNGT (IWRKD+2) 314 314 IRNGT (IWRKD+2) = IRNGT (IWRKD+3) 315 315 IRNGT (IWRKD+3) = IRNG2 316 ! 316 317 317 ! 3 1 2 318 ! 318 319 319 Else 320 320 IRNG1 = IRNGT (IWRKD+1) … … 325 325 Exit 326 326 End If 327 ! 327 328 328 ! 1 2 3 4 329 ! 329 330 330 If (XDONT(IRNGT(IWRKD+2)) <= XDONT(IRNGT(IWRKD+3))) Cycle 331 ! 331 332 332 ! 1 3 x x 333 ! 333 334 334 If (XDONT(IRNGT(IWRKD+1)) <= XDONT(IRNGT(IWRKD+3))) Then 335 335 IRNG2 = IRNGT (IWRKD+2) … … 343 343 IRNGT (IWRKD+4) = IRNG2 344 344 End If 345 ! 345 346 346 ! 3 x x x 347 ! 347 348 348 Else 349 349 IRNG1 = IRNGT (IWRKD+1) … … 368 368 End If 369 369 End Do 370 ! 370 371 371 ! The Cs become As and Bs 372 ! 372 373 373 LMTNA = 4 374 374 Exit 375 375 End Do 376 ! 376 377 377 ! Iteration loop. Each time, the length of the ordered subsets 378 378 ! is doubled. 379 ! 379 380 380 Do 381 381 If (LMTNA >= NVAL) Exit 382 382 IWRKF = 0 383 383 LMTNC = 2 * LMTNC 384 ! 384 385 385 ! Loop on merges of A and B into C 386 ! 386 387 387 Do 388 388 IWRK = IWRKF … … 396 396 IINDA = 1 397 397 IINDB = JINDA + 1 398 ! 398 399 399 ! Shortcut for the case when the max of A is smaller 400 400 ! than the min of B. This line may be activated when the 401 401 ! initial set is already close to sorted. 402 ! 402 403 403 ! IF (XDONT(IRNGT(JINDA)) <= XDONT(IRNGT(IINDB))) CYCLE 404 ! 404 405 405 ! One steps in the C subset, that we build in the final rank array 406 ! 406 407 407 ! Make a copy of the rank array for the merge iteration 408 ! 408 409 409 JWRKT (1:LMTNA) = IRNGT (IWRKD:JINDA) 410 ! 410 411 411 XVALA = XDONT (JWRKT(IINDA)) 412 412 XVALB = XDONT (IRNGT(IINDB)) 413 ! 413 414 414 Do 415 415 IWRK = IWRK + 1 416 ! 416 417 417 ! We still have unprocessed values in both A and B 418 ! 418 419 419 If (XVALA > XVALB) Then 420 420 IRNGT (IWRK) = IRNGT (IINDB) … … 432 432 XVALA = XDONT (JWRKT(IINDA)) 433 433 End If 434 ! 434 435 435 End Do 436 436 End Do 437 ! 437 438 438 ! The Cs become As and Bs 439 ! 439 440 440 LMTNA = 2 * LMTNA 441 441 End Do 442 ! 442 443 443 Return 444 ! 444 445 445 End Subroutine R_mrgrnk 446 446 Subroutine I_mrgrnk (XDONT, IRNGT) … … 455 455 ! __________________________________________________________ 456 456 Integer :: XVALA, XVALB 457 ! 457 458 458 Integer, Dimension (SIZE(IRNGT)) :: JWRKT 459 459 Integer :: LMTNA, LMTNC, IRNG1, IRNG2 460 460 Integer :: NVAL, IIND, IWRKD, IWRK, IWRKF, JINDA, IINDA, IINDB 461 ! 461 462 462 NVAL = Min (SIZE(XDONT), SIZE(IRNGT)) 463 463 Select Case (NVAL) … … 470 470 Continue 471 471 End Select 472 ! 472 473 473 ! Fill-in the index array, creating ordered couples 474 ! 474 475 475 Do IIND = 2, NVAL, 2 476 476 If (XDONT(IIND-1) <= XDONT(IIND)) Then … … 485 485 IRNGT (NVAL) = NVAL 486 486 End If 487 ! 487 488 488 ! We will now have ordered subsets A - B - A - B - ... 489 489 ! and merge A and B couples into C - C - ... 490 ! 490 491 491 LMTNA = 2 492 492 LMTNC = 4 493 ! 493 494 494 ! First iteration. The length of the ordered subsets goes from 2 to 4 495 ! 495 496 496 Do 497 497 If (NVAL <= 2) Exit 498 ! 498 499 499 ! Loop on merges of A and B into C 500 ! 500 501 501 Do IWRKD = 0, NVAL - 1, 4 502 502 If ((IWRKD+4) > NVAL) Then 503 503 If ((IWRKD+2) >= NVAL) Exit 504 ! 504 505 505 ! 1 2 3 506 ! 506 507 507 If (XDONT(IRNGT(IWRKD+2)) <= XDONT(IRNGT(IWRKD+3))) Exit 508 ! 508 509 509 ! 1 3 2 510 ! 510 511 511 If (XDONT(IRNGT(IWRKD+1)) <= XDONT(IRNGT(IWRKD+3))) Then 512 512 IRNG2 = IRNGT (IWRKD+2) 513 513 IRNGT (IWRKD+2) = IRNGT (IWRKD+3) 514 514 IRNGT (IWRKD+3) = IRNG2 515 ! 515 516 516 ! 3 1 2 517 ! 517 518 518 Else 519 519 IRNG1 = IRNGT (IWRKD+1) … … 524 524 Exit 525 525 End If 526 ! 526 527 527 ! 1 2 3 4 528 ! 528 529 529 If (XDONT(IRNGT(IWRKD+2)) <= XDONT(IRNGT(IWRKD+3))) Cycle 530 ! 530 531 531 ! 1 3 x x 532 ! 532 533 533 If (XDONT(IRNGT(IWRKD+1)) <= XDONT(IRNGT(IWRKD+3))) Then 534 534 IRNG2 = IRNGT (IWRKD+2) … … 542 542 IRNGT (IWRKD+4) = IRNG2 543 543 End If 544 ! 544 545 545 ! 3 x x x 546 ! 546 547 547 Else 548 548 IRNG1 = IRNGT (IWRKD+1) … … 567 567 End If 568 568 End Do 569 ! 569 570 570 ! The Cs become As and Bs 571 ! 571 572 572 LMTNA = 4 573 573 Exit 574 574 End Do 575 ! 575 576 576 ! Iteration loop. Each time, the length of the ordered subsets 577 577 ! is doubled. 578 ! 578 579 579 Do 580 580 If (LMTNA >= NVAL) Exit 581 581 IWRKF = 0 582 582 LMTNC = 2 * LMTNC 583 ! 583 584 584 ! Loop on merges of A and B into C 585 ! 585 586 586 Do 587 587 IWRK = IWRKF … … 595 595 IINDA = 1 596 596 IINDB = JINDA + 1 597 ! 597 598 598 ! Shortcut for the case when the max of A is smaller 599 599 ! than the min of B. This line may be activated when the 600 600 ! initial set is already close to sorted. 601 ! 601 602 602 ! IF (XDONT(IRNGT(JINDA)) <= XDONT(IRNGT(IINDB))) CYCLE 603 ! 603 604 604 ! One steps in the C subset, that we build in the final rank array 605 ! 605 606 606 ! Make a copy of the rank array for the merge iteration 607 ! 607 608 608 JWRKT (1:LMTNA) = IRNGT (IWRKD:JINDA) 609 ! 609 610 610 XVALA = XDONT (JWRKT(IINDA)) 611 611 XVALB = XDONT (IRNGT(IINDB)) 612 ! 612 613 613 Do 614 614 IWRK = IWRK + 1 615 ! 615 616 616 ! We still have unprocessed values in both A and B 617 ! 617 618 618 If (XVALA > XVALB) Then 619 619 IRNGT (IWRK) = IRNGT (IINDB) … … 631 631 XVALA = XDONT (JWRKT(IINDA)) 632 632 End If 633 ! 633 634 634 End Do 635 635 End Do 636 ! 636 637 637 ! The Cs become As and Bs 638 ! 638 639 639 LMTNA = 2 * LMTNA 640 640 End Do 641 ! 641 642 642 Return 643 ! 643 644 644 End Subroutine I_mrgrnk 645 645 end module m_mrgrnk -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/optics_lib.F90
r5095 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History: 30 30 ! July 2006: John Haynes - Initial version 31 31 ! May 2015: Dustin Swales - Modified for COSPv2.0 32 ! 32 33 33 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 34 34 module optics_lib … … 44 44 subroutine m_wat(freq, tk, n_r, n_i) 45 45 ! ############################################################################ 46 ! 46 47 47 ! Purpose: 48 48 ! compute complex index of refraction of liquid water 49 ! 49 50 50 ! Inputs: 51 51 ! [freq] frequency (GHz) 52 52 ! [tk] temperature (K) 53 ! 53 54 54 ! Outputs: 55 55 ! [n_r] real part index of refraction 56 56 ! [n_i] imaginary part index of refraction 57 ! 57 58 58 ! Reference: 59 59 ! Based on the work of Ray (1972) 60 ! 60 61 61 ! Coded: 62 62 ! 03/22/05 John Haynes (haynes@atmos.colostate.edu) … … 111 111 subroutine m_ice(freq,t,n_r,n_i) 112 112 ! ########################################################################## 113 ! 113 114 114 ! Purpose: 115 115 ! compute complex index of refraction of ice 116 ! 116 117 117 ! Inputs: 118 118 ! [freq] frequency (GHz) 119 119 ! [t] temperature (K) 120 ! 120 121 121 ! Outputs: 122 122 ! [n_r] real part index of refraction 123 123 ! [n_i] imaginary part index of refraction 124 ! 124 125 125 ! Reference: 126 126 ! Fortran 90 port from IDL of REFICE by Stephen G. Warren 127 ! 127 128 128 ! Modified: 129 129 ! 05/31/05 John Haynes (haynes@atmos.colostate.edu) … … 505 505 ! Allowable wavelength range extends from 0.045 microns to 8.6 meter 506 506 ! temperature dependence only considered beyond 167 microns. 507 ! 507 508 508 ! interpolation is done n_r vs. log(xlam) 509 509 ! n_r vs. t 510 510 ! log(n_i) vs. log(xlam) 511 511 ! log(n_i) vs. t 512 ! 512 513 513 ! Stephen G. Warren - 1983 514 514 ! Dept. of Atmospheric Sciences 515 515 ! University of Washington 516 516 ! Seattle, Wa 98195 517 ! 517 518 518 ! Based on 519 ! 519 520 520 ! Warren,S.G.,1984. 521 521 ! Optical constants of ice from the ultraviolet to the microwave. 522 522 ! Applied Optics,23,1206-1225 523 ! 523 524 524 ! Reference temperatures are -1.0,-5.0,-20.0, and -60.0 deg C 525 525 ! ##################################################################### … … 594 594 Subroutine MieInt(Dx, SCm, Inp, Dqv, Dqxt, Dqsc, Dbsc, Dg, Xs1, Xs2, DPh, Error) 595 595 ! ########################################################################## 596 ! 596 597 597 ! General purpose Mie scattering routine for single particles 598 598 ! Author: R Grainger 1990 … … 601 601 ! code to ensure correct calculation of backscatter coeficient 602 602 ! Options/Extend_Source 603 ! 603 604 604 ! ########################################################################## 605 605 ! INPUTS -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/parasol.F90
r5095 r5099 2 2 ! Copyright (c) 2009, Centre National de la Recherche Scientifique 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History 30 30 ! December 2008, S. Bony, H. Chepfer and J-L. Dufresne : … … 46 46 ! of cloud water and cloud fraction in each sub-column of each model 47 47 ! gridbox. 48 ! 49 ! 48 49 50 50 ! December 2008, S. Bony, H. Chepfer and J-L. Dufresne : 51 51 ! - optimization for vectorization 52 ! 52 53 53 ! Version 2.0 (October 2008) 54 54 ! Version 2.1 (December 2008) -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/prec_scops.F90
r5095 r5099 2 2 ! Copyright (c) 2008, Lawrence Livermore National Security Limited Liability Corporation 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History: 30 30 ! May 2015- D. Swales - Modified for COSPv2.0 31 ! 31 32 32 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 33 33 module mod_prec_scops -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/quickbeam.F90
r5095 r5099 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History 30 30 ! 11/2005: John Haynes - Created … … 33 33 ! 01/2008 'Do while' to determine if hydrometeor(s) present in volume 34 34 ! changed for vectorization purposes (A. Bodas-Salcedo) 35 ! 35 36 36 ! 07/2010 V3.0 ... Modified to load or save scale factors to disk as a Look-Up Table (LUT) 37 37 ! ... All hydrometeor and radar simulator properties now included in hp structure … … 40 40 ! Also ... Support of Morrison 2-moment style microphyscis (Np_matrix) added 41 41 ! ... Changes implement by Roj Marchand following work by Laura Fowler 42 ! 42 43 43 ! 10/2011 Modified ngate loop to go in either direction depending on flag 44 44 ! hp%radar_at_layer_one. This affects the direction in which attenuation is summed. 45 ! 45 46 46 ! Also removed called to AVINT for gas and hydrometeor attenuation and replaced with simple 47 47 ! summation. (Roger Marchand) … … 315 315 ! ###################################################################################### 316 316 ! SUBROUTINE cloudsat_precipOccurence 317 ! 317 318 318 ! Notes from July 2016: Add precip flag also looped over subcolumns 319 319 ! Modified by Tristan L'Ecuyer (TSL) to add precipitation flagging … … 321 321 ! To mimic the satellite algorithm, this code applies thresholds to non-attenuated 322 322 ! reflectivities, Ze_non, consistent with those outlined in Haynes et al, JGR (2009). 323 ! 323 324 324 ! Procedures/Notes: 325 ! 325 326 326 ! (1) If the 2-way attenuation exceeds 40 dB, the pixel will be flagged as 'heavy rain' 327 327 ! consistent with the multiple-scattering analysis of Battaglia et al, JGR (2008). … … 334 334 ! due to differening attenuation corrections from hydrometeors aloft, the non-attenuated 335 335 ! reflectivities used in the computation of this flag cannot vary across sub-columns. 336 ! 336 337 337 ! radar_prec_flag = 1-Rain possible 2-Rain probable 3-Rain certain 338 338 ! 4-Snow possible 5-Snow certain … … 340 340 ! 8-Heavy Rain 341 341 ! 9- default value 342 ! 342 343 343 ! Modified by Dustin Swales (University of Colorado) for use with COSP2. 344 344 ! *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 2 2 ! Copyright (c) 2015, Regents of the University of Colorado 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History: 30 30 ! May 2015: Dustin Swales - Initial version 31 ! 31 32 32 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 33 33 module mod_quickbeam_optics … … 251 251 ! alternative is to comment out above two lines and use the following block 252 252 ! MG Mie approach - adjust density of sphere with D = D_characteristic to match particle density 253 ! 253 254 254 ! rcfg%rho_eff(tp,1:ns,iRe_type) = (6/pi)*sd%apm(tp)*(Di*1E-6)**(sd%bpm(tp)-3) !MG Mie approach 255 255 … … 354 354 ! Purpose: 355 355 ! Calculates Effective Radius (1/2 distribution 3rd moment / 2nd moment). 356 ! 356 357 357 ! For some distribution types, the total number concentration (per kg), Np 358 358 ! may be optionally specified. Should be set to zero, otherwise. 359 ! 359 360 360 ! Roj Marchand July 2010 361 ! 361 362 362 ! Inputs: 363 ! 363 364 364 ! [Q] hydrometeor mixing ratio (g/kg) ! not needed for some distribution types 365 365 ! [Np] Optional Total number concentration (per kg). 0 = use defaults (p1, p2, p3) 366 366 ! [rho_a] ambient air density (kg m^-3) 367 ! 367 368 368 ! Distribution parameters as per quickbeam documentation. 369 369 ! [dtype] distribution type … … 371 371 ! [bmp] b params for mass 372 372 ! [p1],[p2],[p3] distribution parameters 373 ! 373 374 374 ! Outputs: 375 375 ! [Re] Effective radius, 1/2 the 3rd moment/2nd moment (um) 376 ! 376 377 377 ! Created: 378 378 ! July 2010 Roj Marchand 379 379 ! Modified: 380 380 ! 12/18/14 Dustin Swales: Define type REALs as double precision (dustin.swales@noaa.gov) 381 ! 381 382 382 ! ############################################################################################## 383 383 ! ############################################################################################## … … 549 549 ! Purpose: 550 550 ! Create a discrete drop size distribution 551 ! 551 552 552 ! Starting with Quickbeam V3, this routine now allows input of 553 553 ! both effective radius (Re) and total number concentration (Nt) 554 554 ! Roj Marchand July 2010 555 ! 555 556 556 ! The version in Quickbeam v.104 was modified to allow Re but not Nt 557 557 ! This is a significantly modified form for the version 558 ! 558 559 559 ! Originally Part of QuickBeam v1.03 by John Haynes 560 560 ! http://reef.atmos.colostate.edu/haynes/radarsim 561 ! 561 562 562 ! Inputs: 563 ! 563 564 564 ! [Q] hydrometeor mixing ratio (g/kg) 565 565 ! [Re] Optional Effective Radius (microns). 0 = use defaults (p1, p2, p3) 566 ! 566 567 567 ! [D] array of discrete drop sizes (um) where we desire to know the number concentraiton n(D). 568 568 ! [nsizes] number of elements of [D] 569 ! 569 570 570 ! [dtype] distribution type 571 571 ! [rho_a] ambient air density (kg m^-3) … … 575 575 ! [rho_c] alternate constant density (kg m^-3) 576 576 ! [p1],[p2],[p3] distribution parameters 577 ! 577 578 578 ! Input/Output: 579 579 ! [apm] a parameter for mass (kg m^[-bpm]) 580 580 ! [bmp] b params for mass 581 ! 581 582 582 ! Outputs: 583 583 ! [N] discrete concentrations (cm^-3 um^-1) 584 584 ! or, for monodisperse, a constant (1/cm^3) 585 ! 585 586 586 ! Requires: 587 587 ! function infind 588 ! 588 589 589 ! Created: 590 590 ! 11/28/05 John Haynes (haynes@atmos.colostate.edu) … … 868 868 ! Part of QuickBeam v1.03 by John Haynes 869 869 ! http://reef.atmos.colostate.edu/haynes/radarsim 870 ! 870 871 871 ! Inputs: 872 872 ! [freq] radar frequency (GHz) … … 881 881 ! [qs] ... efficiencies; otherwise set to -1 882 882 ! [rho_e] medium effective density (kg m^-3) (-1 = pure) 883 ! 883 884 884 ! Outputs: 885 885 ! [z_eff] unattenuated effective reflectivity factor (mm^6/m^3) 886 886 ! [z_ray] reflectivity factor, Rayleigh only (mm^6/m^3) 887 887 ! [kr] attenuation coefficient (db km^-1) 888 ! 888 889 889 ! Created: 890 890 ! 11/28/05 John Haynes (haynes@atmos.colostate.edu) … … 1046 1046 ! Purpose: 1047 1047 ! Compute 2-way gaseous attenuation through a volume in microwave 1048 ! 1048 1049 1049 ! Inputs: 1050 1050 ! [PRES_mb] pressure (mb) (hPa) … … 1052 1052 ! [RH] relative humidity (%) 1053 1053 ! [f] frequency (GHz), < 300 GHz 1054 ! 1054 1055 1055 ! Returns: 1056 1056 ! 2-way gaseous attenuation (dB/km) 1057 ! 1057 1058 1058 ! Reference: 1059 1059 ! Uses method of Liebe (1985) 1060 ! 1060 1061 1061 ! Created: 1062 1062 ! 12/09/05 John Haynes (haynes@atmos.colostate.edu) … … 1234 1234 ! ############################################################################################## 1235 1235 ! Purpose: 1236 ! 1236 1237 1237 ! Initialize variables used by the radar simulator. 1238 1238 ! Part of QuickBeam v3.0 by John Haynes and Roj Marchand 1239 ! 1239 1240 1240 ! Inputs: 1241 1241 ! NAME SIZE DESCRIPTION … … 1244 1244 ! Outputs: 1245 1245 ! [sd] Structure that define hydrometeor types 1246 ! 1246 1247 1247 ! Local variables: 1248 1248 ! [n_hydro] (1) Number of hydrometeor types … … 1265 1265 ! #################################################################################### 1266 1266 ! NOTES on HCLASS variables 1267 ! 1267 1268 1268 ! TYPE - Set to 1269 1269 ! 1 for modified gamma distribution, … … 1272 1272 ! 4 for monodisperse distribution, 1273 1273 ! 5 for lognormal distribution. 1274 ! 1274 1275 1275 ! PHASE - Set to 0 for liquid, 1 for ice. 1276 1276 ! DMIN - The minimum drop size for this class (micron), ignored for monodisperse. … … 1286 1286 ! BPM - The beta_m coefficient in equation (1), see section 4.1. 1287 1287 ! RHO - Hydrometeor density (kg m-3 ). 1288 ! 1288 1289 1289 ! P1, P2, P3 - are default distribution parameters that depend on the type 1290 1290 ! of distribution (see quickmbeam documentation for more information) 1291 ! 1291 1292 1292 ! Modified Gamma (must set P3 and one of P1 or P2) 1293 1293 ! P1 - Set to the total particle number concentration Nt /rho_a (kg-1 ), where … … 1295 1295 ! P2 - Set to the particle mean diameter D (micron). 1296 1296 ! P3 - Set to the distribution width nu. 1297 ! 1297 1298 1298 ! Exponetial (set one of) 1299 1299 ! P1 - Set to a constant intercept parameter N0 (m-4). 1300 1300 ! P2 - Set to a constant lambda (micron-1). 1301 ! 1301 1302 1302 ! Power Law 1303 1303 ! P1 - Set this to the value of a constant power law parameter br 1304 ! 1304 1305 1305 ! Monodisperse 1306 1306 ! P1 - Set to a constant diameter D0 (micron) = Re. 1307 ! 1307 1308 1308 ! Log-normal (must set P3 and one of P1 or P2) 1309 1309 ! P1 - Set to the total particle number concentration Nt /rho_a (kg-1 ) -
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/scops.F90
r5095 r5099 2 2 ! Copyright (c) 2009, British Crown Copyright, the Met Office 3 3 ! All rights reserved. 4 ! 4 5 5 ! Redistribution and use in source and binary forms, with or without modification, are 6 6 ! permitted provided that the following conditions are met: 7 ! 7 8 8 ! 1. Redistributions of source code must retain the above copyright notice, this list of 9 9 ! conditions and the following disclaimer. 10 ! 10 11 11 ! 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 12 ! of conditions and the following disclaimer in the documentation and/or other 13 13 ! materials provided with the distribution. 14 ! 14 15 15 ! 3. Neither the name of the copyright holder nor the names of its contributors may be 16 16 ! used to endorse or promote products derived from this software without specific prior 17 17 ! written permission. 18 ! 18 19 19 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 20 ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF … … 26 26 ! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 27 ! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ! 28 29 29 ! History 30 30 ! May 2015 - D. Swales - Modified for COSPv2.0
Note: See TracChangeset
for help on using the changeset viewer.