Changeset 360 for trunk/LMDZ.MARS/util/zrecast.F90
- Timestamp:
- Nov 8, 2011, 3:14:39 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/util/zrecast.F90
r281 r360 101 101 real,dimension(:,:,:,:),allocatable :: press ! GCM atmospheric pressure 102 102 real,dimension(:,:,:,:),allocatable :: temp ! GCM atmospheric temperature 103 real,dimension(:,:,:,:),allocatable :: teta ! GCM atmospheric potential temperature 103 104 real,dimension(:,:,:,:),allocatable :: rho ! GCM atmospheric density 104 105 real,dimension(:,:,:,:),allocatable :: za_gcm ! GCM above areoid levels (m) … … 773 774 endif 774 775 776 allocate(teta(lonlength,latlength,altlength,timelength),stat=ierr) 777 if (ierr.ne.0) then 778 write(*,*) "Error: Failed to allocate teta(lonlength,latlength,altlength,timelength)" 779 write(*,*) " lonlength=",lonlength," latlength=",latlength 780 write(*,*) " altlength=",altlength," timelength=",timelength 781 stop 782 endif 783 784 775 785 ierr=NF_INQ_VARID(infid,"temp",tmpvarid) 776 786 if (ierr.ne.NF_NOERR) then … … 779 789 ierr=NF_INQ_VARID(infid,"t",tmpvarid) 780 790 if (ierr.ne.NF_NOERR) then 781 stop "Error: Failed to get t ID" 782 else 783 ierr=NF_GET_VAR_REAL(infid,tmpvarid,temp) 784 if (ierr.ne.NF_NOERR) then 785 stop "Error: Failed reading atmospheric temperature" 786 endif 791 ierr=NF_INQ_VARID(infid,"teta",tmpvarid) 792 if (ierr.ne.NF_NOERR) then 793 stop "Error: Failed to get t or teta ID" 794 endif 795 ierr=NF_GET_VAR_REAL(infid,tmpvarid,teta) 796 if (ierr.ne.NF_NOERR) then 797 stop "Error: Failed reading atmospheric temperature" 798 endif 799 800 do itim=1,timelength 801 do ilev=1,altlength 802 do ilat=1,latlength 803 do ilon=1,lonlength 804 temp(ilon,ilat,ilev,itim)=teta(ilon,ilat,ilev,itim)*(press(ilon,ilat,ilev,itim)/ps(ilon,ilat,itim))**(.256793) 805 enddo 806 enddo 807 enddo 808 enddo 809 787 810 endif 788 811 else
Note: See TracChangeset
for help on using the changeset viewer.