/[lmdze]/trunk/libf/dyn3d/limit.f90
ViewVC logotype

Diff of /trunk/libf/dyn3d/limit.f90

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

revision 14 by guez, Fri Jul 25 19:59:34 2008 UTC revision 15 by guez, Fri Aug 1 15:24:12 2008 UTC
# Line 21  contains Line 21  contains
21      use conf_gcm_m, only: day_step      use conf_gcm_m, only: day_step
22      use comgeom, only: rlonu, rlatv      use comgeom, only: rlonu, rlatv
23      use etat0_mod, only: pctsrf      use etat0_mod, only: pctsrf
24      use start_init_orog_m, only: masque      use start_init_orog_m, only: mask
25      use conf_dat2d_m, only: conf_dat2d      use conf_dat2d_m, only: conf_dat2d
26      use inter_barxy_m, only: inter_barxy      use inter_barxy_m, only: inter_barxy
27      use numer_rec, only: spline, splint      use numer_rec, only: spline, splint
# Line 95  contains Line 95  contains
95      PRINT *, 'Processing rugosity...'      PRINT *, 'Processing rugosity...'
96      call NF95_OPEN('Rugos.nc', NF90_NOWRITE, ncid)      call NF95_OPEN('Rugos.nc', NF90_NOWRITE, ncid)
97    
98        ! Read coordinate variables:
99    
100      call nf95_get_coord(ncid, "longitude", dlon_ini)      call nf95_get_coord(ncid, "longitude", dlon_ini)
101      imdep = size(dlon_ini)      imdep = size(dlon_ini)
102    
# Line 108  contains Line 110  contains
110      allocate(dlon(imdep), dlat(jmdep))      allocate(dlon(imdep), dlat(jmdep))
111      call NF95_INQ_VARID(ncid, 'RUGOS', varid)      call NF95_INQ_VARID(ncid, 'RUGOS', varid)
112    
113      ! Compute "champtime":      ! Read the primary variable day by day and regrid horizontally,
114        ! result in "champtime":
115      DO  l = 1, lmdep      DO  l = 1, lmdep
116         ierr = NF90_GET_VAR(ncid, varid, champ, start=(/1, 1, l/))         ierr = NF90_GET_VAR(ncid, varid, champ, start=(/1, 1, l/))
117         call handle_err("NF90_GET_VAR", ierr)         call handle_err("NF90_GET_VAR", ierr)
# Line 117  contains Line 120  contains
120         CALL inter_barxy(dlon, dlat(:jmdep -1), LOG(champ), rlonu(:iim), &         CALL inter_barxy(dlon, dlat(:jmdep -1), LOG(champ), rlonu(:iim), &
121              rlatv, champtime(:, :, l))              rlatv, champtime(:, :, l))
122         champtime(:, :, l) = EXP(champtime(:, :, l))         champtime(:, :, l) = EXP(champtime(:, :, l))
123         where (nint(masque(:iim, :)) /= 1) champtime(:, :, l) = 0.001         where (nint(mask(:iim, :)) /= 1) champtime(:, :, l) = 0.001
124      end do      end do
125    
126      call NF95_CLOSE(ncid)      call NF95_CLOSE(ncid)
# Line 125  contains Line 128  contains
128      DEALLOCATE(dlon, dlat, champ, dlon_ini, dlat_ini)      DEALLOCATE(dlon, dlat, champ, dlon_ini, dlat_ini)
129      allocate(yder(lmdep))      allocate(yder(lmdep))
130    
131        ! Interpolate monthly values to daily values, at each horizontal position:
132      DO j = 1, jjm + 1      DO j = 1, jjm + 1
133         DO i = 1, iim         DO i = 1, iim
134            yder(:) = SPLINE(timeyear, champtime(i, j, :))            yder(:) = SPLINE(timeyear, champtime(i, j, :))

Legend:
Removed from v.14  
changed lines
  Added in v.15

  ViewVC Help
Powered by ViewVC 1.1.21