source: LMDZ5/trunk/libf/cosp/load_mie_table.F90 @ 1985

Last change on this file since 1985 was 1907, checked in by lguez, 11 years ago

Added a copyright property to every file of the distribution, except
for the fcm files (which have their own copyright). Use svn propget on
a file to see the copyright. For instance:

$ svn propget copyright libf/phylmd/physiq.F90
Name of program: LMDZ
Creation date: 1984
Version: LMDZ5
License: CeCILL version 2
Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
See the license file in the root directory

Also added the files defining the CeCILL version 2 license, in French
and English, at the top of the LMDZ tree.

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
File size: 1.5 KB
RevLine 
[1262]1  subroutine load_mie_table(mie_table_name,mt)
2  use radar_simulator_types
3  implicit none
4 
5! Purpose:
6!   Loads the Mie table data
7!   Part of Quickbeam v1.03
8!   http://reef.atmos.colostate.edu/haynes/radarsim
9!
10! Inputs: 
11!   [mie_table_name]   Mie table input file
12!
13! Outputs:
14!   [mt]            structure of Mie table data
15!
16! Created from Quickbeam v1.02 08/24/2006 by Roger Marchand 
17
18! ----- INPUT -----
19  character*200, intent(in) :: mie_table_name
20
21! ----- OUTPUT -----
22  type(mie), intent(out) :: mt
23
24! ----- INTERNAL ----- 
25  integer :: i
26
27  integer*4 :: dummy_in(4)
28       
29    open(51,file=mie_table_name,action='read')
30 
31    read(51,*) dummy_in
32
33        if(dummy_in(1).ne. mt_nfreq .or. &
34           dummy_in(2).ne. mt_ntt .or. &
35           dummy_in(3).ne. mt_nf .or. &
36           dummy_in(4).ne. mt_nd) then
37
38                print *,'Mie file is of size :',dummy_in(:)
39                print *,'  expected a size of:',mt_nfreq, mt_ntt,mt_nf,mt_nf
40                print *,'  change paramters in radar_simulator_types.f90 ?? '
41                stop
42        endif
43
44    read(51,*) mt%freq
45    read(51,*) mt%tt
46    read(51,*) mt%f
47    read(51,*) mt%phase
48    read(51,*) mt%D
49    read(51,*) mt%qext
50    read(51,*) mt%qbsca
51   
52    close(51)
53
54! // create arrays of liquid/ice temperature
55  cnt_liq = 0
56  cnt_ice = 0
57  do i=1,mt_ntt
58    if (mt%phase(i) == 0) cnt_liq = cnt_liq + 1
59    if (mt%phase(i) == 1) cnt_ice = cnt_ice + 1
60  enddo
61  allocate(mt_ttl(cnt_liq),mt_tti(cnt_ice))
62  do i=1,cnt_liq
63    mt_ttl(i) = mt%tt(i)
64  enddo
65  do i=1,cnt_ice
66    mt_tti(i) = mt%tt(cnt_liq+i)
67  enddo
68
69  end subroutine load_mie_table
Note: See TracBrowser for help on using the repository browser.