Changeset 1188 for LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar
- Timestamp:
- Jun 18, 2009, 5:50:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/guide_p_mod.F90
r1187 r1188 12 12 USE getparam 13 13 USE Write_Field_p 14 use netcdf, only: nf90_nowrite, nf90_open, nf90_inq_varid, nf90_close 14 15 15 16 IMPLICIT NONE … … 145 146 ncidpl=-99 146 147 if (guide_modele) then 147 if (ncidpl.eq.-99) ncidpl=NCOPN('apbp.nc',NCNOWRIT,rcod)148 if (ncidpl.eq.-99) rcod=nf90_open('apbp.nc',Nf90_NOWRITe, ncidpl) 148 149 else 149 150 if (guide_u) then 150 if (ncidpl.eq.-99) ncidpl=NCOPN('u.nc',NCNOWRIT,rcod)151 if (ncidpl.eq.-99) rcod=nf90_open('u.nc',Nf90_NOWRITe,ncidpl) 151 152 elseif (guide_v) then 152 if (ncidpl.eq.-99) ncidpl=NCOPN('v.nc',NCNOWRIT,rcod)153 if (ncidpl.eq.-99) rcod=nf90_open('v.nc',nf90_nowrite,ncidpl) 153 154 elseif (guide_T) then 154 if (ncidpl.eq.-99) ncidpl=NCOPN('T.nc',NCNOWRIT,rcod)155 if (ncidpl.eq.-99) rcod=nf90_open('T.nc',nf90_nowrite,ncidpl) 155 156 elseif (guide_Q) then 156 if (ncidpl.eq.-99) ncidpl=NCOPN('hur.nc',NCNOWRIT,rcod)157 if (ncidpl.eq.-99) rcod=nf90_open('hur.nc',nf90_nowrite, ncidpl) 157 158 endif 158 159 endif … … 165 166 error=NF_INQ_DIMLEN(ncidpl,rid,nlevnc) 166 167 print *,'Guide: nombre niveaux vert. nlevnc', nlevnc 167 CALL NCCLOS(ncidpl,rcod)168 rcod = nf90_close(ncidpl) 168 169 169 170 ! --------------------------------------------- … … 1071 1072 if (guide_modele) then 1072 1073 print *,'Lecture du guidage sur niveaux mod�le' 1073 ncidpl=NCOPN('apbp.nc',NCNOWRIT,rcode)1074 varidap=NCVID(ncidpl,'AP',rcode)1075 varidbp=NCVID(ncidpl,'BP',rcode)1074 rcode = nf90_open('apbp.nc', nf90_nowrite, ncidpl) 1075 rcode = nf90_inq_varid(ncidpl, 'AP', varidap) 1076 rcode = nf90_inq_varid(ncidpl, 'BP', varidbp) 1076 1077 print*,'ncidpl,varidap',ncidpl,varidap 1077 1078 endif 1078 1079 ! Vent zonal 1079 1080 if (guide_u) then 1080 ncidu=NCOPN('u.nc',NCNOWRIT,rcode)1081 varidu=NCVID(ncidu,'UWND',rcode)1081 rcode = nf90_open('u.nc', nf90_nowrite, ncidu) 1082 rcode = nf90_inq_varid(ncidu, 'UWND', varidu) 1082 1083 print*,'ncidu,varidu',ncidu,varidu 1083 1084 if (ncidpl.eq.-99) ncidpl=ncidu … … 1085 1086 ! Vent meridien 1086 1087 if (guide_v) then 1087 ncidv=NCOPN('v.nc',NCNOWRIT,rcode)1088 varidv=NCVID(ncidv,'VWND',rcode)1088 rcode = nf90_open('v.nc', nf90_nowrite, ncidv) 1089 rcode = nf90_inq_varid(ncidv, 'VWND', varidv) 1089 1090 print*,'ncidv,varidv',ncidv,varidv 1090 1091 if (ncidpl.eq.-99) ncidpl=ncidv … … 1092 1093 ! Temperature 1093 1094 if (guide_T) then 1094 ncidt=NCOPN('T.nc',NCNOWRIT,rcode)1095 varidt=NCVID(ncidt,'AIR',rcode)1095 rcode = nf90_open('T.nc', nf90_nowrite, ncidt) 1096 rcode = nf90_inq_varid(ncidt, 'AIR', varidt) 1096 1097 print*,'ncidT,varidT',ncidt,varidt 1097 1098 if (ncidpl.eq.-99) ncidpl=ncidt … … 1099 1100 ! Humidite 1100 1101 if (guide_Q) then 1101 ncidQ=NCOPN('hur.nc',NCNOWRIT,rcode)1102 varidQ=NCVID(ncidQ,'RH',rcode)1102 rcode = nf90_open('hur.nc', nf90_nowrite, ncidQ) 1103 rcode = nf90_inq_varid(ncidQ, 'RH', varidQ) 1103 1104 print*,'ncidQ,varidQ',ncidQ,varidQ 1104 1105 if (ncidpl.eq.-99) ncidpl=ncidQ … … 1106 1107 ! Pression de surface 1107 1108 if ((guide_P).OR.(guide_modele)) then 1108 ncidps=NCOPN('ps.nc',NCNOWRIT,rcode)1109 varidps=NCVID(ncidps,'SP',rcode)1109 rcode = nf90_open('ps.nc', nf90_nowrite, ncidps) 1110 rcode = nf90_inq_varid(ncidps, 'SP', varidps) 1110 1111 print*,'ncidps,varidps',ncidps,varidps 1111 1112 endif 1112 1113 ! Coordonnee verticale 1113 1114 if (.not.guide_modele) then 1114 rcode =NF_INQ_VARID(ncidpl,'LEVEL',varidpl)1115 IF (rcode.NE.0) rcode =NF_INQ_VARID(ncidpl,'PRESSURE',varidpl)1115 rcode = nf90_inq_varid(ncidpl, 'LEVEL', varidpl) 1116 IF (rcode.NE.0) rcode = nf90_inq_varid(ncidpl, 'PRESSURE', varidpl) 1116 1117 print*,'ncidpl,varidpl',ncidpl,varidpl 1117 1118 endif … … 1255 1256 if (guide_modele) then 1256 1257 print *,'Lecture du guidage sur niveaux mod�le' 1257 ncidpl=NCOPN('apbp.nc',NCNOWRIT,rcode)1258 varidap=NCVID(ncidpl,'AP',rcode)1259 varidbp=NCVID(ncidpl,'BP',rcode)1258 rcode = nf90_open('apbp.nc', nf90_nowrite, ncidpl) 1259 rcode = nf90_inq_varid(ncidpl, 'AP', varidap) 1260 rcode = nf90_inq_varid(ncidpl, 'BP', varidbp) 1260 1261 print*,'ncidpl,varidap',ncidpl,varidap 1261 1262 endif 1262 1263 ! Vent zonal 1263 1264 if (guide_u) then 1264 ncidu=NCOPN('u.nc',NCNOWRIT,rcode)1265 varidu=NCVID(ncidu,'UWND',rcode)1265 rcode = nf90_open('u.nc', nf90_nowrite, ncidu) 1266 rcode = nf90_inq_varid(ncidu, 'UWND', varidu) 1266 1267 print*,'ncidu,varidu',ncidu,varidu 1267 1268 if (ncidpl.eq.-99) ncidpl=ncidu … … 1269 1270 ! Vent meridien 1270 1271 if (guide_v) then 1271 ncidv=NCOPN('v.nc',NCNOWRIT,rcode)1272 varidv=NCVID(ncidv,'VWND',rcode)1272 rcode = nf90_open('v.nc', nf90_nowrite, ncidv) 1273 rcode = nf90_inq_varid(ncidv, 'VWND', varidv) 1273 1274 print*,'ncidv,varidv',ncidv,varidv 1274 1275 if (ncidpl.eq.-99) ncidpl=ncidv … … 1276 1277 ! Temperature 1277 1278 if (guide_T) then 1278 ncidt=NCOPN('T.nc',NCNOWRIT,rcode)1279 varidt=NCVID(ncidt,'AIR',rcode)1279 rcode = nf90_open('T.nc', nf90_nowrite, ncidt) 1280 rcode = nf90_inq_varid(ncidt, 'AIR', varidt) 1280 1281 print*,'ncidT,varidT',ncidt,varidt 1281 1282 if (ncidpl.eq.-99) ncidpl=ncidt … … 1283 1284 ! Humidite 1284 1285 if (guide_Q) then 1285 ncidQ=NCOPN('hur.nc',NCNOWRIT,rcode)1286 varidQ=NCVID(ncidQ,'RH',rcode)1286 rcode = nf90_open('hur.nc', nf90_nowrite, ncidQ) 1287 rcode = nf90_inq_varid(ncidQ, 'RH', varidQ) 1287 1288 print*,'ncidQ,varidQ',ncidQ,varidQ 1288 1289 if (ncidpl.eq.-99) ncidpl=ncidQ … … 1290 1291 ! Pression de surface 1291 1292 if ((guide_P).OR.(guide_modele)) then 1292 ncidps=NCOPN('ps.nc',NCNOWRIT,rcode)1293 varidps=NCVID(ncidps,'SP',rcode)1293 rcode = nf90_open('ps.nc', nf90_nowrite, ncidps) 1294 rcode = nf90_inq_varid(ncidps, 'SP', varidps) 1294 1295 print*,'ncidps,varidps',ncidps,varidps 1295 1296 endif 1296 1297 ! Coordonnee verticale 1297 1298 if (.not.guide_modele) then 1298 rcode =NF_INQ_VARID(ncidpl,'LEVEL',varidpl)1299 IF (rcode.NE.0) rcode =NF_INQ_VARID(ncidpl,'PRESSURE',varidpl)1299 rcode = nf90_inq_varid(ncidpl, 'LEVEL', varidpl) 1300 IF (rcode.NE.0) rcode = nf90_inq_varid(ncidpl, 'PRESSURE', varidpl) 1300 1301 print*,'ncidpl,varidpl',ncidpl,varidpl 1301 1302 endif
Note: See TracChangeset
for help on using the changeset viewer.