Changeset 1188 for LMDZ4/branches/LMDZ4-dev/libf/dyn3d
- Timestamp:
- Jun 18, 2009, 5:50:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/guide_mod.F90
r1187 r1188 11 11 USE getparam 12 12 USE Write_Field 13 use netcdf, only: nf90_nowrite, nf90_open, nf90_inq_varid, nf90_close 13 14 14 15 IMPLICIT NONE … … 140 141 ncidpl=-99 141 142 if (guide_modele) then 142 if (ncidpl.eq.-99) ncidpl=NCOPN('apbp.nc',NCNOWRIT,rcod)143 if (ncidpl.eq.-99) rcod=nf90_open('apbp.nc',Nf90_NOWRITe, ncidpl) 143 144 else 144 145 if (guide_u) then 145 if (ncidpl.eq.-99) ncidpl=NCOPN('u.nc',NCNOWRIT,rcod)146 if (ncidpl.eq.-99) rcod=nf90_open('u.nc',Nf90_NOWRITe,ncidpl) 146 147 elseif (guide_v) then 147 if (ncidpl.eq.-99) ncidpl=NCOPN('v.nc',NCNOWRIT,rcod)148 if (ncidpl.eq.-99) rcod=nf90_open('v.nc',nf90_nowrite,ncidpl) 148 149 elseif (guide_T) then 149 if (ncidpl.eq.-99) ncidpl=NCOPN('T.nc',NCNOWRIT,rcod)150 if (ncidpl.eq.-99) rcod=nf90_open('T.nc',nf90_nowrite,ncidpl) 150 151 elseif (guide_Q) then 151 if (ncidpl.eq.-99) ncidpl=NCOPN('hur.nc',NCNOWRIT,rcod)152 if (ncidpl.eq.-99) rcod=nf90_open('hur.nc',nf90_nowrite, ncidpl) 152 153 endif 153 154 endif … … 160 161 error=NF_INQ_DIMLEN(ncidpl,rid,nlevnc) 161 162 print *,'Guide: nombre niveaux vert. nlevnc', nlevnc 162 CALL NCCLOS(ncidpl,rcod)163 rcod = nf90_close(ncidpl) 163 164 164 165 ! --------------------------------------------- … … 992 993 if (guide_modele) then 993 994 print *,'Lecture du guidage sur niveaux mod�le' 994 ncidpl=NCOPN('apbp.nc',NCNOWRIT,rcode)995 varidap=NCVID(ncidpl,'AP',rcode)996 varidbp=NCVID(ncidpl,'BP',rcode)995 rcode = nf90_open('apbp.nc', nf90_nowrite, ncidpl) 996 rcode = nf90_inq_varid(ncidpl, 'AP', varidap) 997 rcode = nf90_inq_varid(ncidpl, 'BP', varidbp) 997 998 print*,'ncidpl,varidap',ncidpl,varidap 998 999 endif 999 1000 ! Vent zonal 1000 1001 if (guide_u) then 1001 ncidu=NCOPN('u.nc',NCNOWRIT,rcode)1002 varidu=NCVID(ncidu,'UWND',rcode)1002 rcode = nf90_open('u.nc', nf90_nowrite, ncidu) 1003 rcode = nf90_inq_varid(ncidu, 'UWND', varidu) 1003 1004 print*,'ncidu,varidu',ncidu,varidu 1004 1005 if (ncidpl.eq.-99) ncidpl=ncidu … … 1006 1007 ! Vent meridien 1007 1008 if (guide_v) then 1008 ncidv=NCOPN('v.nc',NCNOWRIT,rcode)1009 varidv=NCVID(ncidv,'VWND',rcode)1009 rcode = nf90_open('v.nc', nf90_nowrite, ncidv) 1010 rcode = nf90_inq_varid(ncidv, 'VWND', varidv) 1010 1011 print*,'ncidv,varidv',ncidv,varidv 1011 1012 if (ncidpl.eq.-99) ncidpl=ncidv … … 1013 1014 ! Temperature 1014 1015 if (guide_T) then 1015 ncidt=NCOPN('T.nc',NCNOWRIT,rcode)1016 varidt=NCVID(ncidt,'AIR',rcode)1016 rcode = nf90_open('T.nc', nf90_nowrite, ncidt) 1017 rcode = nf90_inq_varid(ncidt, 'AIR', varidt) 1017 1018 print*,'ncidT,varidT',ncidt,varidt 1018 1019 if (ncidpl.eq.-99) ncidpl=ncidt … … 1020 1021 ! Humidite 1021 1022 if (guide_Q) then 1022 ncidQ=NCOPN('hur.nc',NCNOWRIT,rcode)1023 varidQ=NCVID(ncidQ,'RH',rcode)1023 rcode = nf90_open('hur.nc', nf90_nowrite, ncidQ) 1024 rcode = nf90_inq_varid(ncidQ, 'RH', varidQ) 1024 1025 print*,'ncidQ,varidQ',ncidQ,varidQ 1025 1026 if (ncidpl.eq.-99) ncidpl=ncidQ … … 1027 1028 ! Pression de surface 1028 1029 if ((guide_P).OR.(guide_modele)) then 1029 ncidps=NCOPN('ps.nc',NCNOWRIT,rcode)1030 varidps=NCVID(ncidps,'SP',rcode)1030 rcode = nf90_open('ps.nc', nf90_nowrite, ncidps) 1031 rcode = nf90_inq_varid(ncidps, 'SP', varidps) 1031 1032 print*,'ncidps,varidps',ncidps,varidps 1032 1033 endif 1033 1034 ! Coordonnee verticale 1034 1035 if (.not.guide_modele) then 1035 rcode =NF_INQ_VARID(ncidpl,'LEVEL',varidpl)1036 IF (rcode.NE.0) rcode =NF_INQ_VARID(ncidpl,'PRESSURE',varidpl)1036 rcode = nf90_inq_varid(ncidpl, 'LEVEL', varidpl) 1037 IF (rcode.NE.0) rcode = nf90_inq_varid(ncidpl, 'PRESSURE', varidpl) 1037 1038 print*,'ncidpl,varidpl',ncidpl,varidpl 1038 1039 endif … … 1175 1176 if (guide_modele) then 1176 1177 print *,'Lecture du guidage sur niveaux mod�le' 1177 ncidpl=NCOPN('apbp.nc',NCNOWRIT,rcode)1178 varidap=NCVID(ncidpl,'AP',rcode)1179 varidbp=NCVID(ncidpl,'BP',rcode)1178 rcode = nf90_open('apbp.nc', nf90_nowrite, ncidpl) 1179 rcode = nf90_inq_varid(ncidpl, 'AP', varidap) 1180 rcode = nf90_inq_varid(ncidpl, 'BP', varidbp) 1180 1181 print*,'ncidpl,varidap',ncidpl,varidap 1181 1182 endif 1182 1183 ! Vent zonal 1183 1184 if (guide_u) then 1184 ncidu=NCOPN('u.nc',NCNOWRIT,rcode)1185 varidu=NCVID(ncidu,'UWND',rcode)1185 rcode = nf90_open('u.nc', nf90_nowrite, ncidu) 1186 rcode = nf90_inq_varid(ncidu, 'UWND', varidu) 1186 1187 print*,'ncidu,varidu',ncidu,varidu 1187 1188 if (ncidpl.eq.-99) ncidpl=ncidu … … 1189 1190 ! Vent meridien 1190 1191 if (guide_v) then 1191 ncidv=NCOPN('v.nc',NCNOWRIT,rcode)1192 varidv=NCVID(ncidv,'VWND',rcode)1192 rcode = nf90_open('v.nc', nf90_nowrite, ncidv) 1193 rcode = nf90_inq_varid(ncidv, 'VWND', varidv) 1193 1194 print*,'ncidv,varidv',ncidv,varidv 1194 1195 if (ncidpl.eq.-99) ncidpl=ncidv … … 1196 1197 ! Temperature 1197 1198 if (guide_T) then 1198 ncidt=NCOPN('T.nc',NCNOWRIT,rcode)1199 varidt=NCVID(ncidt,'AIR',rcode)1199 rcode = nf90_open('T.nc', nf90_nowrite, ncidt) 1200 rcode = nf90_inq_varid(ncidt, 'AIR', varidt) 1200 1201 print*,'ncidT,varidT',ncidt,varidt 1201 1202 if (ncidpl.eq.-99) ncidpl=ncidt … … 1203 1204 ! Humidite 1204 1205 if (guide_Q) then 1205 ncidQ=NCOPN('hur.nc',NCNOWRIT,rcode)1206 varidQ=NCVID(ncidQ,'RH',rcode)1206 rcode = nf90_open('hur.nc', nf90_nowrite, ncidQ) 1207 rcode = nf90_inq_varid(ncidQ, 'RH', varidQ) 1207 1208 print*,'ncidQ,varidQ',ncidQ,varidQ 1208 1209 if (ncidpl.eq.-99) ncidpl=ncidQ … … 1210 1211 ! Pression de surface 1211 1212 if ((guide_P).OR.(guide_modele)) then 1212 ncidps=NCOPN('ps.nc',NCNOWRIT,rcode)1213 varidps=NCVID(ncidps,'SP',rcode)1213 rcode = nf90_open('ps.nc', nf90_nowrite, ncidps) 1214 rcode = nf90_inq_varid(ncidps, 'SP', varidps) 1214 1215 print*,'ncidps,varidps',ncidps,varidps 1215 1216 endif 1216 1217 ! Coordonnee verticale 1217 1218 if (.not.guide_modele) then 1218 rcode =NF_INQ_VARID(ncidpl,'LEVEL',varidpl)1219 IF (rcode.NE.0) rcode =NF_INQ_VARID(ncidpl,'PRESSURE',varidpl)1219 rcode = nf90_inq_varid(ncidpl, 'LEVEL', varidpl) 1220 IF (rcode.NE.0) rcode = nf90_inq_varid(ncidpl, 'PRESSURE', varidpl) 1220 1221 print*,'ncidpl,varidpl',ncidpl,varidpl 1221 1222 endif
Note: See TracChangeset
for help on using the changeset viewer.