- Timestamp:
- 10/23/08 12:17:05 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
IOIPSL/trunk/src/histcom.f90
r427 r429 12 12 USE fliocom, ONLY : flio_dom_file,flio_dom_att 13 13 USE calendar 14 USE errioipsl, ONLY : ipslerr 14 USE errioipsl, ONLY : ipslerr,ipsldbg 15 15 !- 16 16 IMPLICIT NONE … … 236 236 INTEGER,INTENT(IN),OPTIONAL :: domain_id 237 237 !- 238 LOGICAL :: check = .FALSE.239 !-240 238 REAL,ALLOCATABLE,DIMENSION(:,:) :: lon_tmp,lat_tmp 241 !--------------------------------------------------------------------- 242 IF (check) WRITE(*,*) "histbeg_totreg" 239 LOGICAL :: l_dbg 240 !--------------------------------------------------------------------- 241 CALL ipsldbg (old_status=l_dbg) 242 !- 243 IF (l_dbg) WRITE(*,*) "histbeg_totreg" 243 244 !- 244 245 ALLOCATE (lon_tmp(pim,pjm),lat_tmp(pim,pjm)) … … 328 329 CHARACTER(LEN=30) :: timenow 329 330 LOGICAL :: rectilinear 330 !- 331 LOGICAL :: check = .FALSE. 332 !--------------------------------------------------------------------- 331 LOGICAL :: l_dbg 332 !--------------------------------------------------------------------- 333 CALL ipsldbg (old_status=l_dbg) 334 !- 333 335 nb_files = nb_files+1 334 336 pfileid = nb_files … … 336 338 ! 1.0 Transfering into the common for future use 337 339 !- 338 IF ( check) WRITE(*,*) "histbeg_regular 1.0"340 IF (l_dbg) WRITE(*,*) "histbeg_regular 1.0" 339 341 !- 340 342 itau0(pfileid) = pitau0 … … 350 352 ! 2.0 Initializes all variables for this file 351 353 !- 352 IF ( check) WRITE(*,*) "histbeg_regular 2.0"354 IF (l_dbg) WRITE(*,*) "histbeg_regular 2.0" 353 355 !- 354 356 IF (nb_files > nb_files_max) THEN … … 368 370 ! 3.0 Opening netcdf file and defining dimensions 369 371 !- 370 IF ( check) WRITE(*,*) "histbeg_regular 3.0"372 IF (l_dbg) WRITE(*,*) "histbeg_regular 3.0" 371 373 !- 372 374 ! Add DOMAIN number and ".nc" suffix in file name if needed … … 387 389 ! 4.0 Declaring the geographical coordinates and other attributes 388 390 !- 389 IF ( check) WRITE(*,*) "histbeg_regular 4.0"391 IF (l_dbg) WRITE(*,*) "histbeg_regular 4.0" 390 392 !- 391 393 ! 4.3 Global attributes … … 400 402 ! 5.0 Saving some important information on this file in the common 401 403 !- 402 IF ( check) WRITE(*,*) "histbeg_regular 5.0"404 IF (l_dbg) WRITE(*,*) "histbeg_regular 5.0" 403 405 !- 404 406 IF (PRESENT(domain_id)) THEN … … 476 478 CHARACTER(LEN=120) :: file 477 479 CHARACTER(LEN=30) :: timenow 478 !- 479 LOGICAL :: check = .FALSE. 480 !--------------------------------------------------------------------- 480 LOGICAL :: l_dbg 481 !--------------------------------------------------------------------- 482 CALL ipsldbg (old_status=l_dbg) 483 !- 481 484 nb_files = nb_files+1 482 485 pfileid = nb_files … … 484 487 ! 1.0 Transfering into the common for future use 485 488 !- 486 IF ( check) WRITE(*,*) "histbeg_irregular 1.0"489 IF (l_dbg) WRITE(*,*) "histbeg_irregular 1.0" 487 490 !- 488 491 itau0(pfileid) = pitau0 … … 492 495 ! 2.0 Initializes all variables for this file 493 496 !- 494 IF ( check) WRITE(*,*) "histbeg_irregular 2.0"497 IF (l_dbg) WRITE(*,*) "histbeg_irregular 2.0" 495 498 !- 496 499 IF (nb_files > nb_files_max) THEN … … 510 513 ! 3.0 Opening netcdf file and defining dimensions 511 514 !- 512 IF ( check) WRITE(*,*) "histbeg_irregular 3.0"515 IF (l_dbg) WRITE(*,*) "histbeg_irregular 3.0" 513 516 !- 514 517 ! Add DOMAIN number and ".nc" suffix in file name if needed … … 524 527 ! 4.0 Declaring the geographical coordinates and other attributes 525 528 !- 526 IF ( check) WRITE(*,*) "histbeg_irregular 4.0"529 IF (l_dbg) WRITE(*,*) "histbeg_irregular 4.0" 527 530 !- 528 531 ! 4.3 Global attributes … … 537 540 ! 5.0 Saving some important information on this file in the common 538 541 !- 539 IF ( check) WRITE(*,*) "histbeg_irregular 5.0"542 IF (l_dbg) WRITE(*,*) "histbeg_irregular 5.0" 540 543 !- 541 544 IF (PRESENT(domain_id)) THEN … … 602 605 INTEGER :: iret,ncid 603 606 LOGICAL :: rectilinear 604 !- 605 LOGICAL :: check = .FALSE. 606 !--------------------------------------------------------------------- 607 LOGICAL :: l_dbg 608 !--------------------------------------------------------------------- 609 CALL ipsldbg (old_status=l_dbg) 607 610 !- 608 611 ! 1.0 Check that all fits in the buffers … … 624 627 ! 1.1 Create all the variables needed 625 628 !- 626 IF ( check) WRITE(*,*) "histhori_regular 1.0"629 IF (l_dbg) WRITE(*,*) "histhori_regular 1.0" 627 630 !- 628 631 ncid = ncdf_ids(pfileid) … … 660 663 ! 2.0 Longitude 661 664 !- 662 IF ( check) WRITE(*,*) "histhori_regular 2.0"665 IF (l_dbg) WRITE(*,*) "histhori_regular 2.0" 663 666 !- 664 667 IF (rectilinear) THEN … … 681 684 ! 3.0 Latitude 682 685 !- 683 IF ( check) WRITE(*,*) "histhori_regular 3.0"686 IF (l_dbg) WRITE(*,*) "histhori_regular 3.0" 684 687 !- 685 688 IF (rectilinear) THEN … … 704 707 ! 4.0 storing the geographical coordinates 705 708 !- 706 IF ( check) WRITE(*,*) "histhori_regular 4.0"709 IF (l_dbg) WRITE(*,*) "histhori_regular 4.0" 707 710 !- 708 711 orix = slab_ori(pfileid,1) … … 778 781 LOGICAL :: transp = .FALSE. 779 782 REAL,ALLOCATABLE,DIMENSION(:,:) :: bounds_trans 780 !- 781 LOGICAL :: check = .FALSE. 782 !--------------------------------------------------------------------- 783 LOGICAL :: l_dbg 784 !--------------------------------------------------------------------- 785 CALL ipsldbg (old_status=l_dbg) 783 786 !- 784 787 ! 1.0 Check that all fits in the buffers … … 794 797 ! 1.1 Create all the variables needed 795 798 !- 796 IF ( check) WRITE(*,*) 'histhori_irregular 1.0'799 IF (l_dbg) WRITE(*,*) 'histhori_irregular 1.0' 797 800 !- 798 801 ncid = ncdf_ids(pfileid) … … 842 845 ! 2.0 Longitude 843 846 !- 844 IF ( check) WRITE(*,*) "histhori_irregular 2.0"847 IF (l_dbg) WRITE(*,*) "histhori_irregular 2.0" 845 848 !- 846 849 iret = NF90_DEF_VAR (ncid,lon_name,NF90_FLOAT,dims(1:ndim),nlonid) … … 864 867 ! 3.0 Latitude 865 868 !- 866 IF ( check) WRITE(*,*) "histhori_irregular 3.0"869 IF (l_dbg) WRITE(*,*) "histhori_irregular 3.0" 867 870 !- 868 871 iret = NF90_DEF_VAR (ncid,lat_name,NF90_FLOAT,dims(1:ndim),nlatid) … … 888 891 ! 4.0 storing the geographical coordinates 889 892 !- 890 IF ( check) WRITE(*,*) "histhori_irregular 4.0"893 IF (l_dbg) WRITE(*,*) "histhori_irregular 4.0" 891 894 !- 892 895 ! 4.1 Write the longitude … … 960 963 CHARACTER(LEN=20) :: direction 961 964 INTEGER :: iret,leng,ncid 962 LOGICAL :: check = .FALSE. 963 !--------------------------------------------------------------------- 965 LOGICAL :: l_dbg 966 !--------------------------------------------------------------------- 967 CALL ipsldbg (old_status=l_dbg) 964 968 !- 965 969 ! 1.0 Verifications : … … 967 971 ! Is the name already in use ? 968 972 !- 969 IF ( check) WRITE(*,*) "histvert : 1.0 Verifications", &973 IF (l_dbg) WRITE(*,*) "histvert : 1.0 Verifications", & 970 974 & pzaxname,'---',pzaxunit,'---',pzaxtitle 971 975 !- … … 1018 1022 ! 2.0 Add the information to the file 1019 1023 !- 1020 IF ( check) &1024 IF (l_dbg) & 1021 1025 & WRITE(*,*) "histvert : 2.0 Add the information to the file" 1022 1026 !- … … 1051 1055 !- 3.0 add the information to the common 1052 1056 !- 1053 IF ( check) &1057 IF (l_dbg) & 1054 1058 & WRITE(*,*) "histvert : 3.0 add the information to the common" 1055 1059 !- … … 1132 1136 REAL :: tmp_scal(nbopp_max),un_an,un_jour,test_fopp,test_fwrt 1133 1137 INTEGER :: pos,buff_sz 1134 !- 1135 LOGICAL :: check = .FALSE. 1136 !--------------------------------------------------------------------- 1138 LOGICAL :: l_dbg 1139 !--------------------------------------------------------------------- 1140 CALL ipsldbg (old_status=l_dbg) 1141 !- 1137 1142 ex_topps = 'ave, inst, t_min, t_max, t_sum, once, never, l_max, l_min' 1138 1143 !- … … 1150 1155 ! and verify that it does not already exist 1151 1156 !- 1152 IF ( check) WRITE(*,*) "histdef : 1.0"1157 IF (l_dbg) WRITE(*,*) "histdef : 1.0" 1153 1158 !- 1154 1159 IF (iv > 1) THEN … … 1196 1201 ! 2.0 Put the size of the variable in the common and check 1197 1202 !- 1198 IF ( check) &1203 IF (l_dbg) & 1199 1204 & WRITE(*,*) "histdef : 2.0",pfileid,iv,nbopp(pfileid,iv), & 1200 1205 & sopps(pfileid,iv,1:nbopp(pfileid,iv)), & … … 1291 1296 ! If it is instantaneous output then we do not use the buffer 1292 1297 !- 1293 IF ( check) WRITE(*,*) "histdef : 3.0"1298 IF (l_dbg) WRITE(*,*) "histdef : 3.0" 1294 1299 !- 1295 1300 ! 3.1 We get the size of the arrays histwrite will get and check … … 1306 1311 point(pfileid,iv) = buff_pos+1 1307 1312 buff_pos = buff_pos+buff_sz 1308 IF ( check) THEN1313 IF (l_dbg) THEN 1309 1314 WRITE(*,*) "histdef : 3.2 bufpos for iv = ",iv, & 1310 1315 & " pfileid = ",pfileid," is = ",point(pfileid,iv) … … 1317 1322 ! The strategy is to bring it back to seconds for the tests 1318 1323 !- 1319 IF ( check) WRITE(*,*) "histdef : 4.0"1324 IF (l_dbg) WRITE(*,*) "histdef : 4.0" 1320 1325 !- 1321 1326 freq_opp(pfileid,iv) = pfreq_opp … … 1401 1406 ! 5.0 Initialize other variables of the common 1402 1407 !- 1403 IF ( check) WRITE(*,*) "histdef : 5.0"1408 IF (l_dbg) WRITE(*,*) "histdef : 5.0" 1404 1409 !- 1405 1410 hist_wrt_rng(pfileid,iv) = (PRESENT(var_range)) … … 1427 1432 ! 6.0 Get the time axis for this variable 1428 1433 !- 1429 IF ( check) WRITE(*,*) "histdef : 6.0"1434 IF (l_dbg) WRITE(*,*) "histdef : 6.0" 1430 1435 !- 1431 1436 IF (freq_wrt(pfileid,iv) > 0) THEN … … 1453 1458 ENDIF 1454 1459 ELSE 1455 IF ( check) WRITE(*,*) "histdef : 7.0 ",TRIM(tmp_topp),'----'1460 IF (l_dbg) WRITE(*,*) "histdef : 7.0 ",TRIM(tmp_topp),'----' 1456 1461 var_axid(pfileid,iv) = -99 1457 1462 ENDIF … … 1496 1501 & 'JUL','AUG','SEP','OCT','NOV','DEC' /) 1497 1502 CHARACTER(LEN=7) :: tmp_opp 1498 !- 1499 LOGICAL :: check = .FALSE. 1500 !--------------------------------------------------------------------- 1503 LOGICAL :: l_dbg 1504 !--------------------------------------------------------------------- 1505 CALL ipsldbg (old_status=l_dbg) 1506 !- 1501 1507 ncid = ncdf_ids(pfileid) 1502 1508 !- 1503 1509 ! 1.0 Create the time axes 1504 1510 !- 1505 IF ( check) WRITE(*,*) "histend : 1.0"1511 IF (l_dbg) WRITE(*,*) "histend : 1.0" 1506 1512 !--- 1507 1513 iret = NF90_DEF_DIM (ncid,'time_counter',NF90_UNLIMITED,tid(pfileid)) … … 1567 1573 ! 2.0 declare the variables 1568 1574 !- 1569 IF ( check) WRITE(*,*) "histend : 2.0"1575 IF (l_dbg) WRITE(*,*) "histend : 2.0" 1570 1576 !- 1571 1577 DO iv=1,nb_var(pfileid) … … 1595 1601 ELSE 1596 1602 ndim = dim_cnt+2 1597 dims(dim_cnt+1:dim_cnt+2) = (/ zax_ids(pfileid,ziv),tid(pfileid)/)1603 dims(dim_cnt+1:dim_cnt+2) = (/zax_ids(pfileid,ziv),tid(pfileid)/) 1598 1604 ENDIF 1599 1605 ELSE … … 1657 1663 assoc = TRIM(str30)//' '//TRIM(assoc) 1658 1664 !- 1659 IF ( check) THEN1665 IF (l_dbg) THEN 1660 1666 WRITE(*,*) "histend : 2.0.n, freq_opp, freq_wrt", & 1661 1667 & freq_opp(pfileid,iv),freq_wrt(pfileid,iv) … … 1679 1685 ! 3.0 Put the netcdf file into write mode 1680 1686 !- 1681 IF ( check) WRITE(*,*) "histend : 3.0"1687 IF (l_dbg) WRITE(*,*) "histend : 3.0" 1682 1688 !- 1683 1689 iret = NF90_ENDDEF (ncid) … … 1685 1691 ! 4.0 Give some informations to the user 1686 1692 !- 1687 IF ( check) WRITE(*,*) "histend : 4.0"1693 IF (l_dbg) WRITE(*,*) "histend : 4.0" 1688 1694 !- 1689 1695 WRITE(str70,'("All variables have been initialized on file :",I3)') pfileid … … 1752 1758 CHARACTER(LEN=7) :: tmp_opp 1753 1759 CHARACTER(LEN=13) :: c_nam 1754 !- 1755 LOGICAL :: check = .FALSE. 1756 !--------------------------------------------------------------------- 1760 LOGICAL :: l_dbg 1761 !--------------------------------------------------------------------- 1762 CALL ipsldbg (old_status=l_dbg) 1763 !- 1757 1764 l1d=PRESENT(pdata_1d); l2d=PRESENT(pdata_2d); l3d=PRESENT(pdata_3d); 1758 1765 IF (l1d) THEN … … 1865 1872 !- 1866 1873 IF (.NOT.ALLOCATED(buff_tmp)) THEN 1867 IF ( check) THEN1874 IF (l_dbg) THEN 1868 1875 WRITE(*,*) & 1869 1876 & c_nam//" : allocate buff_tmp for buff_sz = ", & … … 1873 1880 buff_tmp_sz = datasz_max(pfileid,varid) 1874 1881 ELSE IF (datasz_max(pfileid,varid) > buff_tmp_sz) THEN 1875 IF ( check) THEN1882 IF (l_dbg) THEN 1876 1883 WRITE(*,*) & 1877 1884 & c_nam//" : re-allocate buff_tmp for buff_sz = ", & … … 1944 1951 REAL,ALLOCATABLE,SAVE :: buffer_used(:) 1945 1952 INTEGER,SAVE :: buffer_sz 1946 !- 1947 LOGICAL :: check = .FALSE. 1948 !--------------------------------------------------------------------- 1949 IF (check) THEN 1950 WRITE(*,*) "histwrite 0.0 : VAR : ",name(pfileid,varid) 1953 LOGICAL :: l_dbg 1954 !--------------------------------------------------------------------- 1955 CALL ipsldbg (old_status=l_dbg) 1956 !- 1957 IF (l_dbg) THEN 1958 WRITE(*,*) "histwrite 0.0 : VAR : ",name(pfileid,varid) 1951 1959 WRITE(*,*) "histwrite 0.0 : nbindex,nindex :", & 1952 1960 & nbindex,nindex(1:MIN(3,nbindex)),'...',nindex(MAX(1,nbindex-3):nbindex) 1953 1961 ENDIF 1954 1962 !- 1955 1963 ! The sizes which can be encoutered 1956 1964 !- 1957 tsz = zsize(pfileid,varid,1)*zsize(pfileid,varid,2)*zsize(pfileid,varid,3) 1965 tsz = zsize(pfileid,varid,1) & 1966 & *zsize(pfileid,varid,2) & 1967 & *zsize(pfileid,varid,3) 1958 1968 !- 1959 1969 ! 1.0 We allocate the memory needed to store the data between write … … 1962 1972 !- 1963 1973 IF (.NOT. ALLOCATED(buffer)) THEN 1964 IF ( check) WRITE(*,*) "histwrite_real 1.0 allocate buffer ",buff_pos1974 IF (l_dbg) WRITE(*,*) "histwrite_real 1.0 allocate buffer ",buff_pos 1965 1975 ALLOCATE(buffer(buff_pos)) 1966 1976 buffer_sz = buff_pos 1967 1977 buffer(:)=0.0 1968 1978 ELSE IF (buffer_sz < buff_pos) THEN 1969 IF (check) WRITE(*,*) "histwrite_real 1.0.1 re-allocate buffer for ",buff_pos," instead of ",SIZE(buffer) 1979 IF (l_dbg) THEN 1980 WRITE(*,*) "histwrite_real 1.0.1 re-allocate buffer for ", & 1981 & buff_pos," instead of ",SIZE(buffer) 1982 ENDIF 1970 1983 IF (SUM(buffer)/=0.0) THEN 1971 IF (check) WRITE (*,*) ' histwrite : buffer has been used. We have to save it before re-allocating it ' 1984 IF (l_dbg) WRITE (*,*) 'histwrite : buffer has been used. ', & 1985 & 'We have to save it before re-allocating.' 1972 1986 ALLOCATE (buffer_used(buffer_sz)) 1973 1987 buffer_used(:)=buffer(:) … … 1979 1993 DEALLOCATE (buffer_used) 1980 1994 ELSE 1981 IF (check) WRITE (*,*) ' histwrite : buffer has not been used. We have just to re-allocating it ' 1995 IF (l_dbg) WRITE (*,*) 'histwrite : buffer has not been used. ', & 1996 & 'We have just to re-allocate it.' 1982 1997 DEALLOCATE (buffer) 1983 1998 ALLOCATE (buffer(buff_pos)) … … 1991 2006 !- 1992 2007 IF (.NOT.ALLOCATED(buff_tmp2)) THEN 1993 IF ( check) THEN2008 IF (l_dbg) THEN 1994 2009 WRITE(*,*) "histwrite_real 1.1 allocate buff_tmp2 ",SIZE(buff_tmp) 1995 2010 ENDIF … … 1997 2012 buff_tmp2_sz = datasz_max(pfileid,varid) 1998 2013 ELSE IF (datasz_max(pfileid,varid) > buff_tmp2_sz) THEN 1999 IF ( check) THEN2014 IF (l_dbg) THEN 2000 2015 WRITE(*,*) "histwrite_real 1.2 re-allocate buff_tmp2 : ", & 2001 2016 & SIZE(buff_tmp)," instead of ",SIZE(buff_tmp2) … … 2011 2026 ! 3.0 Do the operations or transfer the slab of data into buff_tmp 2012 2027 !- 2013 IF ( check) WRITE(*,*) "histwrite: 3.0",pfileid2028 IF (l_dbg) WRITE(*,*) "histwrite: 3.0",pfileid 2014 2029 !- 2015 2030 ! 3.1 DO the Operations only if needed … … 2027 2042 CALL mathop(sopps(i,varid,io),nbin,buff_tmp,missing_val, & 2028 2043 & nbindex,nindex,scal(i,varid,io),nbout,buff_tmp2) 2029 IF ( check) THEN2044 IF (l_dbg) THEN 2030 2045 WRITE(*,*) & 2031 2046 & "histwrite: 3.4a nbout : ",nbin,nbout,sopps(i,varid,io) … … 2036 2051 CALL mathop(sopps(i,varid,io+1),nbin,buff_tmp2,missing_val, & 2037 2052 & nbindex,nindex,scal(i,varid,io+1),nbout,buff_tmp) 2038 IF ( check) THEN2053 IF (l_dbg) THEN 2039 2054 WRITE(*,*) & 2040 2055 & "histwrite: 3.4b nbout : ",nbin,nbout,sopps(i,varid,io+1) … … 2044 2059 ! 3.5 Zoom into the data 2045 2060 !- 2046 IF ( check) THEN2061 IF (l_dbg) THEN 2047 2062 WRITE(*,*) & 2048 2063 & "histwrite: 3.5 size(buff_tmp) : ",SIZE(buff_tmp) … … 2066 2081 !-- 4.0 Get the min and max of the field (buff_tmp) 2067 2082 !- 2068 IF ( check) WRITE(*,*) "histwrite: 4.0 buff_tmp",pfileid,varid, &2069 & TRIM(tmp_opp),' ----',LEN_TRIM(tmp_opp),nbindex2083 IF (l_dbg) WRITE(*,*) "histwrite: 4.0 buff_tmp",pfileid,varid, & 2084 & TRIM(tmp_opp),' ---- ',LEN_TRIM(tmp_opp),nbindex 2070 2085 !- 2071 2086 IF (hist_calc_rng(pfileid,varid)) THEN … … 2081 2096 !-- output we do not transfer to the buffer. 2082 2097 !- 2083 IF ( check) WRITE(*,*) "histwrite: 5.0",pfileid,"tsz :",tsz2098 IF (l_dbg) WRITE(*,*) "histwrite: 5.0",pfileid,"tsz :",tsz 2084 2099 !- 2085 2100 ipt = point(pfileid,varid) … … 2100 2115 ! 6.0 Write to file if needed 2101 2116 !- 2102 IF ( check) WRITE(*,*) "histwrite: 6.0",pfileid2117 IF (l_dbg) WRITE(*,*) "histwrite: 6.0",pfileid 2103 2118 !- 2104 2119 IF (do_write) THEN … … 2109 2124 !-- 6.1 Do the operations that are needed before writting 2110 2125 !- 2111 IF ( check) WRITE(*,*) "histwrite: 6.1",pfileid2126 IF (l_dbg) WRITE(*,*) "histwrite: 6.1",pfileid 2112 2127 !- 2113 2128 IF ( (TRIM(tmp_opp) /= "inst") & … … 2122 2137 & .AND.(TRIM(tmp_opp) /= "once") ) THEN 2123 2138 !- 2124 IF ( check) WRITE(*,*) "histwrite: 6.2",pfileid2139 IF (l_dbg) WRITE(*,*) "histwrite: 6.2",pfileid 2125 2140 !- 2126 2141 itax = var_axid(pfileid,varid) … … 2139 2154 ! we do not write the buffer. 2140 2155 !- 2141 IF ( check) THEN2156 IF (l_dbg) THEN 2142 2157 WRITE(*,*) "histwrite: 6.3",pfileid,ncid,ncvarid,varid,itime 2143 2158 ENDIF … … 2219 2234 INTEGER :: ib,sp,nx,pos 2220 2235 CHARACTER(LEN=70) :: str70 2221 !- 2222 LOGICAL :: check = .FALSE. 2223 !--------------------------------------------------------------------- 2224 IF (check) THEN 2236 LOGICAL :: l_dbg 2237 !--------------------------------------------------------------------- 2238 CALL ipsldbg (old_status=l_dbg) 2239 !- 2240 IF (l_dbg) THEN 2225 2241 WRITE(*,*) 'histvar_seq, start of the subroutine :',learning(pfid) 2226 2242 ENDIF … … 2331 2347 ENDIF 2332 2348 !- 2333 IF ( check) THEN2349 IF (l_dbg) THEN 2334 2350 WRITE(*,*) & 2335 2351 & 'histvar_seq, end of the subroutine :',TRIM(pvarname),pvid … … 2354 2370 !- 2355 2371 LOGICAL :: file_exists 2356 LOGICAL :: check = .FALSE. 2357 !--------------------------------------------------------------------- 2358 IF (check) WRITE(*,*) 'Entering loop on files :',nb_files 2372 LOGICAL :: l_dbg 2373 !--------------------------------------------------------------------- 2374 CALL ipsldbg (old_status=l_dbg) 2375 !- 2376 IF (l_dbg) WRITE(*,*) 'Entering loop on files : ',nb_files 2359 2377 !- 2360 2378 ! 1.The loop on files to synchronise … … 2369 2387 !- 2370 2388 IF (file_exists) THEN 2371 IF ( check) THEN2389 IF (l_dbg) THEN 2372 2390 WRITE(*,*) 'Synchronising specified file number :',file 2373 2391 ENDIF … … 2395 2413 INTEGER :: start_loop,end_loop 2396 2414 CHARACTER(LEN=70) :: str70 2397 !- 2398 LOGICAL :: check=.FALSE. 2399 !--------------------------------------------------------------------- 2400 IF (check) WRITE(*,*) 'Entering loop on files :',nb_files 2415 LOGICAL :: l_dbg 2416 !--------------------------------------------------------------------- 2417 CALL ipsldbg (old_status=l_dbg) 2418 !- 2419 IF (l_dbg) WRITE(*,*) 'Entering loop on files :',nb_files 2401 2420 !- 2402 2421 IF (PRESENT(fid)) THEN … … 2409 2428 !- 2410 2429 DO ifile=start_loop,end_loop 2411 IF ( check) WRITE(*,*) 'Closing specified file number :',ifile2430 IF (l_dbg) WRITE(*,*) 'Closing specified file number :',ifile 2412 2431 ncid = ncdf_ids(ifile) 2413 2432 iret = NF90_REDEF (ncid) … … 2415 2434 !-- 1. Loop on the number of variables to add some final information 2416 2435 !--- 2417 IF ( check) WRITE(*,*) 'Entering loop on vars : ',nb_var(ifile)2436 IF (l_dbg) WRITE(*,*) 'Entering loop on vars : ',nb_var(ifile) 2418 2437 DO iv=1,nb_var(ifile) 2419 2438 IF (hist_wrt_rng(ifile,iv)) THEN 2420 IF ( check) THEN2439 IF (l_dbg) THEN 2421 2440 WRITE(*,*) 'min value for file :',ifile,' var n. :',iv, & 2422 2441 & ' is : ',hist_minmax(ifile,iv,1) … … 2436 2455 !-- 2. Close the file 2437 2456 !--- 2438 IF ( check) WRITE(*,*) 'close file :',ncid2457 IF (l_dbg) WRITE(*,*) 'close file :',ncid 2439 2458 iret = NF90_CLOSE (ncid) 2440 2459 IF (iret /= NF90_NOERR) THEN
Note: See TracChangeset
for help on using the changeset viewer.