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

Diff of /trunk/dyn3d/etat0.f

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

revision 26 by guez, Tue Mar 9 15:27:15 2010 UTC revision 39 by guez, Tue Jan 25 15:11:05 2011 UTC
# Line 19  contains Line 19  contains
19    
20      ! This subroutine creates "mask".      ! This subroutine creates "mask".
21    
22      USE ioipsl, only: flinget, flinclo, flinopen_nozoom, flininfo, histclo      use caldyn0_m, only: caldyn0
23        use comconst, only: dtvr, daysec, cpp, kappa
     USE start_init_orog_m, only: start_init_orog, mask, phis  
     use start_init_phys_m, only: qsol_2d  
     use startdyn, only: start_inter_3d, start_init_dyn  
     use dimens_m, only: iim, jjm, llm, nqmx  
     use paramet_m, only: ip1jm, ip1jmp1  
     use comconst, only: dtvr, daysec, cpp, kappa, pi  
     use comdissnew, only: lstardis, nitergdiv, nitergrot, niterh, &  
          tetagdiv, tetagrot, tetatemp  
     use indicesol, only: is_oce, is_sic, is_ter, is_lic, epsfra  
     use comvert, only: ap, bp, preff, pa  
     use dimphy, only: zmasq  
     use conf_gcm_m, only: day_step, iphysiq, dayref, anneeref  
24      use comgeom, only: rlatu, rlonv, rlonu, rlatv, aire_2d, apoln, apols, &      use comgeom, only: rlatu, rlonv, rlonu, rlatv, aire_2d, apoln, apols, &
25           cu_2d, cv_2d           cu_2d, cv_2d
26      use serre, only: alphax      use comvert, only: ap, bp, preff, pa
27        use conf_gcm_m, only: day_step, iphysiq, dayref, anneeref
28        use dimens_m, only: iim, jjm, llm, nqmx
29        use dimphy, only: zmasq
30      use dimsoil, only: nsoilmx      use dimsoil, only: nsoilmx
31      use temps, only: itau_dyn, itau_phy, annee_ref, day_ref, dt      use dynredem0_m, only: dynredem0
32        use dynredem1_m, only: dynredem1
33        use exner_hyb_m, only: exner_hyb
34        USE flincom, only: flinclo, flinopen_nozoom, flininfo
35        use flinget_m, only: flinget
36      use grid_atob, only: grille_m      use grid_atob, only: grille_m
37      use grid_change, only: init_dyn_phy, dyn_phy      use grid_change, only: init_dyn_phy, dyn_phy
38      use q_sat_m, only: q_sat      use histcom, only: histclo
39      use exner_hyb_m, only: exner_hyb      use indicesol, only: is_oce, is_sic, is_ter, is_lic, epsfra
40      use iniadvtrac_m, only: iniadvtrac      use iniadvtrac_m, only: iniadvtrac
41        use inidissip_m, only: inidissip
42        use inigeom_m, only: inigeom
43        use nr_util, only: pi
44        use paramet_m, only: ip1jm, ip1jmp1
45        use phyredem_m, only: phyredem
46      use pressure_var, only: pls, p3d      use pressure_var, only: pls, p3d
47      use dynredem0_m, only: dynredem0      use q_sat_m, only: q_sat
48      use regr_lat_time_coefoz_m, only: regr_lat_time_coefoz      use regr_lat_time_coefoz_m, only: regr_lat_time_coefoz
49      use regr_pr_o3_m, only: regr_pr_o3      use regr_pr_o3_m, only: regr_pr_o3
50      use phyredem_m, only: phyredem      use serre, only: alphax
51      use caldyn0_m, only: caldyn0      USE start_init_orog_m, only: start_init_orog, mask, phis
52      use inigeom_m, only: inigeom      use start_init_phys_m, only: qsol_2d
53      use inidissip_m, only: inidissip      use startdyn, only: start_inter_3d, start_init_dyn
54        use temps, only: itau_phy, annee_ref, day_ref
55    
56      ! Variables local to the procedure:      ! Variables local to the procedure:
57    
# Line 108  contains Line 109  contains
109      REAL pbaru(ip1jmp1, llm), pbarv(ip1jm, llm)      REAL pbaru(ip1jmp1, llm), pbarv(ip1jm, llm)
110      REAL w(ip1jmp1, llm)      REAL w(ip1jmp1, llm)
111      REAL phystep      REAL phystep
112        real trash
113    
114      !---------------------------------      !---------------------------------
115    
116      print *, "Call sequence information: etat0"      print *, "Call sequence information: etat0"
117    
     ! Construct a grid:  
   
