/[lmdze]/trunk/Sources/dyn3d/read_serre.f
ViewVC logotype

Diff of /trunk/Sources/dyn3d/read_serre.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/dyn3d/serre.f revision 112 by guez, Thu Sep 18 13:36:51 2014 UTC trunk/Sources/dyn3d/read_serre.f revision 139 by guez, Tue May 26 17:46:03 2015 UTC
# Line 1  Line 1 
1  module serre  module read_serre_m
2    
3    implicit none    implicit none
4    
   REAL:: clon = 0. ! longitude of the center of the zoom, in degrees  
   real:: clat = 0. ! latitude of the center of the zoom, in degrees  
   
   real, save:: transx, transy  
   real, save:: alphax, alphay ! anciennes formulations des grossissements  
   real, save:: pxo, pyo  
   
   real:: grossismx = 1. ! facteur de grossissement du zoom, selon la longitude  
   real:: grossismy = 1. ! facteur de grossissement du zoom, selon la latitude  
   
   real:: dzoomx = 0.  
   ! extension en longitude de la zone du zoom (fraction de la zone totale)  
   
   real:: dzoomy = 0.  
   ! extension en latitude de la zone du zoom (fraction de la zone totale)  
   
   real:: taux = 3. ! raideur du zoom en X  
   real:: tauy = 3. ! raideur du zoom en Y  
   
5  contains  contains
6    
7    subroutine read_serre    subroutine read_serre
8    
9        use dynetat0_m, only: clon, clat, grossismx, grossismy, dzoomx, dzoomy, &
10             taux, tauy
11      use unit_nml_m, only: unit_nml      use unit_nml_m, only: unit_nml
12        use nr_util, only: assert, pi
13    
14      namelist /serre_nml/ clon, clat, grossismx, grossismy, dzoomx, dzoomy, &      REAL:: clon_deg = 0. ! longitude of the center of the zoom, in degrees
15           taux, tauy      real:: clat_deg = 0. ! latitude of the center of the zoom, in degrees
16    
17        namelist /serre_nml/ clon_deg, clat_deg, grossismx, grossismy, dzoomx, &
18             dzoomy, taux, tauy
19    
20      !-------------------------------------------------      !-------------------------------------------------
21    
22        ! Default values:
23        clon_deg = 0.
24        clat_deg = 0.
25        grossismx = 1.
26        grossismy = 1.
27        dzoomx = 0.2
28        dzoomy = 0.2
29        taux = 3.
30        tauy = 3.
31    
32      print *, "Enter namelist 'serre_nml'."      print *, "Enter namelist 'serre_nml'."
33      read(unit=*, nml=serre_nml)      read(unit=*, nml=serre_nml)
34      write(unit_nml, nml=serre_nml)      write(unit_nml, nml=serre_nml)
35    
36      IF (grossismx < 1.) THEN      call assert(grossismx >= 1. .and. grossismy >= 1., "read_serre grossism")
37         PRINT *, 'Error: grossismx < 1'      call assert(dzoomx > 0., dzoomx < 1., dzoomy < 1., &
38         STOP 1           "read_serre dzoomx dzoomy")
39      ELSE      clon = clon_deg / 180. * pi
40         alphax = 1. - 1. / grossismx      clat = clat_deg / 180. * pi
     ENDIF  
     IF (grossismy < 1.) THEN  
        PRINT *, 'Error: grossismy < 1'  
        STOP 1  
     ELSE  
        alphay = 1. - 1. / grossismy  
     ENDIF  
     PRINT *, 'alphax = ', alphax  
     PRINT *, 'alphay = ', alphay  
41    
42    end subroutine read_serre    end subroutine read_serre
43    
44  end module serre  end module read_serre_m

Legend:
Removed from v.112  
changed lines
  Added in v.139

  ViewVC Help
Powered by ViewVC 1.1.21