/[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 5 by guez, Mon Mar 3 16:32:04 2008 UTC revision 7 by guez, Mon Mar 31 12:24:17 2008 UTC
# Line 41  contains Line 41  contains
41      use grid_change, only: init_dyn_phy, dyn_phy      use grid_change, only: init_dyn_phy, dyn_phy
42      use q_sat_m, only: q_sat      use q_sat_m, only: q_sat
43      use exner_hyb_m, only: exner_hyb      use exner_hyb_m, only: exner_hyb
     use regr_coefoz_m, only: regr_coefoz  
44      use advtrac_m, only: iniadvtrac      use advtrac_m, only: iniadvtrac
     use netcdf95, only: nf95_open, nf95_close, nf95_inq_varid, nf90_nowrite, &  
          nf90_get_var, handle_err  
45      use pressure_m, only: pls, p3d      use pressure_m, only: pls, p3d
46        use dynredem0_m, only: dynredem0
47        use regr_lat_time_coefoz_m, only: regr_lat_time_coefoz
48        use regr_pr_o3_m, only: regr_pr_o3
49    
50      ! Variables local to the procedure:      ! Variables local to the procedure:
51    
# Line 105  contains Line 105  contains
105      REAL w(ip1jmp1, llm)      REAL w(ip1jmp1, llm)
106      REAL phystep      REAL phystep
107      INTEGER radpas      INTEGER radpas
     integer ncid, varid, ncerr, month  
108    
109      !---------------------------------      !---------------------------------
110    
# Line 187  contains Line 186  contains
186    
187      if (nqmx >= 5) then      if (nqmx >= 5) then
188         ! Ozone:         ! Ozone:
189           call regr_lat_time_coefoz
190         ! Compute ozone parameters on the LMDZ grid:         call regr_pr_o3(q3d(:, :, :, 5))
191         call regr_coefoz         ! Convert from mole fraction to mass fraction:
192           q3d(:, :, :, 5) = q3d(:, :, :, 5)  * 48. / 29.
        ! Find the month containing the day number "dayref":  
        month = (dayref - 1) / 30 + 1  
        print *, "month = ", month  
   
        call nf95_open("coefoz_LMDZ.nc", nf90_nowrite, ncid)  
   
        ! Get data at the right month from the input file:  
        call nf95_inq_varid(ncid, "r_Mob", varid)  
        ncerr = nf90_get_var(ncid, varid, q3d(:, :, :, 5), &  
             start=(/1, 1, 1, month/))  
        call handle_err("nf90_get_var r_Mob", ncerr)  
   
        call nf95_close(ncid)  
        ! Latitudes are in increasing order in the input file while  
        ! "rlatu" is in decreasing order so we need to invert order. Also, we  
        ! compute mass fraction from mole fraction:  
        q3d(:, :, :, 5) = q3d(:, jjm+1:1:-1, :, 5)  * 48. / 29.  
193      end if      end if
194    
195      tsol(:) = pack(tsol_2d, dyn_phy)      tsol(:) = pack(tsol_2d, dyn_phy)

Legend:
Removed from v.5  
changed lines
  Added in v.7

  ViewVC Help
Powered by ViewVC 1.1.21