- Timestamp:
- Sep 5, 2001, 6:11:26 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ.3.3/branches/rel-LF/libf/bibio/writephys.F90
r266 r272 51 51 integer,dimension(:), pointer :: reg_index 52 52 end type profils 53 type (profils), dimension(nb_prof_max ), save :: var_profs53 type (profils), dimension(nb_prof_max, nb_files_max), save :: var_profs 54 54 55 55 ! liste des variables par fichier … … 87 87 ! Declaration des parametres d'entree 88 88 integer :: nid_file 89 character (len=30) :: nom_fichier89 character*(*) :: nom_fichier 90 90 integer :: iim, jjm, llm, klon 91 91 real, dimension(iim) :: rlon … … 105 105 if (first_call) then 106 106 hist_files(:)%define = .true. 107 var_profs(: )%freq_wri = -999107 var_profs(:,:)%freq_wri = -999 108 108 hist_files(:)%nitau = 1 109 109 first_call= .false. … … 152 152 !########################################################################### 153 153 ! 154 SUBROUTINE writephy_def(profil_n, var_op, freq_op, freq_wri, zsize, & 154 SUBROUTINE writephy_def(profil_n, nid_file, & 155 & var_op, freq_op, freq_wri, zsize, & 155 156 & reg_size, reg_index) 156 157 ! … … 160 161 ! Parametres d'entree 161 162 ! profil_n numero du profil-type 163 ! nid_file numero de fichier 162 164 ! var_op operation a effectuer sur la variable 163 165 ! freq_op frequence de l'operation … … 168 170 ! 169 171 integer :: profil_n 170 character (len = 6) :: var_op 172 integer :: nid_file 173 character*(*) :: var_op 171 174 real :: freq_op, freq_wri 172 175 integer :: zsize … … 188 191 call abort_gcm(modname, message, 1) 189 192 endif 190 if (var_profs(profil_n )%freq_wri /= -999) then193 if (var_profs(profil_n, nid_file)%freq_wri /= -999) then 191 194 message = 'numero de profil deja attribue' 192 195 call abort_gcm(modname, message, 1) … … 195 198 ! Remplissage structure infos 196 199 ! 197 var_profs(profil_n )%var_op = var_op198 var_profs(profil_n )%freq_op = freq_op199 var_profs(profil_n )%freq_wri = freq_wri200 var_profs(profil_n )%zsize = zsize200 var_profs(profil_n, nid_file)%var_op = var_op 201 var_profs(profil_n, nid_file)%freq_op = freq_op 202 var_profs(profil_n, nid_file)%freq_wri = freq_wri 203 var_profs(profil_n, nid_file)%zsize = zsize 201 204 ! 202 205 ! test pour region … … 207 210 call abort_gcm(modname, message, 1) 208 211 endif 209 allocate(var_profs(profil_n )%reg_index(reg_size), stat = error)212 allocate(var_profs(profil_n, nid_file)%reg_index(reg_size), stat = error) 210 213 if (error /= 0) then 211 214 message='Pb allocation reg_index' 212 215 call abort_gcm(modname,message,1) 213 216 endif 214 var_profs(profil_n )%reg_size = reg_size215 var_profs(profil_n )%reg_index = reg_index(1:reg_size)217 var_profs(profil_n, nid_file)%reg_size = reg_size 218 var_profs(profil_n, nid_file)%reg_index = reg_index(1:reg_size) 216 219 else 217 220 dummy_size = 1 218 allocate(var_profs(profil_n )%reg_index(dummy_size), stat = error)221 allocate(var_profs(profil_n, nid_file)%reg_index(dummy_size), stat = error) 219 222 if (error /= 0) then 220 223 message='Pb allocation reg_index' 221 224 call abort_gcm(modname,message,1) 222 225 endif 223 var_profs(profil_n )%reg_size = dummy_size224 var_profs(profil_n )%reg_index = 0226 var_profs(profil_n, nid_file)%reg_size = dummy_size 227 var_profs(profil_n, nid_file)%reg_index = 0 225 228 endif 226 229 227 230 write(nulou,*)' Definition du profil de variable numero ', profil_n 228 write(nulou,*)' operation ',var_profs(profil_n)%var_op 229 write(nulou,*)' frequence d''operation ',var_profs(profil_n)%freq_op 230 write(nulou,*)' frequence d''ecriture ',var_profs(profil_n)%freq_wri 231 write(nulou,*)' 2D/3D ',var_profs(profil_n)%zsize 232 write(nulou,*)' taille de la region ',var_profs(profil_n)%reg_size 231 write(nulou,*)' du fichier ', nid_file 232 write(nulou,*)' operation ', & 233 & var_profs(profil_n, nid_file)%var_op 234 write(nulou,*)' frequence d''operation ', & 235 & var_profs(profil_n, nid_file)%freq_op 236 write(nulou,*)' frequence d''ecriture ', & 237 & var_profs(profil_n, nid_file)%freq_wri 238 write(nulou,*)' 2D/3D ', & 239 & var_profs(profil_n, nid_file)%zsize 240 write(nulou,*)' taille de la region ', & 241 & var_profs(profil_n, nid_file)%reg_size 233 242 234 243 END SUBROUTINE writephy_def … … 253 262 254 263 integer :: file, iprof 255 character (len=10):: var_name264 character*(*) :: var_name 256 265 real, dimension(*) :: data 257 character (len=40):: var_title258 character (len=20):: var_units266 character*(*) :: var_title 267 character*(*) :: var_units 259 268 ! 260 269 ! variables locales 261 270 ! 262 271 integer :: i, error 263 character (len=6) :: var_op272 character (len=6) :: var_op 264 273 real :: freq_op, freq_wri 265 274 integer :: file_id, isize, jsize, lsize, phy_lon, zsize … … 290 299 nhori = hist_files(file)%nhori 291 300 klon = hist_files(file)%phy_lon 292 var_op = var_profs(iprof )%var_op293 freq_op = var_profs(iprof )%freq_op294 freq_wri = var_profs(iprof )%freq_wri295 if (var_profs(iprof )%zsize == 0) then301 var_op = var_profs(iprof, file)%var_op 302 freq_op = var_profs(iprof, file)%freq_op 303 freq_wri = var_profs(iprof, file)%freq_wri 304 if (var_profs(iprof, file)%zsize == 0) then 296 305 lsize = 1 297 306 nvert = -99 … … 316 325 jsize = hist_files(file)%jsize 317 326 nhori = hist_files(file)%nhori 318 var_op = var_profs(iprof )%var_op319 freq_op = var_profs(iprof )%freq_op320 freq_wri = var_profs(iprof )%freq_wri327 var_op = var_profs(iprof, file)%var_op 328 freq_op = var_profs(iprof, file)%freq_op 329 freq_wri = var_profs(iprof, file)%freq_wri 321 330 nitau = hist_files(file)%nitau 322 331 323 if (var_profs(iprof )%zsize == 0) then332 if (var_profs(iprof, file)%zsize == 0) then 324 333 lsize = 1 325 334 else … … 336 345 call gr_fi_ecrit(lsize, klon, isize, jsize, data, temp_data) 337 346 call histwrite(file_id, var_name,nitau,temp_data, & 338 & var_profs(iprof)%reg_size,var_profs(iprof)%reg_index) 347 & var_profs(iprof, file)%reg_size, & 348 & var_profs(iprof, file)%reg_index) 339 349 340 350 return
Note: See TracChangeset
for help on using the changeset viewer.