118      dtvr = daysec / real(day_step)      dtvr = daysec / real(day_step)
119      print *, 'dtvr = ', dtvr      print *, 'dtvr = ', dtvr
120    
121        ! Construct a grid:
122    
123      pa = 5e4      pa = 5e4
124      CALL iniconst      CALL iniconst
125      CALL inigeom      CALL inigeom
# Line 146  contains Line 148  contains
148      CALL exner_hyb(psol, p3d, pks, pk)      CALL exner_hyb(psol, p3d, pks, pk)
149      IF (MINVAL(pk) == MAXVAL(pk)) stop '"pk" should not be constant'      IF (MINVAL(pk) == MAXVAL(pk)) stop '"pk" should not be constant'
150    
151      pls(:, :, :) = preff * (pk(:, :, :) / cpp)**(1. / kappa)      pls = preff * (pk / cpp)**(1. / kappa)
152      PRINT *, "minval(pls(:, :, :)) = ", minval(pls(:, :, :))      PRINT *, "minval(pls) = ", minval(pls)
153      print *, "maxval(pls(:, :, :)) = ", maxval(pls(:, :, :))      print *, "maxval(pls) = ", maxval(pls)
154    
155      call start_inter_3d('U', rlonv, rlatv, pls, uvent)      call start_inter_3d('U', rlonv, rlatv, pls, uvent)
156      forall (l = 1: llm) uvent(:iim, :, l) = uvent(:iim, :, l) * cu_2d(:iim, :)      forall (l = 1: llm) uvent(:iim, :, l) = uvent(:iim, :, l) * cu_2d(:iim, :)
# Line 159  contains Line 161  contains
161      vvent(iim + 1, :, :) = vvent(1, :, :)      vvent(iim + 1, :, :) = vvent(1, :, :)
162    
163      call start_inter_3d('TEMP', rlonu, rlatv, pls, t3d)      call start_inter_3d('TEMP', rlonu, rlatv, pls, t3d)
164      PRINT *,  'minval(t3d(:, :, :)) = ', minval(t3d(:, :, :))      PRINT *,  'minval(t3d) = ', minval(t3d)
165      print *, "maxval(t3d(:, :, :)) = ", maxval(t3d(:, :, :))      print *, "maxval(t3d) = ", maxval(t3d)
166    
167      tpot(:iim, :, :) = t3d(:iim, :, :) * cpp / pk(:iim, :, :)      tpot(:iim, :, :) = t3d(:iim, :, :) * cpp / pk(:iim, :, :)
168      tpot(iim + 1, :, :) = tpot(1, :, :)      tpot(iim + 1, :, :) = tpot(1, :, :)
# Line 171  contains Line 173  contains
173      ENDDO      ENDDO
174    
175      ! Calcul de l'humidité ŕ saturation :      ! Calcul de l'humidité ŕ saturation :
176      qsat(:, :, :) = q_sat(t3d, pls)      qsat = q_sat(t3d, pls)
177      PRINT *, "minval(qsat(:, :, :)) = ", minval(qsat(:, :, :))      PRINT *, "minval(qsat) = ", minval(qsat)
178      print *, "maxval(qsat(:, :, :)) = ", maxval(qsat(:, :, :))      print *, "maxval(qsat) = ", maxval(qsat)
179      IF (MINVAL(qsat) == MAXVAL(qsat)) stop '"qsat" should not be constant'      IF (MINVAL(qsat) == MAXVAL(qsat)) stop '"qsat" should not be constant'
180    
181      ! Water vapor:      ! Water vapor:
# Line 221  contains Line 223  contains
223      ALLOCATE(dlon_lic(iml_lic))      ALLOCATE(dlon_lic(iml_lic))
224      ALLOCATE(dlat_lic(jml_lic))      ALLOCATE(dlat_lic(jml_lic))
225      ALLOCATE(fraclic(iml_lic, jml_lic))      ALLOCATE(fraclic(iml_lic, jml_lic))
226      CALL flinopen_nozoom("landiceref.nc", iml_lic, jml_lic, &      CALL flinopen_nozoom(iml_lic, jml_lic, &
227           llm_tmp, lon_lic, lat_lic, lev, ttm_tmp, itaul, date, dt,  &           llm_tmp, lon_lic, lat_lic, lev, ttm_tmp, itaul, date, trash,  &
228           fid)           fid)
229      CALL flinget(fid, 'landice', iml_lic, jml_lic, llm_tmp, ttm_tmp &      CALL flinget(fid, 'landice', iml_lic, jml_lic, llm_tmp, ttm_tmp &
230           , 1, 1, fraclic)           , 1, 1, fraclic)
# Line 292  contains Line 294  contains
294    
295      ! Initialisation pour traceurs:      ! Initialisation pour traceurs:
296      call iniadvtrac      call iniadvtrac
297      CALL inidissip(lstardis, nitergdiv, nitergrot, niterh, tetagdiv, &      CALL inidissip
          tetagrot, tetatemp)  
     itau_dyn = 0  
298      itau_phy = 0      itau_phy = 0
299      day_ref = dayref      day_ref = dayref
300      annee_ref = anneeref      annee_ref = anneeref
# Line 303  contains Line 303  contains
303      CALL caldyn0(uvent, vvent, tpot, psol, masse, pk, phis, phi, w, pbaru, &      CALL caldyn0(uvent, vvent, tpot, psol, masse, pk, phis, phi, w, pbaru, &
304           pbarv)           pbarv)
305      CALL dynredem0("start.nc", dayref, phis)      CALL dynredem0("start.nc", dayref, phis)
306      CALL dynredem1("start.nc", vvent, uvent, tpot, q3d, masse, psol)      CALL dynredem1("start.nc", vvent, uvent, tpot, q3d, masse, psol, itau=0)
307    
308      ! Ecriture état initial physique:      ! Ecriture état initial physique:
309      print *, "iphysiq = ", iphysiq      print *, "iphysiq = ", iphysiq

Legend:
Removed from v.26  
changed lines
  Added in v.39

  ViewVC Help
Powered by ViewVC 1.1.21