Changeset 4254 for LMDZ6/trunk/libf/dyn3d
- Timestamp:
- Sep 20, 2022, 4:09:49 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/dyn3d/guide_mod.F90
r4253 r4254 1082 1082 SUBROUTINE guide_read(timestep) 1083 1083 1084 use netcdf, only: NF90_GET_VAR 1085 1084 1086 IMPLICIT NONE 1085 1087 … … 1293 1295 ! Coefs ap, bp pour calcul de la pression aux differents niveaux 1294 1296 if (guide_plevs.EQ.1) then 1295 #ifdef NC_DOUBLE 1296 status=NF_GET_VARA_DOUBLE(ncidpl,varidap,1,nlevnc,apnc) 1297 status=NF_GET_VARA_DOUBLE(ncidpl,varidbp,1,nlevnc,bpnc) 1298 #else 1299 status=NF_GET_VARA_REAL(ncidpl,varidap,1,nlevnc,apnc) 1300 status=NF_GET_VARA_REAL(ncidpl,varidbp,1,nlevnc,bpnc) 1301 #endif 1297 status=NF90_GET_VAR(ncidpl,varidap,apnc,[1],[nlevnc]) 1298 status=NF90_GET_VAR(ncidpl,varidbp,bpnc,[1],[nlevnc]) 1302 1299 ELSEIF (guide_plevs.EQ.0) THEN 1303 #ifdef NC_DOUBLE 1304 status=NF_GET_VARA_DOUBLE(ncidpl,varidpl,1,nlevnc,apnc) 1305 #else 1306 status=NF_GET_VARA_REAL(ncidpl,varidpl,1,nlevnc,apnc) 1307 #endif 1300 status=NF90_GET_VAR(ncidpl,varidpl,apnc,[1],[nlevnc]) 1308 1301 !FC Pour les corrections la pression est deja en Pascals on commente la ligne ci-dessous 1309 1302 IF(convert_Pa) apnc=apnc*100.! conversion en Pascals … … 1330 1323 ! Pression 1331 1324 if (guide_plevs.EQ.2) then 1332 #ifdef NC_DOUBLE 1333 status=NF_GET_VARA_DOUBLE(ncidp,varidp,start,count,pnat2) 1334 #else 1335 status=NF_GET_VARA_REAL(ncidp,varidp,start,count,pnat2) 1336 #endif 1325 status=NF90_GET_VAR(ncidp,varidp,pnat2,start,count) 1337 1326 IF (invert_y) THEN 1338 1327 ! PRINT*,"Invertion impossible actuellement" … … 1344 1333 ! Vent zonal 1345 1334 if (guide_u) then 1346 #ifdef NC_DOUBLE 1347 status=NF_GET_VARA_DOUBLE(ncidu,varidu,start,count,unat2) 1348 #else 1349 status=NF_GET_VARA_REAL(ncidu,varidu,start,count,unat2) 1350 #endif 1335 status=NF90_GET_VAR(ncidu,varidu,unat2,start,count) 1351 1336 IF (invert_y) THEN 1352 1337 CALL invert_lat(iip1,jjp1,nlevnc,unat2) … … 1356 1341 ! Temperature 1357 1342 if (guide_T) then 1358 #ifdef NC_DOUBLE 1359 status=NF_GET_VARA_DOUBLE(ncidt,varidt,start,count,tnat2) 1360 #else 1361 status=NF_GET_VARA_REAL(ncidt,varidt,start,count,tnat2) 1362 #endif 1343 status=NF90_GET_VAR(ncidt,varidt,tnat2,start,count) 1363 1344 IF (invert_y) THEN 1364 1345 CALL invert_lat(iip1,jjp1,nlevnc,tnat2) … … 1368 1349 ! Humidite 1369 1350 if (guide_Q) then 1370 #ifdef NC_DOUBLE 1371 status=NF_GET_VARA_DOUBLE(ncidQ,varidQ,start,count,qnat2) 1372 #else 1373 status=NF_GET_VARA_REAL(ncidQ,varidQ,start,count,qnat2) 1374 #endif 1351 status=NF90_GET_VAR(ncidQ,varidQ,qnat2,start,count) 1375 1352 IF (invert_y) THEN 1376 1353 CALL invert_lat(iip1,jjp1,nlevnc,qnat2) … … 1382 1359 if (guide_v) then 1383 1360 count(2)=jjm 1384 #ifdef NC_DOUBLE 1385 status=NF_GET_VARA_DOUBLE(ncidv,varidv,start,count,vnat2) 1386 #else 1387 status=NF_GET_VARA_REAL(ncidv,varidv,start,count,vnat2) 1388 #endif 1361 status=NF90_GET_VAR(ncidv,varidv,vnat2,start,count) 1389 1362 IF (invert_y) THEN 1390 1363 CALL invert_lat(iip1,jjm,nlevnc,vnat2) … … 1399 1372 count(3)=1 1400 1373 count(4)=0 1401 #ifdef NC_DOUBLE 1402 status=NF_GET_VARA_DOUBLE(ncidps,varidps,start,count,psnat2) 1403 #else 1404 status=NF_GET_VARA_REAL(ncidps,varidps,start,count,psnat2) 1405 #endif 1374 status=NF90_GET_VAR(ncidps,varidps,psnat2,start,count) 1406 1375 IF (invert_y) THEN 1407 1376 CALL invert_lat(iip1,jjp1,1,psnat2) … … 1413 1382 !======================================================================= 1414 1383 SUBROUTINE guide_read2D(timestep) 1384 1385 use netcdf, only: nf90_get_var 1415 1386 1416 1387 IMPLICIT NONE … … 1560 1531 ! Coefs ap, bp pour calcul de la pression aux differents niveaux 1561 1532 if (guide_plevs.EQ.1) then 1562 #ifdef NC_DOUBLE 1563 status=NF_GET_VARA_DOUBLE(ncidpl,varidap,1,nlevnc,apnc) 1564 status=NF_GET_VARA_DOUBLE(ncidpl,varidbp,1,nlevnc,bpnc) 1565 #else 1566 status=NF_GET_VARA_REAL(ncidpl,varidap,1,nlevnc,apnc) 1567 status=NF_GET_VARA_REAL(ncidpl,varidbp,1,nlevnc,bpnc) 1568 #endif 1533 status=NF90_GET_VAR(ncidpl,varidap,apnc,[1],[nlevnc]) 1534 status=NF90_GET_VAR(ncidpl,varidbp,bpnc,[1],[nlevnc]) 1569 1535 elseif (guide_plevs.EQ.0) THEN 1570 #ifdef NC_DOUBLE 1571 status=NF_GET_VARA_DOUBLE(ncidpl,varidpl,1,nlevnc,apnc) 1572 #else 1573 status=NF_GET_VARA_REAL(ncidpl,varidpl,1,nlevnc,apnc) 1574 #endif 1536 status=NF90_GET_VAR(ncidpl,varidpl,apnc,[1],[nlevnc]) 1575 1537 apnc=apnc*100.! conversion en Pascals 1576 1538 bpnc(:)=0. … … 1596 1558 ! Pression 1597 1559 if (guide_plevs.EQ.2) then 1598 #ifdef NC_DOUBLE 1599 status=NF_GET_VARA_DOUBLE(ncidp,varidp,start,count,zu) 1600 #else 1601 status=NF_GET_VARA_REAL(ncidp,varidp,start,count,zu) 1602 #endif 1560 status=NF90_GET_VAR(ncidp,varidp,zu,start,count) 1603 1561 DO i=1,iip1 1604 1562 pnat2(i,:,:)=zu(:,:) … … 1613 1571 ! Vent zonal 1614 1572 if (guide_u) then 1615 #ifdef NC_DOUBLE 1616 status=NF_GET_VARA_DOUBLE(ncidu,varidu,start,count,zu) 1617 #else 1618 status=NF_GET_VARA_REAL(ncidu,varidu,start,count,zu) 1619 #endif 1573 status=NF90_GET_VAR(ncidu,varidu,zu,start,count) 1620 1574 DO i=1,iip1 1621 1575 unat2(i,:,:)=zu(:,:) … … 1630 1584 ! Temperature 1631 1585 if (guide_T) then 1632 #ifdef NC_DOUBLE 1633 status=NF_GET_VARA_DOUBLE(ncidt,varidt,start,count,zu) 1634 #else 1635 status=NF_GET_VARA_REAL(ncidt,varidt,start,count,zu) 1636 #endif 1586 status=NF90_GET_VAR(ncidt,varidt,zu,start,count) 1637 1587 DO i=1,iip1 1638 1588 tnat2(i,:,:)=zu(:,:) … … 1647 1597 ! Humidite 1648 1598 if (guide_Q) then 1649 #ifdef NC_DOUBLE 1650 status=NF_GET_VARA_DOUBLE(ncidQ,varidQ,start,count,zu) 1651 #else 1652 status=NF_GET_VARA_REAL(ncidQ,varidQ,start,count,zu) 1653 #endif 1599 status=NF90_GET_VAR(ncidQ,varidQ,zu,start,count) 1654 1600 DO i=1,iip1 1655 1601 qnat2(i,:,:)=zu(:,:) … … 1665 1611 if (guide_v) then 1666 1612 count(2)=jjm 1667 #ifdef NC_DOUBLE 1668 status=NF_GET_VARA_DOUBLE(ncidv,varidv,start,count,zv) 1669 #else 1670 status=NF_GET_VARA_REAL(ncidv,varidv,start,count,zv) 1671 #endif 1613 status=NF90_GET_VAR(ncidv,varidv,zv,start,count) 1672 1614 DO i=1,iip1 1673 1615 vnat2(i,:,:)=zv(:,:) … … 1687 1629 count(3)=1 1688 1630 count(4)=0 1689 #ifdef NC_DOUBLE 1690 status=NF_GET_VARA_DOUBLE(ncidps,varidps,start,count,zu(:,1)) 1691 #else 1692 status=NF_GET_VARA_REAL(ncidps,varidps,start,count,zu(:,1)) 1693 #endif 1631 status=NF90_GET_VAR(ncidps,varidps,zu(:,1),start,count) 1694 1632 DO i=1,iip1 1695 1633 psnat2(i,:)=zu(:,1)
Note: See TracChangeset
for help on using the changeset viewer.