Changeset 697 for trunk/LMDZ.MARS/libf/phymars/surfini.F
- Timestamp:
- Jun 6, 2012, 10:56:42 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/surfini.F
r669 r697 2 2 ! to use 'getin' 3 3 USE ioipsl_getincom 4 use netcdf 4 5 IMPLICIT NONE 5 6 c======================================================================= … … 20 21 21 22 #include "datafile.h" 22 #include "netcdf.inc"23 23 24 24 INTEGER ngrid,ig,icap,iq,alternate … … 57 57 58 58 REAL,SAVE :: min_icevalue = 500. 59 PARAMETERstring = 'thermal'59 character(len=50) :: string = 'thermal' 60 60 61 61 character (len=100) :: zedatafile … … 143 143 144 144 145 ierr =nf_open(trim(zedatafile)//'/surface.nc',146 & NF _NOWRITE,nid)147 148 IF (ierr.NE.nf _noerr) THEN145 ierr=nf90_open(trim(zedatafile)//'/surface.nc', 146 & NF90_NOWRITE,nid) 147 148 IF (ierr.NE.nf90_noerr) THEN 149 149 write(*,*)'Error : cannot open file surface.nc ' 150 150 write(*,*)'(in phymars/surfini.F)' … … 159 159 160 160 161 ierr = NF_INQ_VARID(nid, string, nvarid)162 if (ierr.ne.nf _noerr) then163 write(*,*) ' datareadncerror, cannot find ',trim(string)161 ierr=nf90_inq_varid(nid, string, nvarid) 162 if (ierr.ne.nf90_noerr) then 163 write(*,*) 'surfini error, cannot find ',trim(string) 164 164 write(*,*) ' in file ',trim(zedatafile),'/surface.nc' 165 write(*,*)trim(nf90_strerror(ierr)) 165 166 stop 166 167 endif 167 #ifdef NC_DOUBLE 168 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zdata) 169 #else 170 ierr = NF_GET_VAR_REAL(nid, nvarid, zdata) 171 #endif 172 if (ierr.ne.nf_noerr) then 173 write(*,*) 'datareadnc: error failed loading ',trim(string) 168 169 ierr=nf90_get_var(nid, nvarid, zdata) 170 171 if (ierr.ne.nf90_noerr) then 172 write(*,*) 'surfini: error failed loading ',trim(string) 173 write(*,*)trim(nf90_strerror(ierr)) 174 174 stop 175 175 endif 176 176 177 177 178 ierr=nf _close(nid)178 ierr=nf90_close(nid) 179 179 180 180
Note: See TracChangeset
for help on using the changeset viewer.