- Timestamp:
- Sep 8, 2009, 11:16:12 AM (15 years ago)
- Location:
- LMDZ4/branches/LMDZ4-dev/libf
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/limit_netcdf.F
r1222 r1239 406 406 ENDDO 407 407 408 PRINT 222, timeyear 408 PRINT 222, timeyear(:lmdep) 409 409 222 FORMAT(2x,' Time year ',10f6.1) 410 410 c … … 623 623 timeyear(l) = tmidmonth(l) 624 624 ENDDO 625 PRINT 222, timeyear 625 PRINT 222, timeyear(:lmdep) 626 626 c 627 627 PRINT*, 'Interpolation temporelle' … … 942 942 timeyear(l) = tmidmonth(l) 943 943 ENDDO 944 print 222, timeyear 944 print 222, timeyear(:lmdep) 945 945 c 946 946 C interpolation temporelle … … 1137 1137 timeyear(l) = timecoord(l) 1138 1138 ENDDO 1139 print 222, timeyear 1139 print 222, timeyear(:lmdep) 1140 1140 c 1141 1141 C interpolation temporelle -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/limit_netcdf.F
r1222 r1239 406 406 ENDDO 407 407 408 PRINT 222, timeyear 408 PRINT 222, timeyear(:lmdep) 409 409 222 FORMAT(2x,' Time year ',10f6.1) 410 410 c … … 623 623 timeyear(l) = tmidmonth(l) 624 624 ENDDO 625 PRINT 222, timeyear 625 PRINT 222, timeyear(:lmdep) 626 626 c 627 627 PRINT*, 'Interpolation temporelle' … … 942 942 timeyear(l) = tmidmonth(l) 943 943 ENDDO 944 print 222, timeyear 944 print 222, timeyear(:lmdep) 945 945 c 946 946 C interpolation temporelle … … 1137 1137 timeyear(l) = timecoord(l) 1138 1138 ENDDO 1139 print 222, timeyear 1139 print 222, timeyear(:lmdep) 1140 1140 c 1141 1141 C interpolation temporelle -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/conf_phys.F90
r1229 r1239 146 146 LOGICAL,SAVE :: ok_strato_omp 147 147 LOGICAL,SAVE :: ok_hines_omp 148 LOGICAL :: read_climoz_omp149 148 LOGICAL :: carbon_cycle_tr_omp 150 149 LOGICAL :: carbon_cycle_cpl_omp … … 1282 1281 call getin('ecrit_LES', ecrit_LES_omp) 1283 1282 ! 1284 read_climoz _omp= .false. ! default value1285 call getin('read_climoz', read_climoz _omp)1283 read_climoz = .false. ! default value 1284 call getin('read_climoz', read_climoz) 1286 1285 1287 1286 carbon_cycle_tr_omp=.FALSE. … … 1421 1420 ok_LES = ok_LES_omp 1422 1421 ecrit_LES = ecrit_LES_omp 1423 read_climoz = read_climoz_omp1424 1422 carbon_cycle_tr = carbon_cycle_tr_omp 1425 1423 carbon_cycle_cpl = carbon_cycle_cpl_omp -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/regr_lat_time_climoz_m.F90
r1220 r1239 21 21 22 22 ! The input field depends on time, pressure level and latitude. 23 24 ! If the input field has missing values, they must be signaled by 25 ! the "missing_value" attribute. At each latitude and each date, the 26 ! missing values are replaced by the lowest valid value above missing 27 ! values. 28 23 29 ! We assume that the input field is a step function of latitude 24 30 ! and that the input latitude coordinate gives the centers of steps. … … 52 58 ! -- time increases (even though we do not use values of the input 53 59 ! time coordinate); 60 ! -- missing values are vertically contiguous, at the bottom of 61 ! the vertical domain; 62 ! -- there is no missing value at the top level of the atmosphere. 54 63 55 64 use regr1_step_av_m, only: regr1_step_av … … 57 66 use netcdf95, only: nf95_open, nf95_close, nf95_inq_varid, handle_err, & 58 67 nf95_put_var, nf95_gw_var 59 use netcdf, only: nf90_nowrite, nf90_get_ var68 use netcdf, only: nf90_nowrite, nf90_get_att, nf90_noerr 60 69 61 70 ! Variables local to the procedure: … … 89 98 real, pointer:: o3_in(:, :, :) ! (n_lat, n_plev, 12 or 0:13) 90 99 ! (ozone climatology from the input file) 91 ! ("o3_in(j, l, month)" is at latitude "latitude(j)" and pressure 92 ! level "plev(l)". "month" is between 1 and 12 or between 0 and 13) 100 ! ("o3_in(j, k, l)" is at latitude "latitude(j)" and pressure 101 ! level "plev(k)". "l" is between 1 and 12 or between 0 and 13) 102 103 real missing_value 93 104 94 105 real, allocatable:: o3_regr_lat(:, :, :) ! (jjm + 1, n_plev, 0:13) … … 103 114 ! [- pi / 2, rlatv(jjm)] 104 115 ! respectively. 105 ! "o3_regr_lat(:, l, :)" is for pressure level "plev(l)".116 ! "o3_regr_lat(:, k, :)" is for pressure level "plev(k)". 106 117 ! Last dimension is month number.) 107 118 108 119 real, allocatable:: o3_out(:, :, :) ! (jjm + 1, n_plev, 360) 109 120 ! (regridded ozone climatology) 110 ! ("o3_out(j, l, day)" is at latitude "rlatu(j)", pressure111 ! level "plev( l)" and date "January 1st 0h" + "tmidday(day)", in a121 ! ("o3_out(j, k, l)" is at latitude "rlatu(j)", pressure 122 ! level "plev(k)" and date "January 1st 0h" + "tmidday(l)", in a 112 123 ! 360-day calendar.) 113 124 114 integer j 115 integer varid_in, varid_out, varid_plev, varid_time, varid ! (for NetCDF) 116 117 real, parameter:: tmidmonth(0:13) = (/(-15. + 30. * j, j = 0, 13)/) 125 integer j, k, l 126 127 ! For NetCDF: 128 integer varid_in, varid_out, varid_plev, varid_time, varid, ncerr 129 130 real, parameter:: tmidmonth(0:13) = (/(-15. + 30. * l, l = 0, 13)/) 118 131 ! (time to middle of month, in days since January 1st 0h, in a 119 132 ! 360-day calendar) … … 121 134 ! interpolated between the December and the January value.) 122 135 123 real, parameter:: tmidday(360) = (/( j + 0.5, j= 0, 359)/)136 real, parameter:: tmidday(360) = (/(l + 0.5, l = 0, 359)/) 124 137 ! (time to middle of day, in days since January 1st 0h, in a 125 138 ! 360-day calendar) … … 175 188 if (desc_plev) o3_in = o3_in(:, n_plev:1:-1, :) 176 189 190 ncerr = nf90_get_att(ncid_in, varid_in, "missing_value", missing_value) 191 if (ncerr == nf90_noerr) then 192 do l = 1, size(o3_in, 3) 193 do j = 1, n_lat 194 ! Find missing values, starting from top of atmosphere 195 ! and going down. 196 ! We assume that the highest level contains no missing value. 197 k = 2 198 do 199 if (o3_in(j, k, l) == missing_value .or. k == n_plev) exit 200 k = k + 1 201 end do 202 ! Replace missing values with the valid value at the 203 ! lowest level above missing values: 204 if (o3_in(j, k, l) == missing_value) & 205 o3_in(j, k:n_plev, l) = o3_in(j, k-1, l) 206 end do 207 end do 208 else 209 print *, "regr_lat_time_climoz: no missing value attribute" 210 end if 211 177 212 call nf95_close(ncid_in) 178 213
Note: See TracChangeset
for help on using the changeset viewer.