Changeset 888 for trunk/LMDZ.TITAN/Tools


Ignore:
Timestamp:
Feb 18, 2013, 2:56:41 PM (12 years ago)
Author:
slebonnois
Message:

SL: small modifications to the tools, to Venus default .def files and to outputs (including forgotten modifications linked to the 1D); + bug corrections in phytitan

Location:
trunk/LMDZ.TITAN/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.TITAN/Tools/fft.F90

    r816 r888  
    208208! 2.1.1 Atmospheric temperature
    209209!===============================================================================
     210if (ok_out(4)) then
    210211allocate(temp(lonlength,latlength,altlength,timelength))
    211212
     
    216217  text="t"
    217218  call get_var4d(infid,lonlength,latlength,altlength,timelength,text,temp,ierr1,ierr2)
    218   if (ierr1.ne.NF_NOERR) stop "Error: Failed to get temperature ID"
    219 endif
    220 if (ierr2.ne.NF_NOERR) stop "Error: Failed reading temperature"
     219  if (ierr1.ne.NF_NOERR) then
     220    print*,"Error: Failed to get temperature ID"
     221    ok_out(4)=.false.
     222  endif
     223endif
     224if (ierr2.ne.NF_NOERR) then
     225  print*,"Error: Failed reading temperature"
     226  ok_out(4)=.false.
     227endif
     228endif !ok_out(4)
    221229
    222230!===============================================================================
    223231! 2.1.2 Winds
    224232!===============================================================================
     233! zonal wind vitu (in m/s)
     234if (ok_out(1)) then
    225235allocate(vitu(lonlength,latlength,altlength,timelength))
    226 allocate(vitv(lonlength,latlength,altlength,timelength))
    227 allocate(vitw(lonlength,latlength,altlength,timelength))
    228 
    229 ! zonal wind vitu (in m/s)
     236
    230237text="vitu"
    231238call get_var4d(infid,lonlength,latlength,altlength,timelength,text,vitu,ierr1,ierr2)
    232 if (ierr1.ne.NF_NOERR) stop "Error: Failed to get vitu ID"
    233 if (ierr2.ne.NF_NOERR) stop "Error: Failed reading zonal wind"
     239if (ierr1.ne.NF_NOERR) then
     240  print*,"Error: Failed to get vitu ID"
     241  ok_out(1)=.false.
     242endif
     243if (ierr2.ne.NF_NOERR) then
     244  print*,"Error: Failed reading zonal wind"
     245  ok_out(1)=.false.
     246endif
     247endif !ok_out(1)
    234248
    235249! meridional wind vitv (in m/s)
     250if (ok_out(2)) then
     251allocate(vitv(lonlength,latlength,altlength,timelength))
     252
    236253text="vitv"
    237254call get_var4d(infid,lonlength,latlength,altlength,timelength,text,vitv,ierr1,ierr2)
    238 if (ierr1.ne.NF_NOERR) stop "Error: Failed to get vitv ID"
    239 if (ierr2.ne.NF_NOERR) stop "Error: Failed reading meridional wind"
     255if (ierr1.ne.NF_NOERR) then
     256  print*,"Error: Failed to get vitv ID"
     257  ok_out(2)=.false.
     258endif
     259if (ierr2.ne.NF_NOERR) then
     260  print*,"Error: Failed reading meridional wind"
     261  ok_out(2)=.false.
     262endif
     263endif !ok_out(2)
    240264
    241265! vertical wind vitw (in Pa/s)
     266if (ok_out(3)) then
     267allocate(vitw(lonlength,latlength,altlength,timelength))
     268
    242269text="vitw"
    243270call get_var4d(infid,lonlength,latlength,altlength,timelength,text,vitw,ierr1,ierr2)
    244 if (ierr1.ne.NF_NOERR) stop "Error: Failed to get vitw ID"
    245 if (ierr2.ne.NF_NOERR) stop "Error: Failed reading vertical wind"
     271if (ierr1.ne.NF_NOERR) then
     272  print*,"Error: Failed to get vitw ID"
     273  ok_out(3)=.false.
     274endif
     275if (ierr2.ne.NF_NOERR) then
     276  print*,"Error: Failed reading vertical wind"
     277  ok_out(3)=.false.
     278endif
     279endif !ok_out(3)
    246280
    247281!===============================================================================
     
    256290! allocations
    257291!-------------
     292if (ok_out(1)) then
    258293allocate(fftau(lonlength,latlength,altlength,timelength))
     294allocate(uprim(lonlength,latlength,altlength,timelength))
     295allocate(ulf(lonlength,latlength,altlength,timelength))
     296allocate(ubf(lonlength,latlength,altlength,timelength))
     297allocate(uhf(lonlength,latlength,altlength,timelength))
     298endif !ok_out(1)
     299if (ok_out(2)) then
    259300allocate(fftav(lonlength,latlength,altlength,timelength))
     301allocate(vprim(lonlength,latlength,altlength,timelength))
     302allocate(vlf(lonlength,latlength,altlength,timelength))
     303allocate(vbf(lonlength,latlength,altlength,timelength))
     304allocate(vhf(lonlength,latlength,altlength,timelength))
     305endif !ok_out(2)
     306if (ok_out(3)) then
    260307allocate(fftaw(lonlength,latlength,altlength,timelength))
     308allocate(wprim(lonlength,latlength,altlength,timelength))
     309allocate(wlf(lonlength,latlength,altlength,timelength))
     310allocate(wbf(lonlength,latlength,altlength,timelength))
     311allocate(whf(lonlength,latlength,altlength,timelength))
     312endif !ok_out(3)
     313if (ok_out(4)) then
    261314allocate(fftaT(lonlength,latlength,altlength,timelength))
    262 allocate(uprim(lonlength,latlength,altlength,timelength))
    263 allocate(vprim(lonlength,latlength,altlength,timelength))
    264 allocate(wprim(lonlength,latlength,altlength,timelength))
    265315allocate(Tprim(lonlength,latlength,altlength,timelength))
    266 allocate(ulf(lonlength,latlength,altlength,timelength))
    267 allocate(vlf(lonlength,latlength,altlength,timelength))
    268 allocate(wlf(lonlength,latlength,altlength,timelength))
    269316allocate(Tlf(lonlength,latlength,altlength,timelength))
    270 allocate(ubf(lonlength,latlength,altlength,timelength))
    271 allocate(vbf(lonlength,latlength,altlength,timelength))
    272 allocate(wbf(lonlength,latlength,altlength,timelength))
    273317allocate(Tbf(lonlength,latlength,altlength,timelength))
    274 allocate(uhf(lonlength,latlength,altlength,timelength))
    275 allocate(vhf(lonlength,latlength,altlength,timelength))
    276 allocate(whf(lonlength,latlength,altlength,timelength))
    277318allocate(Thf(lonlength,latlength,altlength,timelength))
     319endif !ok_out(4)
    278320
    279321! lon,lat,alt
    280 allocate(umean(lonlength,latlength,altlength))
    281 allocate(vmean(lonlength,latlength,altlength))
    282 allocate(wmean(lonlength,latlength,altlength))
    283 allocate(Tmean(lonlength,latlength,altlength))
     322if (ok_out(1)) allocate(umean(lonlength,latlength,altlength))
     323if (ok_out(2)) allocate(vmean(lonlength,latlength,altlength))
     324if (ok_out(3)) allocate(wmean(lonlength,latlength,altlength))
     325if (ok_out(4)) allocate(Tmean(lonlength,latlength,altlength))
    284326
    285327! time / frequencies
     
    298340!-----------------
    299341
    300 call moytim(lonlength,latlength,altlength,timelength,miss_val,vitu,umean)
    301 call moytim(lonlength,latlength,altlength,timelength,miss_val,vitv,vmean)
    302 call moytim(lonlength,latlength,altlength,timelength,miss_val,vitw,wmean)
    303 call moytim(lonlength,latlength,altlength,timelength,miss_val,temp,Tmean)
     342if (ok_out(1)) call moytim(lonlength,latlength,altlength,timelength,miss_val,vitu,umean)
     343if (ok_out(2)) call moytim(lonlength,latlength,altlength,timelength,miss_val,vitv,vmean)
     344if (ok_out(3)) call moytim(lonlength,latlength,altlength,timelength,miss_val,vitw,wmean)
     345if (ok_out(4)) call moytim(lonlength,latlength,altlength,timelength,miss_val,temp,Tmean)
    304346
    305347do ilon=1,lonlength
     
    307349  do ilev=1,altlength
    308350   do itim=1,timelength
     351if (ok_out(1)) then
    309352    if ((vitu(ilon,ilat,ilev,itim).ne.miss_val).and. &
    310353        (umean(ilon,ilat,ilev)    .ne.miss_val)) then
     
    313356  uprim(ilon,ilat,ilev,itim) = miss_val
    314357    endif
     358endif !ok_out(1)
     359if (ok_out(2)) then
    315360    if ((vitv(ilon,ilat,ilev,itim).ne.miss_val).and. &
    316361        (vmean(ilon,ilat,ilev)    .ne.miss_val)) then
     
    319364  vprim(ilon,ilat,ilev,itim) = miss_val
    320365    endif
     366endif !ok_out(2)
     367if (ok_out(3)) then
    321368    if ((vitw(ilon,ilat,ilev,itim).ne.miss_val).and. &
    322369        (wmean(ilon,ilat,ilev)    .ne.miss_val)) then
     
    325372  wprim(ilon,ilat,ilev,itim) = miss_val
    326373    endif
     374endif !ok_out(3)
     375if (ok_out(4)) then
    327376    if ((temp(ilon,ilat,ilev,itim).ne.miss_val).and. &
    328377        (Tmean(ilon,ilat,ilev)    .ne.miss_val)) then
     
    331380  Tprim(ilon,ilat,ilev,itim) = miss_val
    332381    endif
     382endif !ok_out(4)
    333383   enddo
    334384  enddo
     
    743793datashape1d   =time_dimid2
    744794
     795call write_var1d(outfid2,datashape1d,timelength,&
     796                "freq      ", "FFT frequencies     ","s-1       ",miss_val,&
     797                 freq )
     798
    745799call write_var4d(outfid2,datashape4d,lonlength,latlength,altlength,timelength,&
    746800                 "fftav     ", "FFT ampl of vitv    ","m s-1     ",miss_val,&
     
    768822datashape1d   =time_dimid3
    769823
     824call write_var1d(outfid3,datashape1d,timelength,&
     825                "freq      ", "FFT frequencies     ","s-1       ",miss_val,&
     826                 freq )
     827
    770828call write_var4d(outfid3,datashape4d,lonlength,latlength,altlength,timelength,&
    771829                 "fftaw     ", "FFT ampl of vitw    ","Pa s-1    ",miss_val,&
     
    793851datashape1d   =time_dimid4
    794852
     853call write_var1d(outfid4,datashape1d,timelength,&
     854                "freq      ", "FFT frequencies     ","s-1       ",miss_val,&
     855                 freq )
     856
    795857call write_var4d(outfid4,datashape4d,lonlength,latlength,altlength,timelength,&
    796858                 "fftaT     ", "FFT ampl of temp    ","K         ",miss_val,&
  • trunk/LMDZ.TITAN/Tools/filter.h

    r816 r888  
    1111
    1212! Choice of output files:
    13 !                                            (U,     V,      W,     T)
    14  logical,dimension(4),parameter :: ok_out=(/.true.,.true.,.false.,.true./)
     13!                                  (U,     V,      W,     T)
     14 logical,dimension(4) :: ok_out=(/.true.,.true.,.false.,.true./)
    1515
Note: See TracChangeset for help on using the changeset viewer.