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

Diff of /trunk/dyn3d/dynetat0.f

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

revision 128 by guez, Thu Feb 12 16:23:33 2015 UTC revision 129 by guez, Fri Feb 13 18:22:38 2015 UTC
# Line 2  module dynetat0_m Line 2  module dynetat0_m
2    
3    IMPLICIT NONE    IMPLICIT NONE
4    
5    INTEGER day_ini    INTEGER day_ini
6      ! day number at the beginning of the run, based on value 1 on January
7      ! 1st of annee_ref
8    
9      integer:: day_ref = 1 ! jour de l'année de l'état initial
10      ! (= 350 si 20 décembre par exemple)
11    
12      integer:: annee_ref = 1998 ! Annee de l'etat initial (avec 4 chiffres)
13    
14  contains  contains
15    
# Line 14  contains Line 21  contains
21    
22      use comconst, only: dtvr      use comconst, only: dtvr
23      use comgeom, only: rlonu, rlatu, rlonv, rlatv, cu_2d, cv_2d, aire_2d      use comgeom, only: rlonu, rlatu, rlonv, rlatv, cu_2d, cv_2d, aire_2d
24        use conf_gcm_m, only: raz_date
25      use dimens_m, only: iim, jjm, llm, nqmx      use dimens_m, only: iim, jjm, llm, nqmx
26      use disvert_m, only: pa      use disvert_m, only: pa
27      use ener, only: etot0, ang0, ptot0, stot0, ztot0      use ener, only: etot0, ang0, ptot0, stot0, ztot0
# Line 24  contains Line 32  contains
32      use nr_util, only: assert      use nr_util, only: assert
33      use serre, only: clon, clat, grossismy, grossismx, dzoomx, dzoomy, taux, &      use serre, only: clon, clat, grossismy, grossismx, dzoomx, dzoomy, taux, &
34           tauy           tauy
35      use temps, only: day_ref, itau_dyn, annee_ref      use temps, only: itau_dyn
36        use unit_nml_m, only: unit_nml
37    
38      REAL, intent(out):: vcov(: , :, :) ! (iim + 1, jjm, llm)      REAL, intent(out):: vcov(: , :, :) ! (iim + 1, jjm, llm)
39      REAL, intent(out):: ucov(:, :, :) ! (iim + 1, jjm + 1, llm)      REAL, intent(out):: ucov(:, :, :) ! (iim + 1, jjm + 1, llm)
# Line 39  contains Line 48  contains
48      REAL, pointer:: tab_cntrl(:) ! tableau des paramètres du run      REAL, pointer:: tab_cntrl(:) ! tableau des paramètres du run
49      INTEGER ierr, ncid, varid      INTEGER ierr, ncid, varid
50    
51        namelist /dynetat0_nml/ day_ref, annee_ref
52    
53      !-----------------------------------------------------------------------      !-----------------------------------------------------------------------
54    
55      print *, "Call sequence information: dynetat0"      print *, "Call sequence information: dynetat0"
# Line 62  contains Line 73  contains
73      call assert(int(tab_cntrl(2)) == jjm, "dynetat0 tab_cntrl jjm")      call assert(int(tab_cntrl(2)) == jjm, "dynetat0 tab_cntrl jjm")
74      call assert(int(tab_cntrl(3)) == llm, "dynetat0 tab_cntrl llm")      call assert(int(tab_cntrl(3)) == llm, "dynetat0 tab_cntrl llm")
75    
     day_ref = int(tab_cntrl(4))  
     annee_ref = int(tab_cntrl(5))  
   
76      IF (dtvr /= tab_cntrl(12)) THEN      IF (dtvr /= tab_cntrl(12)) THEN
77         print *, 'Warning: the time steps from day_step and "start.nc" ' // &         print *, 'Warning: the time steps from day_step and "start.nc" ' // &
78            'are different.'              'are different.'
79         print *, 'dtvr from day_step: ', dtvr         print *, 'dtvr from day_step: ', dtvr
80         print *, 'dtvr from "start.nc": ', tab_cntrl(12)         print *, 'dtvr from "start.nc": ', tab_cntrl(12)
81         print *, 'Using the value from day_step.'         print *, 'Using the value from day_step.'
# Line 89  contains Line 97  contains
97      taux = tab_cntrl(28)      taux = tab_cntrl(28)
98      tauy = tab_cntrl(29)      tauy = tab_cntrl(29)
99    
100      itau_dyn = tab_cntrl(31)      print *, "Enter namelist 'dynetat0_nml'."
101        read(unit=*, nml=dynetat0_nml)
102        write(unit_nml, nml=dynetat0_nml)
103    
104        if (raz_date) then
105           print *, 'On réinitialise à la date lue dans la namelist.'
106           day_ini = day_ref
107           itau_dyn = 0
108        else
109           day_ref = tab_cntrl(4)
110           annee_ref = tab_cntrl(5)
111           itau_dyn = tab_cntrl(31)
112           day_ini = tab_cntrl(30)
113        end if
114    
115        print *, "day_ini = ", day_ini
116    
117        deallocate(tab_cntrl) ! pointer
118    
119      call NF95_INQ_VARID (ncid, "rlonu", varid)      call NF95_INQ_VARID (ncid, "rlonu", varid)
120      call NF95_GET_VAR(ncid, varid, rlonu)      call NF95_GET_VAR(ncid, varid, rlonu)
# Line 115  contains Line 140  contains
140      call NF95_INQ_VARID (ncid, "phisinit", varid)      call NF95_INQ_VARID (ncid, "phisinit", varid)
141      call NF95_GET_VAR(ncid, varid, phis)      call NF95_GET_VAR(ncid, varid, phis)
142    
     day_ini = tab_cntrl(30)  
   
     deallocate(tab_cntrl) ! pointer  
   
143      call NF95_INQ_VARID (ncid, "ucov", varid)      call NF95_INQ_VARID (ncid, "ucov", varid)
144      call NF95_GET_VAR(ncid, varid, ucov)      call NF95_GET_VAR(ncid, varid, ucov)
145    

Legend:
Removed from v.128  
changed lines
  Added in v.129

  ViewVC Help
Powered by ViewVC 1.1.21