Changeset 1902 for LMDZ5/trunk/libf/dyn3dmem
- Timestamp:
- Nov 19, 2013, 12:40:39 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/dyn3dmem/guide_loc_mod.F90
r1848 r1902 156 156 ncidpl=-99 157 157 if (guide_plevs.EQ.1) then 158 if (ncidpl.eq.-99) rcod=nf90_open('apbp.nc',Nf90_NOWRITe, ncidpl) 158 if (ncidpl.eq.-99) then 159 rcod=nf90_open('apbp.nc',Nf90_NOWRITe, ncidpl) 160 if (rcod.NE.NF_NOERR) THEN 161 print *,'Guide: probleme -> pas de fichier apbp.nc' 162 CALL abort_gcm(modname,abort_message,1) 163 endif 164 endif 159 165 elseif (guide_plevs.EQ.2) then 160 if (ncidpl.EQ.-99) rcod=nf90_open('P.nc',Nf90_NOWRITe,ncidpl) 166 if (ncidpl.EQ.-99) then 167 rcod=nf90_open('P.nc',Nf90_NOWRITe,ncidpl) 168 if (rcod.NE.NF_NOERR) THEN 169 print *,'Guide: probleme -> pas de fichier P.nc' 170 CALL abort_gcm(modname,abort_message,1) 171 endif 172 endif 161 173 elseif (guide_u) then 162 if (ncidpl.eq.-99) rcod=nf90_open('u.nc',Nf90_NOWRITe,ncidpl) 174 if (ncidpl.eq.-99) then 175 rcod=nf90_open('u.nc',Nf90_NOWRITe,ncidpl) 176 if (rcod.NE.NF_NOERR) THEN 177 print *,'Guide: probleme -> pas de fichier u.nc' 178 CALL abort_gcm(modname,abort_message,1) 179 endif 180 endif 163 181 elseif (guide_v) then 164 if (ncidpl.eq.-99) rcod=nf90_open('v.nc',nf90_nowrite,ncidpl) 182 if (ncidpl.eq.-99) then 183 rcod=nf90_open('v.nc',nf90_nowrite,ncidpl) 184 if (rcod.NE.NF_NOERR) THEN 185 print *,'Guide: probleme -> pas de fichier v.nc' 186 CALL abort_gcm(modname,abort_message,1) 187 endif 188 endif 165 189 elseif (guide_T) then 166 if (ncidpl.eq.-99) rcod=nf90_open('T.nc',nf90_nowrite,ncidpl) 190 if (ncidpl.eq.-99) then 191 rcod=nf90_open('T.nc',nf90_nowrite,ncidpl) 192 if (rcod.NE.NF_NOERR) THEN 193 print *,'Guide: probleme -> pas de fichier T.nc' 194 CALL abort_gcm(modname,abort_message,1) 195 endif 196 endif 167 197 elseif (guide_Q) then 168 if (ncidpl.eq.-99) rcod=nf90_open('hur.nc',nf90_nowrite, ncidpl) 198 if (ncidpl.eq.-99) then 199 rcod=nf90_open('hur.nc',nf90_nowrite, ncidpl) 200 if (rcod.NE.NF_NOERR) THEN 201 print *,'Guide: probleme -> pas de fichier hur.nc' 202 CALL abort_gcm(modname,abort_message,1) 203 endif 204 endif 169 205 endif 170 206 error=NF_INQ_DIMID(ncidpl,'LEVEL',rid) … … 1542 1578 print *,'Lecture du guidage sur niveaux modele' 1543 1579 rcode = nf90_open('apbp.nc', nf90_nowrite, ncidpl) 1580 IF (rcode.NE.NF_NOERR) THEN 1581 print *,'Guide: probleme -> pas de fichier apbp.nc' 1582 CALL abort_gcm(modname,abort_message,1) 1583 ENDIF 1544 1584 rcode = nf90_inq_varid(ncidpl, 'AP', varidap) 1585 IF (rcode.NE.NF_NOERR) THEN 1586 print *,'Guide: probleme -> pas de variable AP, fichier apbp.nc' 1587 CALL abort_gcm(modname,abort_message,1) 1588 ENDIF 1545 1589 rcode = nf90_inq_varid(ncidpl, 'BP', varidbp) 1590 IF (rcode.NE.NF_NOERR) THEN 1591 print *,'Guide: probleme -> pas de variable BP, fichier apbp.nc' 1592 CALL abort_gcm(modname,abort_message,1) 1593 ENDIF 1546 1594 print*,'ncidpl,varidap',ncidpl,varidap 1547 1595 endif … … 1549 1597 if (guide_plevs.EQ.2) then 1550 1598 rcode = nf90_open('P.nc', nf90_nowrite, ncidp) 1599 IF (rcode.NE.NF_NOERR) THEN 1600 print *,'Guide: probleme -> pas de fichier P.nc' 1601 CALL abort_gcm(modname,abort_message,1) 1602 ENDIF 1551 1603 rcode = nf90_inq_varid(ncidp, 'PRES', varidp) 1604 IF (rcode.NE.NF_NOERR) THEN 1605 print *,'Guide: probleme -> pas de variable PRES, fichier P.nc' 1606 CALL abort_gcm(modname,abort_message,1) 1607 ENDIF 1552 1608 print*,'ncidp,varidp',ncidp,varidp 1553 1609 if (ncidpl.eq.-99) ncidpl=ncidp … … 1556 1612 if (guide_u) then 1557 1613 rcode = nf90_open('u.nc', nf90_nowrite, ncidu) 1614 IF (rcode.NE.NF_NOERR) THEN 1615 print *,'Guide: probleme -> pas de fichier u.nc' 1616 CALL abort_gcm(modname,abort_message,1) 1617 ENDIF 1558 1618 rcode = nf90_inq_varid(ncidu, 'UWND', varidu) 1619 IF (rcode.NE.NF_NOERR) THEN 1620 print *,'Guide: probleme -> pas de variable UWND, fichier u.nc' 1621 CALL abort_gcm(modname,abort_message,1) 1622 ENDIF 1559 1623 print*,'ncidu,varidu',ncidu,varidu 1560 1624 if (ncidpl.eq.-99) ncidpl=ncidu … … 1563 1627 if (guide_v) then 1564 1628 rcode = nf90_open('v.nc', nf90_nowrite, ncidv) 1629 IF (rcode.NE.NF_NOERR) THEN 1630 print *,'Guide: probleme -> pas de fichier v.nc' 1631 CALL abort_gcm(modname,abort_message,1) 1632 ENDIF 1565 1633 rcode = nf90_inq_varid(ncidv, 'VWND', varidv) 1634 IF (rcode.NE.NF_NOERR) THEN 1635 print *,'Guide: probleme -> pas de variable VWND, fichier v.nc' 1636 CALL abort_gcm(modname,abort_message,1) 1637 ENDIF 1566 1638 print*,'ncidv,varidv',ncidv,varidv 1567 1639 if (ncidpl.eq.-99) ncidpl=ncidv … … 1570 1642 if (guide_T) then 1571 1643 rcode = nf90_open('T.nc', nf90_nowrite, ncidt) 1644 IF (rcode.NE.NF_NOERR) THEN 1645 print *,'Guide: probleme -> pas de fichier T.nc' 1646 CALL abort_gcm(modname,abort_message,1) 1647 ENDIF 1572 1648 rcode = nf90_inq_varid(ncidt, 'AIR', varidt) 1649 IF (rcode.NE.NF_NOERR) THEN 1650 print *,'Guide: probleme -> pas de variable AIR, fichier T.nc' 1651 CALL abort_gcm(modname,abort_message,1) 1652 ENDIF 1573 1653 print*,'ncidT,varidT',ncidt,varidt 1574 1654 if (ncidpl.eq.-99) ncidpl=ncidt … … 1577 1657 if (guide_Q) then 1578 1658 rcode = nf90_open('hur.nc', nf90_nowrite, ncidQ) 1659 IF (rcode.NE.NF_NOERR) THEN 1660 print *,'Guide: probleme -> pas de fichier hur.nc' 1661 CALL abort_gcm(modname,abort_message,1) 1662 ENDIF 1579 1663 rcode = nf90_inq_varid(ncidQ, 'RH', varidQ) 1664 IF (rcode.NE.NF_NOERR) THEN 1665 print *,'Guide: probleme -> pas de variable RH, fichier hur.nc' 1666 CALL abort_gcm(modname,abort_message,1) 1667 ENDIF 1580 1668 print*,'ncidQ,varidQ',ncidQ,varidQ 1581 1669 if (ncidpl.eq.-99) ncidpl=ncidQ … … 1584 1672 if ((guide_P).OR.(guide_plevs.EQ.1)) then 1585 1673 rcode = nf90_open('ps.nc', nf90_nowrite, ncidps) 1674 IF (rcode.NE.NF_NOERR) THEN 1675 print *,'Guide: probleme -> pas de fichier ps.nc' 1676 CALL abort_gcm(modname,abort_message,1) 1677 ENDIF 1586 1678 rcode = nf90_inq_varid(ncidps, 'SP', varidps) 1679 IF (rcode.NE.NF_NOERR) THEN 1680 print *,'Guide: probleme -> pas de variable SP, fichier ps.nc' 1681 CALL abort_gcm(modname,abort_message,1) 1682 ENDIF 1587 1683 print*,'ncidps,varidps',ncidps,varidps 1588 1684 endif … … 1766 1862 print *,'Lecture du guidage sur niveaux mod�le' 1767 1863 rcode = nf90_open('apbp.nc', nf90_nowrite, ncidpl) 1864 IF (rcode.NE.NF_NOERR) THEN 1865 print *,'Guide: probleme -> pas de fichier apbp.nc' 1866 CALL abort_gcm(modname,abort_message,1) 1867 ENDIF 1768 1868 rcode = nf90_inq_varid(ncidpl, 'AP', varidap) 1869 IF (rcode.NE.NF_NOERR) THEN 1870 print *,'Guide: probleme -> pas de variable AP, fichier apbp.nc' 1871 CALL abort_gcm(modname,abort_message,1) 1872 ENDIF 1769 1873 rcode = nf90_inq_varid(ncidpl, 'BP', varidbp) 1874 IF (rcode.NE.NF_NOERR) THEN 1875 print *,'Guide: probleme -> pas de variable BP, fichier apbp.nc' 1876 CALL abort_gcm(modname,abort_message,1) 1877 ENDIF 1770 1878 print*,'ncidpl,varidap',ncidpl,varidap 1771 1879 endif … … 1773 1881 if (guide_plevs.EQ.2) then 1774 1882 rcode = nf90_open('P.nc', nf90_nowrite, ncidp) 1883 IF (rcode.NE.NF_NOERR) THEN 1884 print *,'Guide: probleme -> pas de fichier P.nc' 1885 CALL abort_gcm(modname,abort_message,1) 1886 ENDIF 1775 1887 rcode = nf90_inq_varid(ncidp, 'PRES', varidp) 1888 IF (rcode.NE.NF_NOERR) THEN 1889 print *,'Guide: probleme -> pas de variable PRES, fichier P.nc' 1890 CALL abort_gcm(modname,abort_message,1) 1891 ENDIF 1776 1892 print*,'ncidp,varidp',ncidp,varidp 1777 1893 if (ncidpl.eq.-99) ncidpl=ncidp … … 1780 1896 if (guide_u) then 1781 1897 rcode = nf90_open('u.nc', nf90_nowrite, ncidu) 1898 IF (rcode.NE.NF_NOERR) THEN 1899 print *,'Guide: probleme -> pas de fichier u.nc' 1900 CALL abort_gcm(modname,abort_message,1) 1901 ENDIF 1782 1902 rcode = nf90_inq_varid(ncidu, 'UWND', varidu) 1903 IF (rcode.NE.NF_NOERR) THEN 1904 print *,'Guide: probleme -> pas de variable UWND, fichier u.nc' 1905 CALL abort_gcm(modname,abort_message,1) 1906 ENDIF 1783 1907 print*,'ncidu,varidu',ncidu,varidu 1784 1908 if (ncidpl.eq.-99) ncidpl=ncidu … … 1787 1911 if (guide_v) then 1788 1912 rcode = nf90_open('v.nc', nf90_nowrite, ncidv) 1913 IF (rcode.NE.NF_NOERR) THEN 1914 print *,'Guide: probleme -> pas de fichier v.nc' 1915 CALL abort_gcm(modname,abort_message,1) 1916 ENDIF 1789 1917 rcode = nf90_inq_varid(ncidv, 'VWND', varidv) 1918 IF (rcode.NE.NF_NOERR) THEN 1919 print *,'Guide: probleme -> pas de variable VWND, fichier v.nc' 1920 CALL abort_gcm(modname,abort_message,1) 1921 ENDIF 1790 1922 print*,'ncidv,varidv',ncidv,varidv 1791 1923 if (ncidpl.eq.-99) ncidpl=ncidv … … 1794 1926 if (guide_T) then 1795 1927 rcode = nf90_open('T.nc', nf90_nowrite, ncidt) 1928 IF (rcode.NE.NF_NOERR) THEN 1929 print *,'Guide: probleme -> pas de fichier T.nc' 1930 CALL abort_gcm(modname,abort_message,1) 1931 ENDIF 1796 1932 rcode = nf90_inq_varid(ncidt, 'AIR', varidt) 1933 IF (rcode.NE.NF_NOERR) THEN 1934 print *,'Guide: probleme -> pas de variable AIR, fichier T.nc' 1935 CALL abort_gcm(modname,abort_message,1) 1936 ENDIF 1797 1937 print*,'ncidT,varidT',ncidt,varidt 1798 1938 if (ncidpl.eq.-99) ncidpl=ncidt … … 1801 1941 if (guide_Q) then 1802 1942 rcode = nf90_open('hur.nc', nf90_nowrite, ncidQ) 1943 IF (rcode.NE.NF_NOERR) THEN 1944 print *,'Guide: probleme -> pas de fichier hur.nc' 1945 CALL abort_gcm(modname,abort_message,1) 1946 ENDIF 1803 1947 rcode = nf90_inq_varid(ncidQ, 'RH', varidQ) 1948 IF (rcode.NE.NF_NOERR) THEN 1949 print *,'Guide: probleme -> pas de variable RH, fichier hur.nc' 1950 CALL abort_gcm(modname,abort_message,1) 1951 ENDIF 1804 1952 print*,'ncidQ,varidQ',ncidQ,varidQ 1805 1953 if (ncidpl.eq.-99) ncidpl=ncidQ … … 1808 1956 if ((guide_P).OR.(guide_plevs.EQ.1)) then 1809 1957 rcode = nf90_open('ps.nc', nf90_nowrite, ncidps) 1958 IF (rcode.NE.NF_NOERR) THEN 1959 print *,'Guide: probleme -> pas de fichier ps.nc' 1960 CALL abort_gcm(modname,abort_message,1) 1961 ENDIF 1810 1962 rcode = nf90_inq_varid(ncidps, 'SP', varidps) 1963 IF (rcode.NE.NF_NOERR) THEN 1964 print *,'Guide: probleme -> pas de variable SP, fichier ps.nc' 1965 CALL abort_gcm(modname,abort_message,1) 1966 ENDIF 1811 1967 print*,'ncidps,varidps',ncidps,varidps 1812 1968 endif
Note: See TracChangeset
for help on using the changeset viewer.