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

Diff of /trunk/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/dyn3d/read_serre.f revision 254 by guez, Mon Feb 5 10:39:38 2018 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        grossismx = 1.
24        grossismy = 1.
25        dzoomx = 0.2
26        dzoomy = 0.2
27        taux = 3.
28        tauy = 3.
29    
30      print *, "Enter namelist 'serre_nml'."      print *, "Enter namelist 'serre_nml'."
31      read(unit=*, nml=serre_nml)      read(unit=*, nml=serre_nml)
32      write(unit_nml, nml=serre_nml)      write(unit_nml, nml=serre_nml)
33    
34      IF (grossismx < 1.) THEN      call assert(grossismx >= 1. .and. grossismy >= 1., "read_serre grossism")
35         PRINT *, 'Error: grossismx < 1'      call assert(dzoomx > 0., dzoomx < 1., dzoomy < 1., &
36         STOP 1           "read_serre dzoomx dzoomy")
37      ELSE      clon = clon_deg / 180. * pi
38         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  
39    
40    end subroutine read_serre    end subroutine read_serre
41    
42  end module serre  end module read_serre_m

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

  ViewVC Help
Powered by ViewVC 1.1.21