Changeset 980 for trunk/LMDZ.TITAN/Tools


Ignore:
Timestamp:
Jun 6, 2013, 2:41:55 PM (11 years ago)
Author:
slebonnois
Message:

SL: encore une correction sur psi.F90 (posttraitement Venus, Titan)

File:
1 edited

Legend:

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

    r975 r980  
    169169
    170170allocate(za(lonlength,latlength,altlength,timelength))
     171! present only in _P regrided files
     172! For others, using geop/g0
    171173
    172174text="zareoid"
    173175call get_var4d(infid,lonlength,latlength,altlength,timelength,text,za,ierr1,ierr2)
    174 if (ierr1.ne.NF_NOERR) stop "Error: Failed to get za ID"
    175 if (ierr2.ne.NF_NOERR) stop "Error: Failed reading zareoid"
     176if (ierr1.ne.NF_NOERR) then
     177  write(*,*) "  looking for geop instead... "
     178  text="geop"
     179  call get_var4d(infid,lonlength,latlength,altlength,timelength,text,za,ierr1,ierr2)
     180  if (ierr1.ne.NF_NOERR) stop "Error: Failed to get geop ID"
     181do itim=1,timelength
     182do ilon=1,lonlength
     183 do ilat=1,latlength
     184  do ilev=1,altlength
     185    if (za(ilon,ilat,ilev,itim).ne.miss_val) then
     186        za(ilon,ilat,ilev,itim) = za(ilon,ilat,ilev,itim)/(g0*1000.) ! in km
     187    else
     188        za(ilon,ilat,ilev,itim) = miss_val
     189    endif
     190  enddo
     191 enddo
     192enddo
     193enddo
     194endif
     195if (ierr2.ne.NF_NOERR) stop "Error: Failed reading zareoid/geop"
    176196
    177197!===============================================================================
Note: See TracChangeset for help on using the changeset viewer.