Changeset 1378 for IOIPSL/trunk


Ignore:
Timestamp:
04/20/11 12:08:00 (13 years ago)
Author:
mmaipsl
Message:

Enhancement : use ipslout number from errioipsl to redirect all prints of IOIPSL
in the local process when use with parallelization.
This variable ipslout can be modified with ipslnlf function of errioipsl module.

Location:
IOIPSL/trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • IOIPSL/trunk/src/calendar.f90

    r1011 r1378  
    4040!--------------------------------------------------------------------- 
    4141  USE stringop,ONLY  : strlowercase 
    42   USE errioipsl,ONLY : ipslerr 
     42  USE errioipsl,ONLY : ipslerr, ipslout 
    4343!- 
    4444  PRIVATE 
     
    354354    tmp_str = input_str 
    355355    DO WHILE ( MAX(y_pos,m_pos,d_pos,s_pos) > 0) 
    356 !---- WRITE(*,*) tmp_str 
    357 !---- WRITE(*,*) y_pos,m_pos,d_pos,s_pos 
     356!---- WRITE(ipslout,*) tmp_str 
     357!---- WRITE(ipslout,*) y_pos,m_pos,d_pos,s_pos 
    358358      IF (y_pos > 0) THEN 
    359359        WRITE(fmt,'("(I",I10.10,")")') y_pos-1 
     
    533533!--------------------------------------------------------------------- 
    534534  IF (check) THEN 
    535     WRITE(*,*) & 
     535    WRITE(ipslout,*) & 
    536536 &    "isittime 1.0 ",itau,date0,dt,freq,last_action,last_check 
    537537  ENDIF 
     
    605605        do_action = .TRUE. 
    606606        IF (check) THEN 
    607           WRITE(*,*) & 
     607          WRITE(ipslout,*) & 
    608608 &         'ACT-TIME : itau, next_act_itau, next_check_itau : ', & 
    609609 &         itau,next_act_itau,next_check_itau 
    610610          CALL ju2ymds (date_now,year,month,day,sec) 
    611           WRITE(*,*) 'ACT-TIME : y, m, d, s : ',year,month,day,sec 
    612           WRITE(*,*) & 
     611          WRITE(ipslout,*) 'ACT-TIME : y, m, d, s : ',year,month,day,sec 
     612          WRITE(ipslout,*) & 
    613613 &         'ACT-TIME : date_mp1, date_mpf : ',date_mp1,date_mpf 
    614614        ENDIF 
     
    619619!- 
    620620    IF (check) THEN 
    621       WRITE(*,*) "isittime 2.0 ", & 
     621      WRITE(ipslout,*) "isittime 2.0 ", & 
    622622 &     date_next_check,date_next_act,ABS(dt_action-freq), & 
    623623 &     ABS(dt_action+dt_check-freq),dt_action,dt_check, & 
  • IOIPSL/trunk/src/flincom.f90

    r1377 r1378  
    99!- 
    1010  USE calendar,  ONLY : ju2ymds, ymds2ju, ioconf_calendar 
    11   USE errioipsl, ONLY : histerr 
     11  USE errioipsl, ONLY : histerr, ipslout 
    1212  USE stringop,  ONLY : strlowercase 
    1313!- 
     
    193193! Vertical axis 
    194194!- 
    195   IF (check) WRITE(*,*) 'flincre Vertical axis' 
     195  IF (check) WRITE(ipslout,*) 'flincre Vertical axis' 
    196196!- 
    197197  iret = NF90_DEF_VAR (fid, 'lev', NF90_FLOAT, zdimid1, levid) 
     
    202202! Time axis 
    203203!- 
    204   IF (check) WRITE(*,*) 'flincre time axis' 
     204  IF (check) WRITE(ipslout,*) 'flincre time axis' 
    205205!- 
    206206  iret = NF90_DEF_VAR (fid, 'tstep', NF90_FLOAT, tdimid1, timeid) 
     
    211211! The longitude 
    212212!- 
    213   IF (check) WRITE(*,*) 'flincre Longitude axis' 
     213  IF (check) WRITE(ipslout,*) 'flincre Longitude axis' 
    214214!- 
    215215  iret = NF90_DEF_VAR (fid, "nav_lon", NF90_FLOAT, & 
     
    226226! The Latitude 
    227227!- 
    228   IF (check) WRITE(*,*) 'flincre Latitude axis' 
     228  IF (check) WRITE(ipslout,*) 'flincre Latitude axis' 
    229229!- 
    230230  iret = NF90_DEF_VAR (fid, "nav_lat", NF90_FLOAT, & 
     
    253253  iret = NF90_ENDDEF (fid) 
    254254!- 
    255   IF (check) WRITE(*,*) 'flincre Variable' 
     255  IF (check) WRITE(ipslout,*) 'flincre Variable' 
    256256!- 
    257257  iret = NF90_PUT_VAR (fid, levid, lev1(1:llm1)) 
    258258!- 
    259   IF (check) WRITE(*,*) 'flincre Time Variable' 
     259  IF (check) WRITE(ipslout,*) 'flincre Time Variable' 
    260260!- 
    261261  iret = NF90_PUT_VAR (fid, timeid, REAL(itaus(1:ttm1))) 
    262262!- 
    263   IF (check) WRITE(*,*) 'flincre Longitude' 
     263  IF (check) WRITE(ipslout,*) 'flincre Longitude' 
    264264!- 
    265265  iret = NF90_PUT_VAR (fid, lonid, lon1(1:iim1,1:jjm1)) 
    266266!- 
    267   IF (check) WRITE(*,*) 'flincre Latitude' 
     267  IF (check) WRITE(ipslout,*) 'flincre Latitude' 
    268268!- 
    269269  iret = NF90_PUT_VAR (fid, latid, lat1(1:iim1,1:jjm1)) 
     
    423423!- 
    424424  IF (check) & 
    425     WRITE(*,*) 'OUT OF flininfo :',tmp_iim,tmp_jjm,tmp_llm,tmp_ttm 
     425    WRITE(ipslout,*) 'OUT OF flininfo :',tmp_iim,tmp_jjm,tmp_llm,tmp_ttm 
    426426!- 
    427427  fid = ncids(fid_out) 
     
    433433!- 
    434434  IF (check) & 
    435     WRITE(*,*) 'flininfo 2.2 We test if we have to test : ',do_test 
     435    WRITE(ipslout,*) 'flininfo 2.2 We test if we have to test : ',do_test 
    436436!- 
    437437  IF (do_test) THEN 
     
    453453!-- 2.3 Else the sizes of the axes are returned to the user 
    454454!--- 
    455     IF (check) WRITE(*,*) 'flinopen 2.3 Else sizes are returned' 
     455    IF (check) WRITE(ipslout,*) 'flinopen 2.3 Else sizes are returned' 
    456456!--- 
    457457    iim = tmp_iim 
     
    465465!     if not then we get the lon, lat and lev variables from the file 
    466466!- 
    467   IF (check) WRITE(*,*) 'flinopen 3.0 we are realy talking' 
     467  IF (check) WRITE(ipslout,*) 'flinopen 3.0 we are realy talking' 
    468468!- 
    469469  IF (do_test) THEN 
     
    474474!--- 
    475475    IF (check) & 
    476       WRITE(*,*) 'from file lon first and last, modulo 360. ', & 
     476      WRITE(ipslout,*) 'from file lon first and last, modulo 360. ', & 
    477477        x_first, x_last, MODULO(x_first,360.), MODULO(x_last,360.) 
    478478    IF (check) & 
    479       WRITE(*,*) 'from model lon first and last, modulo 360. ', & 
     479      WRITE(ipslout,*) 'from model lon first and last, modulo 360. ', & 
    480480        lon(1,1),lon(iilen,jjlen), & 
    481481        MODULO(lon(1,1),360.), MODULO(lon(iilen,jjlen),360.) 
     
    494494    iret = NF90_GET_VAR (fid, vid, x_last, start=(/ iilast, jjlast /)) 
    495495!--- 
    496     IF (check) WRITE(*,*) & 
     496    IF (check) WRITE(ipslout,*) & 
    497497      'from file lat first and last ',x_first,x_last 
    498     IF (check) WRITE(*,*) & 
     498    IF (check) WRITE(ipslout,*) & 
    499499      'from model lat first and last ',lat(1,1),lat(iilen,jjlen) 
    500500!--- 
     
    512512      iret = NF90_GET_VAR (fid, vid, x_last, start=(/ llm /)) 
    513513!----- 
    514       IF (check) WRITE(*,*) & 
     514      IF (check) WRITE(ipslout,*) & 
    515515        'from file lev first and last ',x_first ,x_last 
    516       IF (check) WRITE(*,*) & 
     516      IF (check) WRITE(ipslout,*) & 
    517517        'from model lev first and last ',lev(1),lev(llm) 
    518518!----- 
     
    530530!-- 4.0 extracting the coordinates if we do not check 
    531531!--- 
    532     IF (check) WRITE(*,*) 'flinopen 4.0 extracting the coordinates' 
     532    IF (check) WRITE(ipslout,*) 'flinopen 4.0 extracting the coordinates' 
    533533!--- 
    534534    CALL flinfindcood (fid_out, 'lon', vid, nbdim) 
     
    575575! 5.0 Get all the details for the time if possible needed 
    576576!- 
    577   IF (check) WRITE(*,*) 'flinopen 5.0 Get time' 
     577  IF (check) WRITE(ipslout,*) 'flinopen 5.0 Get time' 
    578578!- 
    579579  IF (ttm > 0) THEN 
     
    609609    DEALLOCATE(vec_tmp) 
    610610!--- 
    611     IF (check) WRITE(*,*) 'flinopen 5.1 Times ',itaus 
     611    IF (check) WRITE(ipslout,*) 'flinopen 5.1 Times ',itaus 
    612612!--- 
    613613!-- Getting all the details for the time axis 
     
    630630      CALL ymds2ju (year0, month0, day0, sec0, date0) 
    631631      IF (check) & 
    632         WRITE(*,*) 'flinopen 5.1 gdtt_id year0 ... date0 ', & 
     632        WRITE(ipslout,*) 'flinopen 5.1 gdtt_id year0 ... date0 ', & 
    633633                   year0, month0, day0, sec0, date0 
    634634!----- 
     
    643643!----- 
    644644      IF (check) & 
    645         WRITE(*,*) 'flinopen 5.1 gdtmaf_id year0 ... date0 ', & 
     645        WRITE(ipslout,*) 'flinopen 5.1 gdtmaf_id year0 ... date0 ', & 
    646646                   year0, month0, day0, sec0, date0 
    647647    ELSE IF (old_id > 0) THEN 
     
    660660  ENDIF 
    661661!- 
    662   IF (check) WRITE(*,*) 'flinopen 6.0 File opened', date0, dt 
     662  IF (check) WRITE(ipslout,*) 'flinopen 6.0 File opened', date0, dt 
    663663!--------------------------- 
    664664END SUBROUTINE flinopen_work 
     
    716716    axname = ADJUSTL(axname) 
    717717!--- 
    718     IF (check) WRITE(*,*) & 
     718    IF (check) WRITE(ipslout,*) & 
    719719      'flininfo - getting axname',iv,axname,lll 
    720720!--- 
     
    780780  LOGICAL :: check = .FALSE. 
    781781!--------------------------------------------------------------------- 
    782   IF (check) WRITE(*,*) & 
     782  IF (check) WRITE(ipslout,*) & 
    783783     "flinput_r1d : SIZE(var) = ",SIZE(var) 
    784784!- 
     
    807807  LOGICAL :: check = .FALSE. 
    808808!--------------------------------------------------------------------- 
    809   IF (check) WRITE(*,*) & 
     809  IF (check) WRITE(ipslout,*) & 
    810810     "flinput_r2d : SIZE(var) = ",SIZE(var) 
    811811!- 
     
    834834  LOGICAL :: check = .FALSE. 
    835835!--------------------------------------------------------------------- 
    836   IF (check) WRITE(*,*) & 
     836  IF (check) WRITE(ipslout,*) & 
    837837     "flinput_r3d : SIZE(var) = ",SIZE(var) 
    838838!- 
     
    861861  LOGICAL :: check = .FALSE. 
    862862!--------------------------------------------------------------------- 
    863   IF (check) WRITE(*,*) & 
     863  IF (check) WRITE(ipslout,*) & 
    864864     "flinput_r4d : SIZE(var) = ",SIZE(var) 
    865865!- 
     
    961961!--------------------------------------------------------------------- 
    962962  IF (.NOT.ALLOCATED(buff_tmp)) THEN 
    963     IF (check) WRITE(*,*) & 
     963    IF (check) WRITE(ipslout,*) & 
    964964      "flinget_r1d : allocate buff_tmp for buff_sz = ",SIZE(var) 
    965965    ALLOCATE (buff_tmp(SIZE(var))) 
    966966  ELSE IF (SIZE(var) > SIZE(buff_tmp)) THEN 
    967     IF (check) WRITE(*,*) & 
     967    IF (check) WRITE(ipslout,*) & 
    968968      "flinget_r1d : re-allocate buff_tmp for buff_sz = ",SIZE(var) 
    969969    DEALLOCATE (buff_tmp) 
     
    999999!--------------------------------------------------------------------- 
    10001000  IF (.NOT.ALLOCATED(buff_tmp)) THEN 
    1001     IF (check) WRITE(*,*) & 
     1001    IF (check) WRITE(ipslout,*) & 
    10021002      "flinget_r2d : allocate buff_tmp for buff_sz = ",SIZE(var) 
    10031003    ALLOCATE (buff_tmp(SIZE(var))) 
    10041004  ELSE IF (SIZE(var) > SIZE(buff_tmp)) THEN 
    1005     IF (check) WRITE(*,*) & 
     1005    IF (check) WRITE(ipslout,*) & 
    10061006      "flinget_r2d : re-allocate buff_tmp for buff_sz = ",SIZE(var) 
    10071007    DEALLOCATE (buff_tmp) 
     
    10401040!--------------------------------------------------------------------- 
    10411041  IF (.NOT.ALLOCATED(buff_tmp)) THEN 
    1042     IF (check) WRITE(*,*) & 
     1042    IF (check) WRITE(ipslout,*) & 
    10431043      "flinget_r2d_zoom : allocate buff_tmp for buff_sz = ",SIZE(var) 
    10441044    ALLOCATE (buff_tmp(SIZE(var))) 
    10451045  ELSE IF (SIZE(var) > SIZE(buff_tmp)) THEN 
    1046     IF (check) WRITE(*,*) & 
     1046    IF (check) WRITE(ipslout,*) & 
    10471047      "flinget_r2d_zoom : re-allocate buff_tmp for buff_sz = ",SIZE(var) 
    10481048    DEALLOCATE (buff_tmp) 
     
    10801080!--------------------------------------------------------------------- 
    10811081  IF (.NOT.ALLOCATED(buff_tmp)) THEN 
    1082     IF (check) WRITE(*,*) & 
     1082    IF (check) WRITE(ipslout,*) & 
    10831083      "flinget_r3d : allocate buff_tmp for buff_sz = ",SIZE(var) 
    10841084    ALLOCATE (buff_tmp(SIZE(var))) 
    10851085  ELSE IF (SIZE(var) > SIZE(buff_tmp)) THEN 
    1086     IF (check) WRITE(*,*) & 
     1086    IF (check) WRITE(ipslout,*) & 
    10871087      "flinget_r3d : re-allocate buff_tmp for buff_sz = ",SIZE(var) 
    10881088    DEALLOCATE (buff_tmp) 
     
    11231123!--------------------------------------------------------------------- 
    11241124  IF (.NOT.ALLOCATED(buff_tmp)) THEN 
    1125     IF (check) WRITE(*,*) & 
     1125    IF (check) WRITE(ipslout,*) & 
    11261126      "flinget_r3d_zoom : allocate buff_tmp for buff_sz = ",SIZE(var) 
    11271127    ALLOCATE (buff_tmp(SIZE(var))) 
    11281128  ELSE IF (SIZE(var) > SIZE(buff_tmp)) THEN 
    1129     IF (check) WRITE(*,*) & 
     1129    IF (check) WRITE(ipslout,*) & 
    11301130      "flinget_r3d_zoom : re-allocate buff_tmp for buff_sz = ",SIZE(var) 
    11311131    DEALLOCATE (buff_tmp) 
     
    11651165!--------------------------------------------------------------------- 
    11661166  IF (.NOT.ALLOCATED(buff_tmp)) THEN 
    1167     IF (check) WRITE(*,*) & 
     1167    IF (check) WRITE(ipslout,*) & 
    11681168      "flinget_r4d : allocate buff_tmp for buff_sz = ",SIZE(var) 
    11691169    ALLOCATE (buff_tmp(SIZE(var))) 
    11701170  ELSE IF (SIZE(var) > SIZE(buff_tmp)) THEN 
    1171     IF (check) WRITE(*,*) & 
     1171    IF (check) WRITE(ipslout,*) & 
    11721172      "flinget_r4d : re-allocate buff_tmp for buff_sz = ",SIZE(var) 
    11731173    DEALLOCATE (buff_tmp) 
     
    12101210!--------------------------------------------------------------------- 
    12111211  IF (.NOT.ALLOCATED(buff_tmp)) THEN 
    1212     IF (check) WRITE(*,*) & 
     1212    IF (check) WRITE(ipslout,*) & 
    12131213      "flinget_r4d_zoom : allocate buff_tmp for buff_sz = ",SIZE(var) 
    12141214    ALLOCATE (buff_tmp(SIZE(var))) 
    12151215  ELSE IF (SIZE(var) > SIZE(buff_tmp)) THEN 
    1216     IF (check) WRITE(*,*) & 
     1216    IF (check) WRITE(ipslout,*) & 
    12171217      "flinget_r4d_zoom : re-allocate buff_tmp for buff_sz = ",SIZE(var) 
    12181218    DEALLOCATE (buff_tmp) 
     
    13091309!- 
    13101310  IF (check) THEN 
    1311     WRITE(*,*) & 
     1311    WRITE(ipslout,*) & 
    13121312    'flinget_mat : fid_in, fid, varname :', fid_in, fid, TRIM(varname) 
    1313     WRITE(*,*) & 
     1313    WRITE(ipslout,*) & 
    13141314    'flinget_mat : iim, jjm, llm, ttm, itau_dep, itau_fin :', & 
    13151315    iim, jjm, llm, ttm, itau_dep, itau_fin 
    1316     WRITE(*,*) & 
     1316    WRITE(ipslout,*) & 
    13171317    'flinget_mat : iideb, iilen, jjdeb, jjlen :', & 
    13181318    iideb, iilen, jjdeb, jjlen 
     
    13361336           ndims=ndims, dimids=dimids, nAtts=nb_atts) 
    13371337  IF (check) THEN 
    1338     WRITE(*,*) & 
     1338    WRITE(ipslout,*) & 
    13391339    'flinget_mat : fid, vid :', fid, vid 
    1340     WRITE(*,*) & 
     1340    WRITE(ipslout,*) & 
    13411341    'flinget_mat : ndims, dimids(1:ndims), nb_atts :', & 
    13421342    ndims, dimids(1:ndims), nb_atts 
     
    13471347    iret  = NF90_INQUIRE_DIMENSION (fid, dimids(i), len=w_dim(i)) 
    13481348  ENDDO 
    1349   IF (check) WRITE(*,*) & 
     1349  IF (check) WRITE(ipslout,*) & 
    13501350    'flinget_mat : w_dim :', w_dim(1:ndims) 
    13511351!- 
     
    13541354  IF (nb_atts > 0) THEN 
    13551355    IF (check) THEN 
    1356       WRITE(*,*) 'flinget_mat : attributes for variable :' 
     1356      WRITE(ipslout,*) 'flinget_mat : attributes for variable :' 
    13571357    ENDIF 
    13581358  ENDIF 
     
    13651365      iret = NF90_GET_ATT (fid, vid, att_n, tmp_i) 
    13661366      IF (check) THEN 
    1367         WRITE(*,*) '   ',TRIM(att_n),' : ',tmp_i 
     1367        WRITE(ipslout,*) '   ',TRIM(att_n),' : ',tmp_i 
    13681368      ENDIF 
    13691369    ELSE IF ( (x_typ == NF90_FLOAT).OR.(x_typ == NF90_DOUBLE) ) THEN 
    13701370      iret = NF90_GET_ATT (fid, vid, att_n, tmp_r) 
    13711371      IF (check) THEN 
    1372         WRITE(*,*) '   ',TRIM(att_n),' : ',tmp_r 
     1372        WRITE(ipslout,*) '   ',TRIM(att_n),' : ',tmp_r 
    13731373      ENDIF 
    13741374      IF (index(att_n,'missing_value') > 0) THEN 
     
    13791379      iret = NF90_GET_ATT (fid, vid, att_n, tmp_n) 
    13801380      IF (check) THEN 
    1381         WRITE(*,*) '   ',TRIM(att_n),' : ',TRIM(tmp_n) 
     1381        WRITE(ipslout,*) '   ',TRIM(att_n),' : ',TRIM(tmp_n) 
    13821382      ENDIF 
    13831383      IF (index(att_n,'axis') > 0) THEN 
     
    14021402    iret = NF90_INQ_VARID (fid, tmp_n, cvid) 
    14031403!--- 
    1404     IF (check) WRITE(*,*) & 
     1404    IF (check) WRITE(ipslout,*) & 
    14051405      'Dimname, iret , NF90_NOERR : ',TRIM(tmp_n),iret,NF90_NOERR 
    14061406!--- 
     
    15591559! 3.0 Reading the data 
    15601560!- 
    1561   IF (check) WRITE(*,*) & 
     1561  IF (check) WRITE(ipslout,*) & 
    15621562    'flinget_mat 3.0 : ', uncompress, w_sta, w_len 
    15631563!--- 
     
    15841584  ENDIF 
    15851585!- 
    1586   IF (check) WRITE(*,*) 'flinget_mat 3.1 : ',NF90_STRERROR (iret) 
     1586  IF (check) WRITE(ipslout,*) 'flinget_mat 3.1 : ',NF90_STRERROR (iret) 
    15871587!-------------------------- 
    15881588END  SUBROUTINE flinget_mat 
  • IOIPSL/trunk/src/fliocom.f90

    r965 r1378  
    1111USE calendar,  ONLY : lock_calendar,ioget_calendar, & 
    1212 &                    ioconf_calendar,ju2ymds,ymds2ju 
    13 USE errioipsl, ONLY : ipslerr,ipsldbg 
     13USE errioipsl, ONLY : ipslerr,ipsldbg, ipslout 
    1414USE stringop,  ONLY : strlowercase,str_xfw 
    1515!- 
     
    867867!- 
    868868  IF (l_dbg) THEN 
    869     WRITE(*,*) "->fliocrfd - file name : ",TRIM(f_n) 
     869    WRITE(ipslout,*) "->fliocrfd - file name : ",TRIM(f_n) 
    870870  ENDIF 
    871871!- 
     
    990990!- 
    991991  IF (l_dbg) THEN 
    992     WRITE(*,*) '  fliocrfd, external model file-id : ',f_e 
     992    WRITE(ipslout,*) '  fliocrfd, external model file-id : ',f_e 
    993993  ENDIF 
    994994!- 
     
    10401040!- 
    10411041  IF (l_dbg) THEN 
    1042     WRITE(*,*) '<-fliocrfd' 
     1042    WRITE(ipslout,*) '<-fliocrfd' 
    10431043  ENDIF 
    10441044!---------------------- 
     
    10741074!- 
    10751075  IF (l_dbg) THEN 
    1076     WRITE(*,*) "->fliopstc" 
     1076    WRITE(ipslout,*) "->fliopstc" 
    10771077  ENDIF 
    10781078!- 
     
    11001100!--- 
    11011101    IF (l_dbg) THEN 
    1102       WRITE(*,*) '  fliopstc : Define the Longitude axis' 
     1102      WRITE(ipslout,*) '  fliopstc : Define the Longitude axis' 
    11031103    ENDIF 
    11041104!--- 
     
    11441144!--- 
    11451145    IF (l_dbg) THEN 
    1146       WRITE(*,*) '  fliopstc : Define the Latitude axis' 
     1146      WRITE(ipslout,*) '  fliopstc : Define the Latitude axis' 
    11471147    ENDIF 
    11481148!--- 
     
    11881188!--- 
    11891189    IF (l_dbg) THEN 
    1190       WRITE(*,*) '  fliopstc : Define the Vertical axis' 
     1190      WRITE(ipslout,*) '  fliopstc : Define the Vertical axis' 
    11911191    ENDIF 
    11921192!--- 
     
    12191219!--- 
    12201220    IF (l_dbg) THEN 
    1221       WRITE(*,*) '  fliopstc : Define the Time axis' 
     1221      WRITE(ipslout,*) '  fliopstc : Define the Time axis' 
    12221222    ENDIF 
    12231223!--- 
     
    13171317  IF (PRESENT(x_axis).OR.PRESENT(x_axis_2d)) THEN 
    13181318    IF (l_dbg) THEN 
    1319       WRITE(*,*) '  fliopstc : Create the Longitude axis' 
     1319      WRITE(ipslout,*) '  fliopstc : Create the Longitude axis' 
    13201320    ENDIF 
    13211321    IF (PRESENT(x_axis)) THEN 
     
    13301330  IF (PRESENT(y_axis).OR.PRESENT(y_axis_2d)) THEN 
    13311331    IF (l_dbg) THEN 
    1332       WRITE(*,*) '  fliopstc : Create the Latitude axis' 
     1332      WRITE(ipslout,*) '  fliopstc : Create the Latitude axis' 
    13331333    ENDIF 
    13341334    IF (PRESENT(y_axis)) THEN 
     
    13431343  IF (PRESENT(z_axis)) THEN 
    13441344    IF (l_dbg) THEN 
    1345       WRITE(*,*) '  fliopstc : Create the Vertical axis' 
     1345      WRITE(ipslout,*) '  fliopstc : Create the Vertical axis' 
    13461346    ENDIF 
    13471347    i_rc = NF90_PUT_VAR(f_e,levid,z_axis(:)) 
     
    13521352  IF (PRESENT(t_axis)) THEN 
    13531353    IF (l_dbg) THEN 
    1354       WRITE(*,*) '  fliopstc : Create the Time axis' 
     1354      WRITE(ipslout,*) '  fliopstc : Create the Time axis' 
    13551355    ENDIF 
    13561356    i_rc = NF90_PUT_VAR(f_e,timeid,REAL(t_axis(:))) 
     
    13621362!- 
    13631363  IF (l_dbg) THEN 
    1364     WRITE(*,*) "<-fliopstc" 
     1364    WRITE(ipslout,*) "<-fliopstc" 
    13651365  ENDIF 
    13661366!---------------------- 
     
    14281428!- 
    14291429  IF (l_dbg) THEN 
    1430     WRITE(*,*) "->fliodefv ",TRIM(v_n)," ",n_d,"D" 
     1430    WRITE(ipslout,*) "->fliodefv ",TRIM(v_n)," ",n_d,"D" 
    14311431  ENDIF 
    14321432!- 
     
    15671567!- 
    15681568  IF (l_dbg) THEN 
    1569     WRITE(*,*) "<-fliodefv" 
     1569    WRITE(ipslout,*) "<-fliodefv" 
    15701570  ENDIF 
    15711571!---------------------- 
     
    20482048    ELSE IF (PRESENT(r_85)) THEN; cvr_d = "R8 5D"; 
    20492049    ENDIF 
    2050     WRITE(*,*) "->flioputv ",TRIM(v_n)," ",TRIM(cvr_d) 
     2050    WRITE(ipslout,*) "->flioputv ",TRIM(v_n)," ",TRIM(cvr_d) 
    20512051  ENDIF 
    20522052!- 
     
    21312131!- 
    21322132  IF (l_dbg) THEN 
    2133     WRITE(*,*) "<-flioputv" 
     2133    WRITE(ipslout,*) "<-flioputv" 
    21342134  ENDIF 
    21352135!---------------------- 
     
    22382238!- 
    22392239  IF (l_dbg) THEN 
    2240     WRITE(*,*) "->flioputa ",TRIM(v_n)," ",TRIM(a_n) 
     2240    WRITE(ipslout,*) "->flioputa ",TRIM(v_n)," ",TRIM(a_n) 
    22412241  ENDIF 
    22422242!- 
     
    22702270!- 
    22712271  IF (l_dbg) THEN 
    2272     WRITE(*,*) "<-flioputa" 
     2272    WRITE(ipslout,*) "<-flioputa" 
    22732273  ENDIF 
    22742274!---------------------- 
     
    22912291!- 
    22922292  IF (l_dbg) THEN 
    2293     WRITE(*,*) '->flioopfd, file name : ',TRIM(f_n) 
     2293    WRITE(ipslout,*) '->flioopfd, file name : ',TRIM(f_n) 
    22942294  ENDIF 
    22952295!- 
     
    23252325!- 
    23262326  IF (l_dbg) THEN 
    2327     WRITE(*,*) '  flioopfd, model file-id : ',f_e 
     2327    WRITE(ipslout,*) '  flioopfd, model file-id : ',f_e 
    23282328  ENDIF 
    23292329!- 
     
    23522352    WRITE(*,'("   flioopfd - dimensions :",/,(5(1X,I10),:))') & 
    23532353 &    nw_dl(:,f_i) 
    2354     WRITE(*,*) "<-flioopfd" 
     2354    WRITE(ipslout,*) "<-flioopfd" 
    23552355  ENDIF 
    23562356!---------------------- 
     
    23732373!- 
    23742374  IF (l_dbg) THEN 
    2375     WRITE(*,*) "->flioinqf" 
     2375    WRITE(ipslout,*) "->flioinqf" 
    23762376  ENDIF 
    23772377!- 
     
    24182418!- 
    24192419  IF (l_dbg) THEN 
    2420     WRITE(*,*) "<-flioinqf" 
     2420    WRITE(ipslout,*) "<-flioinqf" 
    24212421  ENDIF 
    24222422!---------------------- 
     
    24452445!- 
    24462446  IF (l_dbg) THEN 
    2447     WRITE(*,*) "->flioinqn" 
     2447    WRITE(ipslout,*) "->flioinqn" 
    24482448  ENDIF 
    24492449!- 
     
    26222622!- 
    26232623  IF (l_dbg) THEN 
    2624     WRITE(*,*) "<-flioinqn" 
     2624    WRITE(ipslout,*) "<-flioinqn" 
    26252625  ENDIF 
    26262626!---------------------- 
     
    26622662!- 
    26632663  IF (l_dbg) THEN 
    2664     WRITE(*,*) "->fliogstc" 
     2664    WRITE(ipslout,*) "->fliogstc" 
    26652665  ENDIF 
    26662666!- 
     
    29322932!--- 
    29332933    IF (l_dbg) THEN 
    2934       WRITE(*,*) '  fliogstc - get time details' 
     2934      WRITE(ipslout,*) '  fliogstc - get time details' 
    29352935    ENDIF 
    29362936!--- 
     
    29772977!--- 
    29782978    IF (l_dbg) THEN 
    2979       WRITE(*,*) '  fliogstc - first time : ',t_axis(1:1) 
     2979      WRITE(ipslout,*) '  fliogstc - first time : ',t_axis(1:1) 
    29802980    ENDIF 
    29812981  ENDIF 
     
    30153015    CALL lock_calendar (new_status=l_tmp) 
    30163016    IF (l_dbg) THEN 
    3017       WRITE(*,*) '  fliogstc - time_type : ' 
    3018       WRITE(*,*) it_t 
    3019       WRITE(*,*) '  fliogstc - year month day second t_init : ' 
    3020       WRITE(*,*) j_yy,j_mo,j_dd,r_ss,t_init 
     3017      WRITE(ipslout,*) '  fliogstc - time_type : ' 
     3018      WRITE(ipslout,*) it_t 
     3019      WRITE(ipslout,*) '  fliogstc - year month day second t_init : ' 
     3020      WRITE(ipslout,*) j_yy,j_mo,j_dd,r_ss,t_init 
    30213021    ENDIF 
    30223022  ENDIF 
     
    30803080!- 
    30813081  IF (l_dbg) THEN 
    3082     WRITE(*,*) "<-fliogstc" 
     3082    WRITE(ipslout,*) "<-fliogstc" 
    30833083  ENDIF 
    30843084!---------------------- 
     
    31083108!- 
    31093109  IF (l_dbg) THEN 
    3110     WRITE(*,*) "->flioinqv ",TRIM(v_n) 
     3110    WRITE(ipslout,*) "->flioinqv ",TRIM(v_n) 
    31113111  ENDIF 
    31123112!- 
     
    32213221!- 
    32223222  IF (l_dbg) THEN 
    3223     WRITE(*,*) "<-flioinqv" 
     3223    WRITE(ipslout,*) "<-flioinqv" 
    32243224  ENDIF 
    32253225!---------------------- 
     
    37023702    ELSE IF (PRESENT(r_85)) THEN; cvr_d = "R8 5D"; 
    37033703    ENDIF 
    3704     WRITE(*,*) "->fliogetv ",TRIM(v_n)," ",TRIM(cvr_d) 
     3704    WRITE(ipslout,*) "->fliogetv ",TRIM(v_n)," ",TRIM(cvr_d) 
    37053705  ENDIF 
    37063706!- 
     
    37853785!- 
    37863786  IF (l_dbg) THEN 
    3787     WRITE(*,*) "<-fliogetv" 
     3787    WRITE(ipslout,*) "<-fliogetv" 
    37883788  ENDIF 
    37893789!---------------------- 
     
    38063806!- 
    38073807  IF (l_dbg) THEN 
    3808     WRITE(*,*) "->flioinqa ",TRIM(v_n),"-",TRIM(a_n) 
     3808    WRITE(ipslout,*) "->flioinqa ",TRIM(v_n),"-",TRIM(a_n) 
    38093809  ENDIF 
    38103810!- 
     
    38363836!- 
    38373837  IF (l_dbg) THEN 
    3838     WRITE(*,*) "<-flioinqa" 
     3838    WRITE(ipslout,*) "<-flioinqa" 
    38393839  ENDIF 
    38403840!---------------------- 
     
    39483948!- 
    39493949  IF (l_dbg) THEN 
    3950     WRITE(*,*) "->fliogeta ",TRIM(v_n)," ",TRIM(a_n) 
     3950    WRITE(ipslout,*) "->fliogeta ",TRIM(v_n)," ",TRIM(a_n) 
    39513951  ENDIF 
    39523952!- 
     
    40124012!- 
    40134013  IF (l_dbg) THEN 
    4014     WRITE(*,*) "<-fliogeta" 
     4014    WRITE(ipslout,*) "<-fliogeta" 
    40154015  ENDIF 
    40164016!---------------------- 
     
    40314031!- 
    40324032  IF (l_dbg) THEN 
    4033     WRITE(*,*) & 
     4033    WRITE(ipslout,*) & 
    40344034 &    "->fliorenv ",TRIM(v_o_n),"->",TRIM(v_n_n) 
    40354035  ENDIF 
     
    40524052!- 
    40534053  IF (l_dbg) THEN 
    4054     WRITE(*,*) "<-fliorenv" 
     4054    WRITE(ipslout,*) "<-fliorenv" 
    40554055  ENDIF 
    40564056!---------------------- 
     
    40714071!- 
    40724072  IF (l_dbg) THEN 
    4073     WRITE(*,*) & 
     4073    WRITE(ipslout,*) & 
    40744074 &    "->fliorena ",TRIM(v_n),"-",TRIM(a_o_n),"->",TRIM(a_n_n) 
    40754075  ENDIF 
     
    41024102!- 
    41034103  IF (l_dbg) THEN 
    4104     WRITE(*,*) "<-fliorena" 
     4104    WRITE(ipslout,*) "<-fliorena" 
    41054105  ENDIF 
    41064106!---------------------- 
     
    41214121!- 
    41224122  IF (l_dbg) THEN 
    4123     WRITE(*,*) "->fliodela ",TRIM(v_n),"-",TRIM(a_n) 
     4123    WRITE(ipslout,*) "->fliodela ",TRIM(v_n),"-",TRIM(a_n) 
    41244124  ENDIF 
    41254125!- 
     
    41504150!- 
    41514151  IF (l_dbg) THEN 
    4152     WRITE(*,*) "<-fliodela" 
     4152    WRITE(ipslout,*) "<-fliodela" 
    41534153  ENDIF 
    41544154!---------------------- 
     
    41694169!- 
    41704170  IF (l_dbg) THEN 
    4171     WRITE(*,*) "->fliocpya - file",f_i_i,"-",TRIM(v_n_i),"-",TRIM(a_n) 
    4172     WRITE(*,*) "  copied to file ",f_i_o,"-",TRIM(v_n_o) 
     4171    WRITE(ipslout,*) "->fliocpya - file",f_i_i,"-",TRIM(v_n_i),"-",TRIM(a_n) 
     4172    WRITE(ipslout,*) "  copied to file ",f_i_o,"-",TRIM(v_n_o) 
    41734173  ENDIF 
    41744174!- 
     
    42164216!- 
    42174217  IF (l_dbg) THEN 
    4218     WRITE(*,*) "<-fliocpya" 
     4218    WRITE(ipslout,*) "<-fliocpya" 
    42194219  ENDIF 
    42204220!---------------------- 
     
    42384238!- 
    42394239  IF (l_dbg) THEN 
    4240     WRITE(*,*) "->flioqstc ",TRIM(c_type) 
     4240    WRITE(ipslout,*) "->flioqstc ",TRIM(c_type) 
    42414241  ENDIF 
    42424242!- 
     
    42604260!- 
    42614261  IF (l_dbg) THEN 
    4262     WRITE(*,*) "<-flioqstc" 
     4262    WRITE(ipslout,*) "<-flioqstc" 
    42634263  ENDIF 
    42644264!---------------------- 
     
    42764276!- 
    42774277  IF (l_dbg) THEN 
    4278     WRITE(*,*) "->fliosync" 
     4278    WRITE(ipslout,*) "->fliosync" 
    42794279  ENDIF 
    42804280!- 
     
    43024302    IF (f_e > 0) THEN 
    43034303      IF (l_dbg) THEN 
    4304         WRITE(*,*) '  fliosync - synchronising file number ',i_f 
     4304        WRITE(ipslout,*) '  fliosync - synchronising file number ',i_f 
    43054305      ENDIF 
    43064306      i_rc = NF90_SYNC(f_e) 
     
    43124312!- 
    43134313  IF (l_dbg) THEN 
    4314     WRITE(*,*) "<-fliosync" 
     4314    WRITE(ipslout,*) "<-fliosync" 
    43154315  ENDIF 
    43164316!---------------------- 
     
    43284328!- 
    43294329  IF (l_dbg) THEN 
    4330     WRITE(*,*) "->flioclo" 
     4330    WRITE(ipslout,*) "->flioclo" 
    43314331  ENDIF 
    43324332!- 
     
    43504350    IF (f_e > 0) THEN 
    43514351      IF (l_dbg) THEN 
    4352         WRITE(*,*) '  flioclo - closing file number ',i_f 
     4352        WRITE(ipslout,*) '  flioclo - closing file number ',i_f 
    43534353      ENDIF 
    43544354      i_rc = NF90_CLOSE(f_e) 
     
    43614361!- 
    43624362  IF (l_dbg) THEN 
    4363     WRITE(*,*) "<-flioclo" 
     4363    WRITE(ipslout,*) "<-flioclo" 
    43644364  ENDIF 
    43654365!--------------------- 
     
    44454445      ELSE 
    44464446        i_rc = NF90_GET_ATT(f_e,NF90_GLOBAL,c_name,tmp_i) 
    4447         WRITE(*,*) '   ',TRIM(c_name),' : ',tmp_i 
     4447        WRITE(ipslout,*) '   ',TRIM(c_name),' : ',tmp_i 
    44484448      ENDIF 
    44494449    ELSE IF ( (t_ea == NF90_REAL4).OR.(t_ea == NF90_REAL8) ) THEN 
     
    44564456      ELSE 
    44574457        i_rc = NF90_GET_ATT(f_e,NF90_GLOBAL,c_name,tmp_r) 
    4458         WRITE(*,*) '   ',TRIM(c_name),' : ',tmp_r 
     4458        WRITE(ipslout,*) '   ',TRIM(c_name),' : ',tmp_r 
    44594459      ENDIF 
    44604460    ELSE 
    44614461      tmp_c = '' 
    44624462      i_rc = NF90_GET_ATT(f_e,NF90_GLOBAL,c_name,tmp_c) 
    4463       WRITE(*,*) '   ',TRIM(c_name),' : "',TRIM(tmp_c),'"' 
     4463      WRITE(ipslout,*) '   ',TRIM(c_name),' : "',TRIM(tmp_c),'"' 
    44644464    ENDIF 
    44654465  ENDDO 
     
    44994499        ELSE 
    45004500          i_rc = NF90_GET_ATT(f_e,i_n,c_name,tmp_i) 
    4501           WRITE(*,*) '   ',TRIM(c_name),' : ',tmp_i 
     4501          WRITE(ipslout,*) '   ',TRIM(c_name),' : ',tmp_i 
    45024502        ENDIF 
    45034503      ELSE IF ( (t_ea == NF90_REAL4).OR.(t_ea == NF90_REAL8) ) THEN 
     
    45104510        ELSE 
    45114511          i_rc = NF90_GET_ATT(f_e,i_n,c_name,tmp_r) 
    4512           WRITE(*,*) '   ',TRIM(c_name),' : ',tmp_r 
     4512          WRITE(ipslout,*) '   ',TRIM(c_name),' : ',tmp_r 
    45134513        ENDIF 
    45144514      ELSE 
    45154515        tmp_c = '' 
    45164516        i_rc = NF90_GET_ATT(f_e,i_n,c_name,tmp_c) 
    4517         WRITE(*,*) '   ',TRIM(c_name),' : "',TRIM(tmp_c),'"' 
     4517        WRITE(ipslout,*) '   ',TRIM(c_name),' : "',TRIM(tmp_c),'"' 
    45184518      ENDIF 
    45194519    ENDDO 
     
    49374937!- 
    49384938  IF (l_dbg) THEN 
    4939     WRITE(*,*) "->flio_inf" 
     4939    WRITE(ipslout,*) "->flio_inf" 
    49404940  ENDIF 
    49414941!- 
     
    49604960!--- 
    49614961    IF (l_dbg) THEN 
    4962       WRITE(*,*) "  flio_inf ",kv,ml," ",TRIM(f_d_n) 
     4962      WRITE(ipslout,*) "  flio_inf ",kv,ml," ",TRIM(f_d_n) 
    49634963    ENDIF 
    49644964!--- 
     
    50055005!- 
    50065006  IF (l_dbg) THEN 
    5007     WRITE(*,*) "<-flio_inf" 
     5007    WRITE(ipslout,*) "<-flio_inf" 
    50085008  ENDIF 
    50095009!---------------------- 
  • IOIPSL/trunk/src/getincom.f90

    r1375 r1378  
    66! See IOIPSL/IOIPSL_License_CeCILL.txt 
    77!--------------------------------------------------------------------- 
    8 USE errioipsl, ONLY : ipslerr,ipsldbg 
     8USE errioipsl, ONLY : ipslerr,ipsldbg,ipslout 
    99USE stringop, & 
    1010 &   ONLY : nocomma,cmpblank,strlowercase 
     
    853853    CALL ipslerr (1,'USING DEFAULT BEHAVIOUR FOR', & 
    854854 &   TRIM(targetname),' ',' ') 
    855     WRITE(*,*) 'USING DEFAULT BEHAVIOUR FOR ',TRIM(targetname) 
     855    WRITE(ipslout,*) 'USING DEFAULT BEHAVIOUR FOR ',TRIM(targetname) 
    856856  ELSE 
    857857    status_cnt = 0 
     
    860860        status_cnt = status_cnt+1 
    861861        IF      (status_cnt <= max_msgs) THEN 
    862           WRITE (UNIT=*,FMT='(" USING DEFAULTS : ",A)', & 
     862          WRITE (UNIT=ipslout,FMT='(" USING DEFAULTS : ",A)', & 
    863863 &               ADVANCE='NO') TRIM(targetname) 
    864864          IF (nb_to_ret > 1) THEN 
    865             WRITE (UNIT=*,FMT='("__")',ADVANCE='NO') 
    866             WRITE (UNIT=*,FMT=c_i_fmt,ADVANCE='NO') it 
     865            WRITE (UNIT=ipslout,FMT='("__")',ADVANCE='NO') 
     866            WRITE (UNIT=ipslout,FMT=c_i_fmt,ADVANCE='NO') it 
    867867          ENDIF 
    868868          SELECT CASE (k_typ) 
    869869          CASE(k_i) 
    870             WRITE (UNIT=*,FMT=*) "=",i_val(it) 
     870            WRITE (UNIT=ipslout,FMT=*) "=",i_val(it) 
    871871          CASE(k_r) 
    872             WRITE (UNIT=*,FMT=*) "=",r_val(it) 
     872            WRITE (UNIT=ipslout,FMT=*) "=",r_val(it) 
    873873          CASE(k_c) 
    874             WRITE (UNIT=*,FMT=*) "=",c_val(it) 
     874            WRITE (UNIT=ipslout,FMT=*) "=",c_val(it) 
    875875          CASE(k_l) 
    876             WRITE (UNIT=*,FMT=*) "=",l_val(it) 
     876            WRITE (UNIT=ipslout,FMT=*) "=",l_val(it) 
    877877          END SELECT 
    878878        ELSE IF (status_cnt == max_msgs+1) THEN 
    879           WRITE (UNIT=*,FMT='(" USING DEFAULTS ... ",A)') 
     879          WRITE (UNIT=ipslout,FMT='(" USING DEFAULTS ... ",A)') 
    880880        ENDIF 
    881881      ENDIF 
     
    11231123!- 
    11241124  IF (l_dbg) THEN 
    1125     WRITE(*,*) 'getin_readdef : Open file ',TRIM(filelist(current)) 
     1125    WRITE(ipslout,*) 'getin_readdef : Open file ',TRIM(filelist(current)) 
    11261126  ENDIF 
    11271127!- 
     
    11641164      NEW_str  = TRIM(ADJUSTL(NEW_str)) 
    11651165      IF (l_dbg) THEN 
    1166         WRITE(*,*) & 
     1166        WRITE(ipslout,*) & 
    11671167 &        '--> getin_readdef : ',TRIM(key_str),' :: ',TRIM(NEW_str) 
    11681168      ENDIF 
     
    12021202      nb_lastkey = 0 
    12031203      IF (l_dbg) THEN 
    1204         WRITE(*,*) 'getin_readdef : Have found an emtpy line ' 
     1204        WRITE(ipslout,*) 'getin_readdef : Have found an emtpy line ' 
    12051205      ENDIF 
    12061206    ENDIF 
     
    12181218!- 
    12191219  IF (l_dbg) THEN 
    1220      WRITE(*,*) "nb_lines ",nb_lines,"nb_keys ",nb_keys 
    1221      WRITE(*,*) "fichier ",fichier(1:nb_lines) 
    1222      WRITE(*,*) "targetlist ",targetlist(1:nb_lines) 
    1223      WRITE(*,*) "fromfile ",fromfile(1:nb_lines) 
    1224      WRITE(*,*) "compline ",compline(1:nb_lines) 
    1225     WRITE(*,*) '<-getin_readdef' 
     1220     WRITE(ipslout,*) "nb_lines ",nb_lines,"nb_keys ",nb_keys 
     1221     WRITE(ipslout,*) "fichier ",fichier(1:nb_lines) 
     1222     WRITE(ipslout,*) "targetlist ",targetlist(1:nb_lines) 
     1223     WRITE(ipslout,*) "fromfile ",fromfile(1:nb_lines) 
     1224     WRITE(ipslout,*) "compline ",compline(1:nb_lines) 
     1225     WRITE(ipslout,*) '<-getin_readdef' 
    12261226  ENDIF 
    12271227!--------------------------- 
     
    14101410 
    14111411  IF (l_dbg) THEN 
    1412      WRITE(*,*) "getin_decrypt ->",TRIM(NEW_str), " : " 
    1413      WRITE(*,*) "getin_decrypt ->", nb_lines,& 
     1412     WRITE(ipslout,*) "getin_decrypt ->",TRIM(NEW_str), " : " 
     1413     WRITE(ipslout,*) "getin_decrypt ->", nb_lines,& 
    14141414          & SIZE(fichier), & 
    14151415          & SIZE(fromfile), & 
    14161416          & SIZE(filelist) 
    14171417     IF (nb_lines > 0) THEN 
    1418         WRITE(*,*) "getin_decrypt ->",TRIM(NEW_str), " : ", & 
     1418        WRITE(ipslout,*) "getin_decrypt ->", & 
    14191419          & TRIM(fichier(nb_lines)), & 
    14201420          & fromfile(nb_lines), & 
    14211421          & TRIM(filelist(fromfile(nb_lines))) 
    1422         WRITE(*,*) "                compline : ",compline(nb_lines) 
    1423         WRITE(*,*) "                targetlist : ",TRIM(targetlist(nb_lines)) 
     1422        WRITE(ipslout,*) "                compline : ",compline(nb_lines) 
     1423        WRITE(ipslout,*) "                targetlist : ",TRIM(targetlist(nb_lines)) 
    14241424     ENDIF 
    1425      WRITE(*,*) "                last_key : ",last_key 
     1425     WRITE(ipslout,*) "                last_key : ",last_key 
    14261426  ENDIF 
    14271427!--------------------------- 
     
    14511451!--- 
    14521452    IF (n_k > 0) THEN 
    1453       WRITE(*,*) 'COUNT : ',n_k 
    1454       WRITE(*,*) & 
     1453      WRITE(ipslout,*) 'COUNT : ',n_k 
     1454      WRITE(ipslout,*) & 
    14551455 &  'getin_checkcohe : Found a problem on key ',TRIM(targetlist(line)) 
    1456       WRITE(*,*) & 
     1456      WRITE(ipslout,*) & 
    14571457 &  'getin_checkcohe : The following values were encoutered :' 
    1458       WRITE(*,*) & 
     1458      WRITE(ipslout,*) & 
    14591459 &  '                ',TRIM(targetlist(line)),' == ',fichier(line) 
    1460       WRITE(*,*) & 
     1460      WRITE(ipslout,*) & 
    14611461 &  '                ',TRIM(targetlist(k)),' == ',fichier(k) 
    1462       WRITE(*,*) & 
     1462      WRITE(ipslout,*) & 
    14631463 &  'getin_checkcohe : We will keep only the last value' 
    14641464       CALL ipslerr (2,'getin_checkcohe','Found a problem on key ', & 
     
    18581858    used_filename = TRIM(usedfileprefix)//'_'//TRIM(filelist(if)) 
    18591859    IF (l_dbg) THEN 
    1860       WRITE(*,*) & 
     1860      WRITE(ipslout,*) & 
    18611861 &      'getin_dump : opens file : ',TRIM(used_filename),' if = ',if 
    1862       WRITE(*,*) 'GETIN_DUMP : NUMBER OF KEYS : ',nb_keys 
     1862      WRITE(ipslout,*) 'GETIN_DUMP : NUMBER OF KEYS : ',nb_keys 
    18631863    ENDIF 
    18641864    OPEN (UNIT=22,FILE=used_filename,iostat=io_err) 
     
    18801880      WRITE(22,*) '# ' 
    18811881      IF (l_dbg) THEN 
    1882          WRITE(*,*) '# ' 
    1883          WRITE(*,*) '# This file is linked to the following files :' 
    1884          WRITE(*,*) '# ' 
     1882         WRITE(ipslout,*) '# ' 
     1883         WRITE(ipslout,*) '# This file is linked to the following files :' 
     1884         WRITE(ipslout,*) '# ' 
    18851885         DO iff=2,nbfiles 
    1886             WRITE(*,*) 'INCLUDEDEF = ',TRIM(filelist(iff)) 
     1886            WRITE(ipslout,*) 'INCLUDEDEF = ',TRIM(filelist(iff)) 
    18871887         ENDDO 
    1888          WRITE(*,*) '# ' 
     1888         WRITE(ipslout,*) '# ' 
    18891889      ENDIF 
    18901890    ENDIF 
     
    19151915        !- 
    19161916        IF (l_dbg) THEN 
    1917            WRITE(*,*) '#' 
    1918            WRITE(*,*) '# Status of key ', ikey, ' : ',& 
     1917           WRITE(ipslout,*) '#' 
     1918           WRITE(ipslout,*) '# Status of key ', ikey, ' : ',& 
    19191919 &          TRIM(key_tab(ikey)%keystr),key_tab(ikey)%keystatus 
    19201920        ENDIF 
  • IOIPSL/trunk/src/histcom.f90

    r1028 r1378  
    1212  USE fliocom,  ONLY : flio_dom_file,flio_dom_att 
    1313  USE calendar 
    14   USE errioipsl, ONLY : ipslerr,ipsldbg 
     14  USE errioipsl, ONLY : ipslerr,ipsldbg,ipslout 
    1515!- 
    1616  IMPLICIT NONE 
     
    340340  ENDIF 
    341341!- 
    342   IF (l_dbg) WRITE(*,*) c_nam//" 0.0" 
     342  IF (l_dbg) WRITE(ipslout,*) c_nam//" 0.0" 
    343343!- 
    344344! Search for a free index 
     
    358358! 1.0 Transfering into the common for future use 
    359359!- 
    360   IF (l_dbg) WRITE(*,*) c_nam//" 1.0" 
     360  IF (l_dbg) WRITE(ipslout,*) c_nam//" 1.0" 
    361361!- 
    362362  W_F(idf)%itau0  = pitau0 
     
    366366! 2.0 Initializes all variables for this file 
    367367!- 
    368   IF (l_dbg) WRITE(*,*) c_nam//" 2.0" 
     368  IF (l_dbg) WRITE(ipslout,*) c_nam//" 2.0" 
    369369!- 
    370370  W_F(idf)%n_var = 0 
     
    383383! 3.0 Opening netcdf file and defining dimensions 
    384384!- 
    385   IF (l_dbg) WRITE(*,*) c_nam//" 3.0" 
     385  IF (l_dbg) WRITE(ipslout,*) c_nam//" 3.0" 
    386386!- 
    387387! Add DOMAIN number and ".nc" suffix in file name if needed 
     
    425425! 4.0 Declaring the geographical coordinates and other attributes 
    426426!- 
    427   IF (l_dbg) WRITE(*,*) c_nam//" 4.0" 
     427  IF (l_dbg) WRITE(ipslout,*) c_nam//" 4.0" 
    428428!- 
    429429  iret = NF90_PUT_ATT(nfid,NF90_GLOBAL,'Conventions','CF-1.1') 
     
    436436! 5.0 Saving some important information on this file in the common 
    437437!- 
    438   IF (l_dbg) WRITE(*,*) c_nam//" 5.0" 
     438  IF (l_dbg) WRITE(ipslout,*) c_nam//" 5.0" 
    439439!- 
    440440  IF (PRESENT(domain_id)) THEN 
     
    612612! 1.1 Create all the variables needed 
    613613!- 
    614   IF (l_dbg) WRITE(*,*) c_nam//" 1.0" 
     614  IF (l_dbg) WRITE(ipslout,*) c_nam//" 1.0" 
    615615!- 
    616616  nfid = W_F(idf)%ncfid 
     
    671671! 2.0 Longitude 
    672672!- 
    673   IF (l_dbg) WRITE(*,*) c_nam//" 2.0" 
     673  IF (l_dbg) WRITE(ipslout,*) c_nam//" 2.0" 
    674674!- 
    675675  i_s = 1; 
     
    702702! 3.0 Latitude 
    703703!- 
    704   IF (l_dbg) WRITE(*,*) c_nam//" 3.0" 
     704  IF (l_dbg) WRITE(ipslout,*) c_nam//" 3.0" 
    705705!- 
    706706  i_e = 2; 
     
    736736! 4.0 storing the geographical coordinates 
    737737!- 
    738   IF (l_dbg) WRITE(*,*) c_nam//" 4.0" 
     738  IF (l_dbg) WRITE(ipslout,*) c_nam//" 4.0" 
    739739!- 
    740740  IF ( (k_typ == 1).OR.(k_typ == 2) ) THEN 
     
    833833!    Is the name already in use ? 
    834834!- 
    835   IF (l_dbg) WRITE(*,*) "histvert : 1.0 Verifications", & 
     835  IF (l_dbg) WRITE(ipslout,*) "histvert : 1.0 Verifications", & 
    836836 &                      pzaxname,'---',pzaxunit,'---',pzaxtitle 
    837837!- 
     
    883883!- 
    884884  IF (l_dbg) & 
    885  &  WRITE(*,*) "histvert : 2.0 Add the information to the file" 
     885 &  WRITE(ipslout,*) "histvert : 2.0 Add the information to the file" 
    886886!- 
    887887  nfid = W_F(idf)%ncfid 
     
    918918!- 
    919919  IF (l_dbg) & 
    920   &  WRITE(*,*) "histvert : 3.0 add the information to the common" 
     920  &  WRITE(ipslout,*) "histvert : 3.0 add the information to the common" 
    921921!- 
    922922  W_F(idf)%n_zax = iv 
     
    10161016!     and verify that it does not already exist 
    10171017!- 
    1018   IF (l_dbg) WRITE(*,*) "histdef : 1.0" 
     1018  IF (l_dbg) WRITE(ipslout,*) "histdef : 1.0" 
    10191019!- 
    10201020  IF (iv > 1) THEN 
     
    10701070!- 
    10711071  IF (l_dbg) THEN 
    1072     WRITE(*,*) "histdef : 2.0",idf,iv,W_F(idf)%W_V(iv)%nbopp, & 
     1072    WRITE(ipslout,*) "histdef : 2.0",idf,iv,W_F(idf)%W_V(iv)%nbopp, & 
    10731073 &    W_F(idf)%W_V(iv)%sopp(1:W_F(idf)%W_V(iv)%nbopp), & 
    10741074 &    W_F(idf)%W_V(iv)%scal(1:W_F(idf)%W_V(iv)%nbopp) 
     
    11641164!- 
    11651165  IF (l_dbg) THEN 
    1166     WRITE(*,*) "histdef : 3.0" 
     1166    WRITE(ipslout,*) "histdef : 3.0" 
    11671167  ENDIF 
    11681168!- 
     
    11771177    W_F(idf)%W_V(iv)%t_bf(:) = 0. 
    11781178    IF (l_dbg) THEN 
    1179       WRITE(*,*) "histdef : 3.0 allocating time_buffer for", & 
     1179      WRITE(ipslout,*) "histdef : 3.0 allocating time_buffer for", & 
    11801180 &      " idf = ",idf," iv = ",iv," size = ",buff_sz 
    11811181    ENDIF 
     
    11871187!     The strategy is to bring it back to seconds for the tests 
    11881188!- 
    1189   IF (l_dbg) WRITE(*,*) "histdef : 4.0" 
     1189  IF (l_dbg) WRITE(ipslout,*) "histdef : 4.0" 
    11901190!- 
    11911191  W_F(idf)%W_V(iv)%freq_opp = pfreq_opp 
     
    12721272! 5.0 Initialize other variables of the common 
    12731273!- 
    1274   IF (l_dbg) WRITE(*,*) "histdef : 5.0" 
     1274  IF (l_dbg) WRITE(ipslout,*) "histdef : 5.0" 
    12751275!- 
    12761276  W_F(idf)%W_V(iv)%hist_wrt_rng = (PRESENT(var_range)) 
     
    12981298! 6.0 Get the time axis for this variable 
    12991299!- 
    1300   IF (l_dbg) WRITE(*,*) "histdef : 6.0" 
     1300  IF (l_dbg) WRITE(ipslout,*) "histdef : 6.0" 
    13011301!- 
    13021302! No time axis for once, l_max, l_min or never operation 
     
    13311331  ELSE 
    13321332    IF (l_dbg) THEN 
    1333       WRITE(*,*) "histdef : 7.0 ",TRIM(W_F(idf)%W_V(iv)%topp),'----' 
     1333      WRITE(ipslout,*) "histdef : 7.0 ",TRIM(W_F(idf)%W_V(iv)%topp),'----' 
    13341334    ENDIF 
    13351335    W_F(idf)%W_V(iv)%t_axid = -99 
     
    13851385! 1.0 Create the time axes 
    13861386!- 
    1387   IF (l_dbg) WRITE(*,*) "histend : 1.0" 
     1387  IF (l_dbg) WRITE(ipslout,*) "histend : 1.0" 
    13881388!- 
    13891389! 1.1 Define the time dimensions needed for this file 
     
    14731473! 2.0 declare the variables 
    14741474!- 
    1475   IF (l_dbg) WRITE(*,*) "histend : 2.0" 
     1475  IF (l_dbg) WRITE(ipslout,*) "histend : 2.0" 
    14761476!- 
    14771477  DO iv=1,W_F(idf)%n_var 
     
    15751575!- 
    15761576        IF (l_dbg) THEN 
    1577           WRITE(*,*) "histend : 2.0.n, freq_opp, freq_wrt", & 
     1577          WRITE(ipslout,*) "histend : 2.0.n, freq_opp, freq_wrt", & 
    15781578 &          W_F(idf)%W_V(iv)%freq_opp,W_F(idf)%W_V(iv)%freq_wrt 
    15791579        ENDIF 
     
    15961596! 3.0 Put the netcdf file into write mode 
    15971597!- 
    1598   IF (l_dbg) WRITE(*,*) "histend : 3.0" 
     1598  IF (l_dbg) WRITE(ipslout,*) "histend : 3.0" 
    15991599!- 
    16001600  iret = NF90_ENDDEF (nfid) 
     
    16021602! 4.0 Give some informations to the user 
    16031603!- 
    1604   IF (l_dbg) WRITE(*,*) "histend : 4.0" 
     1604  IF (l_dbg) WRITE(ipslout,*) "histend : 4.0" 
    16051605!- 
    16061606  WRITE(str70,'("All variables have been initialized on file :",I3)') idf 
     
    16821682!- 
    16831683  IF (l_dbg) THEN 
    1684     WRITE(*,*) "histwrite : ",c_nam 
     1684    WRITE(ipslout,*) "histwrite : ",c_nam 
    16851685  ENDIF 
    16861686!- 
     
    17911791    IF (.NOT.ALLOCATED(tbf_1)) THEN 
    17921792      IF (l_dbg) THEN 
    1793         WRITE(*,*) & 
     1793        WRITE(ipslout,*) & 
    17941794 &       c_nam//" : allocate tbf_1 for size = ", & 
    17951795 &       W_F(idf)%W_V(iv)%datasz_max 
     
    17981798    ELSE IF (W_F(idf)%W_V(iv)%datasz_max > SIZE(tbf_1)) THEN 
    17991799      IF (l_dbg) THEN 
    1800         WRITE(*,*) & 
     1800        WRITE(ipslout,*) & 
    18011801 &       c_nam//" : re-allocate tbf_1 for size = ", & 
    18021802 &       W_F(idf)%W_V(iv)%datasz_max 
     
    18711871!- 
    18721872  IF (l_dbg) THEN 
    1873     WRITE(*,*) "histwrite 0.0 : VAR : ",W_F(idf)%W_V(iv)%v_name 
    1874     WRITE(*,*) "histwrite 0.0 : nbindex :",nbindex 
    1875     WRITE(*,*) "histwrite 0.0 : nindex  :",nindex(1:MIN(3,nbindex)),'...' 
     1873    WRITE(ipslout,*) "histwrite 0.0 : VAR : ",W_F(idf)%W_V(iv)%v_name 
     1874    WRITE(ipslout,*) "histwrite 0.0 : nbindex :",nbindex 
     1875    WRITE(ipslout,*) "histwrite 0.0 : nindex  :",nindex(1:MIN(3,nbindex)),'...' 
    18761876  ENDIF 
    18771877!- 
     
    18881888  IF (.NOT.ALLOCATED(tbf_2)) THEN 
    18891889    IF (l_dbg) THEN 
    1890       WRITE(*,*) "histwrite_real 1.1 allocate tbf_2 ",SIZE(tbf_1) 
     1890      WRITE(ipslout,*) "histwrite_real 1.1 allocate tbf_2 ",SIZE(tbf_1) 
    18911891    ENDIF 
    18921892    ALLOCATE(tbf_2(W_F(idf)%W_V(iv)%datasz_max)) 
    18931893  ELSE IF (W_F(idf)%W_V(iv)%datasz_max > SIZE(tbf_2)) THEN 
    18941894    IF (l_dbg) THEN 
    1895       WRITE(*,*) "histwrite_real 1.2 re-allocate tbf_2 : ", & 
     1895      WRITE(ipslout,*) "histwrite_real 1.2 re-allocate tbf_2 : ", & 
    18961896     & SIZE(tbf_1)," instead of ",SIZE(tbf_2) 
    18971897    ENDIF 
     
    19061906!- 
    19071907  IF (l_dbg) THEN 
    1908     WRITE(*,*) "histwrite: 3.0",idf 
     1908    WRITE(ipslout,*) "histwrite: 3.0",idf 
    19091909  ENDIF 
    19101910!- 
     
    19241924 &      nbout,tbf_2) 
    19251925      IF (l_dbg) THEN 
    1926         WRITE(*,*) & 
     1926        WRITE(ipslout,*) & 
    19271927 &       "histwrite: 3.4a nbout : ",nbin,nbout,W_F(idf)%W_V(iv)%sopp(io) 
    19281928      ENDIF 
     
    19341934 &      nbout,tbf_1) 
    19351935      IF (l_dbg) THEN 
    1936         WRITE(*,*) & 
     1936        WRITE(ipslout,*) & 
    19371937 &     "histwrite: 3.4b nbout : ",nbin,nbout,W_F(idf)%W_V(iv)%sopp(io+1) 
    19381938      ENDIF 
     
    19421942!- 
    19431943    IF (l_dbg) THEN 
    1944       WRITE(*,*) & 
     1944      WRITE(ipslout,*) & 
    19451945 &     "histwrite: 3.5 size(tbf_1) : ",SIZE(tbf_1) 
    1946       WRITE(*,*) & 
     1946      WRITE(ipslout,*) & 
    19471947 &     "histwrite: 3.5 slab in X :", & 
    19481948 &     W_F(idf)%W_V(iv)%zorig(1),W_F(idf)%W_V(iv)%zsize(1) 
    1949       WRITE(*,*) & 
     1949      WRITE(ipslout,*) & 
    19501950 &     "histwrite: 3.5 slab in Y :", & 
    19511951 &     W_F(idf)%W_V(iv)%zorig(2),W_F(idf)%W_V(iv)%zsize(2) 
    1952       WRITE(*,*) & 
     1952      WRITE(ipslout,*) & 
    19531953 &     "histwrite: 3.5 slab in Z :", & 
    19541954 &     W_F(idf)%W_V(iv)%zorig(3),W_F(idf)%W_V(iv)%zsize(3) 
    1955       WRITE(*,*) & 
     1955      WRITE(ipslout,*) & 
    19561956 &     "histwrite: 3.5 slab of input:", & 
    19571957 &     W_F(idf)%W_V(iv)%scsize(1), & 
     
    19991999!- 
    20002000    IF (l_dbg) THEN 
    2001       WRITE(*,*) "histwrite: 4.0 tbf_1",idf,iv, & 
     2001      WRITE(ipslout,*) "histwrite: 4.0 tbf_1",idf,iv, & 
    20022002 &      TRIM(tmp_opp),' ---- ',LEN_TRIM(tmp_opp),nbindex 
    20032003    ENDIF 
     
    20162016!- 
    20172017    IF (l_dbg) THEN 
    2018       WRITE(*,*) "histwrite: 5.0 idf : ",idf," iv : ",iv," tsz : ",tsz 
     2018      WRITE(ipslout,*) "histwrite: 5.0 idf : ",idf," iv : ",iv," tsz : ",tsz 
    20192019    ENDIF 
    20202020!- 
     
    20322032! 6.0 Write to file if needed 
    20332033!- 
    2034   IF (l_dbg) WRITE(*,*) "histwrite: 6.0",idf 
     2034  IF (l_dbg) WRITE(ipslout,*) "histwrite: 6.0",idf 
    20352035!- 
    20362036  IF (do_write) THEN 
     
    20412041!-- 6.1 Do the operations that are needed before writting 
    20422042!- 
    2043     IF (l_dbg) WRITE(*,*) "histwrite: 6.1",idf 
     2043    IF (l_dbg) WRITE(ipslout,*) "histwrite: 6.1",idf 
    20442044!- 
    20452045    IF (     (TRIM(tmp_opp) /= "inst") & 
     
    20552055 &      .AND.(TRIM(tmp_opp) /= "once") ) THEN 
    20562056!- 
    2057       IF (l_dbg) WRITE(*,*) "histwrite: 6.2",idf 
     2057      IF (l_dbg) WRITE(ipslout,*) "histwrite: 6.2",idf 
    20582058!- 
    20592059      itax  = W_F(idf)%W_V(iv)%t_axid 
     
    20772077!- 
    20782078    IF (l_dbg) THEN 
    2079       WRITE(*,*) "histwrite: 6.3",idf,nfid,nvid,iv,itime 
     2079      WRITE(ipslout,*) "histwrite: 6.3",idf,nfid,nvid,iv,itime 
    20802080    ENDIF 
    20812081!- 
     
    21592159!- 
    21602160  IF (l_dbg) THEN 
    2161     WRITE(*,*) 'histvar_seq, start of the subroutine :',learning(idf) 
     2161    WRITE(ipslout,*) 'histvar_seq, start of the subroutine :',learning(idf) 
    21622162  ENDIF 
    21632163!- 
     
    22032203 &       'of your code. Thus if you wish to save time'// & 
    22042204 &       ' contact the IOIPSL team. ') 
    2205         WRITE(*,*) 'The sequence we have found up to now :' 
    2206         WRITE(*,*) varseq(idf,1:sp-1) 
     2205        WRITE(ipslout,*) 'The sequence we have found up to now :' 
     2206        WRITE(ipslout,*) varseq(idf,1:sp-1) 
    22072207        varseq_err(idf) = -1 
    22082208      ENDIF 
     
    22682268!- 
    22692269  IF (l_dbg) THEN 
    2270     WRITE(*,*) & 
     2270    WRITE(ipslout,*) & 
    22712271 &   'histvar_seq, end of the subroutine :',TRIM(pvarname),idv 
    22722272  ENDIF 
     
    22942294!- 
    22952295  IF (l_dbg) THEN 
    2296     WRITE(*,*) "->histsync" 
     2296    WRITE(ipslout,*) "->histsync" 
    22972297  ENDIF 
    22982298!- 
     
    23192319    IF (W_F(ifile)%ncfid > 0) THEN 
    23202320      IF (l_dbg) THEN 
    2321         WRITE(*,*) '  histsync - synchronising file number ',ifile 
     2321        WRITE(ipslout,*) '  histsync - synchronising file number ',ifile 
    23222322      ENDIF 
    23232323      iret = NF90_SYNC(W_F(ifile)%ncfid) 
     
    23262326!- 
    23272327  IF (l_dbg) THEN 
    2328     WRITE(*,*) "<-histsync" 
     2328    WRITE(ipslout,*) "<-histsync" 
    23292329  ENDIF 
    23302330!---------------------- 
     
    23492349!- 
    23502350  IF (l_dbg) THEN 
    2351     WRITE(*,*) "->histclo" 
     2351    WRITE(ipslout,*) "->histclo" 
    23522352  ENDIF 
    23532353!- 
     
    23742374    IF (W_F(ifile)%ncfid > 0) THEN 
    23752375      IF (l_dbg) THEN 
    2376         WRITE(*,*) '  histclo - closing specified file number :',ifile 
     2376        WRITE(ipslout,*) '  histclo - closing specified file number :',ifile 
    23772377      ENDIF 
    23782378      nfid = W_F(ifile)%ncfid 
     
    23822382!----- 
    23832383      IF (l_dbg) THEN 
    2384         WRITE(*,*) '  Entering loop on vars : ',W_F(ifile)%n_var 
     2384        WRITE(ipslout,*) '  Entering loop on vars : ',W_F(ifile)%n_var 
    23852385      ENDIF 
    23862386      DO iv=1,W_F(ifile)%n_var 
     
    23882388        IF (W_F(ifile)%W_V(iv)%hist_wrt_rng) THEN 
    23892389          IF (l_dbg) THEN 
    2390             WRITE(*,*) 'min value for file :',ifile,' var n. :',iv, & 
     2390            WRITE(ipslout,*) 'min value for file :',ifile,' var n. :',iv, & 
    23912391 &                     ' is : ',W_F(ifile)%W_V(iv)%hist_minmax(1) 
    2392             WRITE(*,*) 'max value for file :',ifile,' var n. :',iv, & 
     2392            WRITE(ipslout,*) 'max value for file :',ifile,' var n. :',iv, & 
    23932393 &                     ' is : ',W_F(ifile)%W_V(iv)%hist_minmax(2) 
    23942394          ENDIF 
     
    24202420!---- 2. Close the file 
    24212421!----- 
    2422       IF (l_dbg) WRITE(*,*) '  close file :',nfid 
     2422      IF (l_dbg) WRITE(ipslout,*) '  close file :',nfid 
    24232423      iret = NF90_CLOSE(nfid) 
    24242424      W_F(ifile)%ncfid = -1 
     
    24282428!- 
    24292429  IF (l_dbg) THEN 
    2430     WRITE(*,*) "<-histclo" 
     2430    WRITE(ipslout,*) "<-histclo" 
    24312431  ENDIF 
    24322432!--------------------- 
  • IOIPSL/trunk/src/restcom.f90

    r430 r1378  
    88USE netcdf 
    99!- 
    10 USE errioipsl, ONLY : ipslerr,ipsldbg 
     10USE errioipsl, ONLY : ipslerr,ipsldbg, ipslout 
    1111USE stringop 
    1212USE calendar 
     
    230230!- 
    231231  IF (l_dbg) THEN 
    232     WRITE(*,*) 'restini 0.0 : ',TRIM(fnamein),' , ',TRIM(fnameout) 
     232    WRITE(ipslout,*) 'restini 0.0 : ',TRIM(fnamein),' , ',TRIM(fnameout) 
    233233  ENDIF 
    234234!- 
     
    254254!- 
    255255  IF (l_dbg) THEN 
    256     WRITE(*,*) 'restini 0.1 l_fi, l_fo, l_rw : ',l_fi,l_fo,l_rw 
     256    WRITE(ipslout,*) 'restini 0.1 l_fi, l_fo, l_rw : ',l_fi,l_fo,l_rw 
    257257  ENDIF 
    258258!- 
     
    261261  IF (l_fi) THEN 
    262262!--- 
    263     IF (l_dbg) WRITE(*,*) 'restini 1.0 : Open input file' 
     263    IF (l_dbg) WRITE(ipslout,*) 'restini 1.0 : Open input file' 
    264264!-- Add DOMAIN number and ".nc" suffix in file names if needed 
    265265    fname = fnamein 
     
    284284!-- 2.0 The case of a missing restart file is dealt with 
    285285!--- 
    286     IF (l_dbg) WRITE(*,*) 'restini 2.0' 
     286    IF (l_dbg) WRITE(ipslout,*) 'restini 2.0' 
    287287!--- 
    288288    IF (     (ALL(MINLOC(lon(:iim,:jjm)) == MAXLOC(lon(:iim,:jjm)))) & 
     
    340340!- 
    341341  IF (l_dbg) THEN 
    342     WRITE(*,*) 'restini 2.3 : Configure calendar if needed : ', & 
     342    WRITE(ipslout,*) 'restini 2.3 : Configure calendar if needed : ', & 
    343343                calend_str 
    344344  ENDIF 
     
    347347    CALL ioconf_calendar (calend_str) 
    348348    IF (l_dbg) THEN 
    349       WRITE(*,*) 'restini 2.3b : new calendar : ',calend_str 
     349      WRITE(ipslout,*) 'restini 2.3b : new calendar : ',calend_str 
    350350    ENDIF 
    351351  ENDIF 
     
    359359  fid = nb_fi 
    360360  IF (l_dbg) THEN 
    361     WRITE(*,*) 'SIZE of t_index :',SIZE(t_index), & 
     361    WRITE(ipslout,*) 'SIZE of t_index :',SIZE(t_index), & 
    362362               SIZE(t_index,dim=1),SIZE(t_index,dim=2) 
    363     WRITE(*,*) 't_index = ',t_index(fid,:) 
     363    WRITE(ipslout,*) 't_index = ',t_index(fid,:) 
    364364  ENDIF 
    365365  itau = t_index(fid,1) 
    366366!- 
    367   IF (l_dbg) WRITE(*,*) 'restini END' 
     367  IF (l_dbg) WRITE(ipslout,*) 'restini END' 
    368368!--------------------- 
    369369END SUBROUTINE restini 
     
    502502! 2.0 Get the list of variables 
    503503!- 
    504   IF (l_dbg) WRITE(*,*) 'restopenin 1.2' 
     504  IF (l_dbg) WRITE(ipslout,*) 'restopenin 1.2' 
    505505!- 
    506506  lat_vid = -1 
     
    663663      CALL ioconf_calendar (calendar) 
    664664      IF (l_dbg) THEN 
    665         WRITE(*,*) 'restsett : calendar of the restart ',calendar 
     665        WRITE(ipslout,*) 'restsett : calendar of the restart ',calendar 
    666666      ENDIF 
    667667    ENDIF 
     
    669669  CALL ioget_calendar (one_year,one_day) 
    670670  IF (l_dbg) THEN 
    671     WRITE(*,*) 'one_year,one_day = ',one_year,one_day 
     671    WRITE(ipslout,*) 'one_year,one_day = ',one_year,one_day 
    672672  ENDIF 
    673673!- 
     
    681681      t_index(nb_fi,:) = itau 
    682682      IF (l_dbg) THEN 
    683         WRITE(*,*) "nb_fi,t_index",nb_fi,t_index(nb_fi,:) 
     683        WRITE(ipslout,*) "nb_fi,t_index",nb_fi,t_index(nb_fi,:) 
    684684      ENDIF 
    685685      CALL ju2ymds (date0,year0,month0,day0,sec0) 
     
    691691      strc=':' 
    692692      IF (l_dbg) THEN 
    693         WRITE(*,*) date0 
     693        WRITE(ipslout,*) date0 
    694694        WRITE (UNIT=itau_orig,FMT='(I4.4,5(A,I2.2))') & 
    695695 &       year0,'-',month0,'-',day0,' ',hours0,':',minutes0,':',seci 
    696         WRITE(*,*) "itau_orig : ",itau_orig 
     696        WRITE(ipslout,*) "itau_orig : ",itau_orig 
    697697      ENDIF 
    698698    ELSE 
    699699      iret = NF90_GET_VAR(ncfid,tind_varid_in(nb_fi),t_index(nb_fi,:)) 
    700700      IF (l_dbg) THEN 
    701         WRITE(*,*) "restsett, time axis : ",t_index(nb_fi,:) 
     701        WRITE(ipslout,*) "restsett, time axis : ",t_index(nb_fi,:) 
    702702      ENDIF 
    703703      iret = NF90_GET_ATT(ncfid,tind_varid_in(nb_fi),'units',itau_orig) 
     
    727727    iret = NF90_GET_ATT(ncfid,tax_varid_in(nb_fi),'calendar',tmp_cal) 
    728728    IF (l_dbg) THEN 
    729       WRITE(*,*) 'restsett : tmp_calendar of the restart ',tmp_cal 
     729      WRITE(ipslout,*) 'restsett : tmp_calendar of the restart ',tmp_cal 
    730730    ENDIF 
    731731!--- 
     
    744744!-- to get ride of the intial date. 
    745745!--- 
    746     IF (l_dbg) WRITE(*,*) 'tax_orig : ',TRIM(tax_orig) 
     746    IF (l_dbg) WRITE(ipslout,*) 'tax_orig : ',TRIM(tax_orig) 
    747747    READ (UNIT=tax_orig,FMT='(I4.4,5(a,I2.2))') & 
    748748      year0,strc,month0,strc,day0,strc, & 
     
    831831  CALL ipsldbg (old_status=l_dbg) 
    832832!- 
    833   IF (l_dbg) WRITE(*,*) "restopenout 0.0 ",TRIM(fname) 
     833  IF (l_dbg) WRITE(ipslout,*) "restopenout 0.0 ",TRIM(fname) 
    834834!- 
    835835!  If we use the same file for input and output 
     
    863863! 1.0 Longitude 
    864864!- 
    865   IF (l_dbg) WRITE(*,*) "restopenout 1.0" 
     865  IF (l_dbg) WRITE(ipslout,*) "restopenout 1.0" 
    866866!- 
    867867  iret = NF90_DEF_VAR(ncfid,"nav_lon",NF90_FLOAT,(/x_id,y_id/),nlonid) 
     
    873873! 2.0 Latitude 
    874874!- 
    875   IF (l_dbg) WRITE(*,*) "restopenout 2.0" 
     875  IF (l_dbg) WRITE(ipslout,*) "restopenout 2.0" 
    876876!- 
    877877  iret = NF90_DEF_VAR(ncfid,"nav_lat",NF90_FLOAT,(/x_id,y_id/),nlatid) 
     
    883883! 3.0 Levels 
    884884!- 
    885   IF (l_dbg) WRITE(*,*) "restopenout 3.0" 
     885  IF (l_dbg) WRITE(ipslout,*) "restopenout 3.0" 
    886886!- 
    887887  iret = NF90_DEF_VAR(ncfid,"nav_lev",NF90_FLOAT,z_id,nlevid) 
     
    895895! 4.0 Time axis, this is the seconds since axis 
    896896!- 
    897   IF (l_dbg) WRITE(*,*) "restopenout 4.0" 
     897  IF (l_dbg) WRITE(ipslout,*) "restopenout 4.0" 
    898898!- 
    899899  iret = NF90_DEF_VAR(ncfid,"time",NF90_FLOAT, & 
     
    923923! 5.0 Time axis, this is the time steps since axis 
    924924!- 
    925   IF (l_dbg) WRITE(*,*) "restopenout 5.0" 
     925  IF (l_dbg) WRITE(ipslout,*) "restopenout 5.0" 
    926926!- 
    927927  iret = NF90_DEF_VAR(ncfid,"time_steps",NF90_INT, & 
     
    984984  iret = NF90_REDEF(ncfid) 
    985985!- 
    986   IF (l_dbg) WRITE(*,*) "restopenout END" 
     986  IF (l_dbg) WRITE(ipslout,*) "restopenout END" 
    987987!------------------------- 
    988988END SUBROUTINE restopenout 
     
    19021902! 1.0 Check if the variable is already present 
    19031903!- 
    1904   IF (l_dbg) WRITE(*,*) 'RESTPUT 1.0 : ',TRIM(vname_q) 
     1904  IF (l_dbg) WRITE(ipslout,*) 'RESTPUT 1.0 : ',TRIM(vname_q) 
    19051905!- 
    19061906  CALL find_str (varname_out(fid,1:nbvar_out(fid)),vname_q,vnb) 
    19071907!- 
    19081908  IF (l_dbg) THEN 
    1909     WRITE(*,*) 'RESTPUT 1.1 : ',varname_out(fid,1:nbvar_out(fid)),vnb 
     1909    WRITE(ipslout,*) 'RESTPUT 1.1 : ',varname_out(fid,1:nbvar_out(fid)),vnb 
    19101910  ENDIF 
    19111911!- 
     
    19191919  vid = varid_out(fid,vnb) 
    19201920!- 
    1921   IF (l_dbg) WRITE(*,*) 'RESTPUT 2.0 : ',vnb,vid 
     1921  IF (l_dbg) WRITE(ipslout,*) 'RESTPUT 2.0 : ',vnb,vid 
    19221922!- 
    19231923! 2.1 Is this file already in write mode ? 
     
    19321932!     If not then check that all variables of previous time is OK. 
    19331933!- 
    1934   IF (l_dbg) WRITE(*,*) 'RESTPUT 3.0 : ',itau,itau_out(fid) 
     1934  IF (l_dbg) WRITE(ipslout,*) 'RESTPUT 3.0 : ',itau,itau_out(fid) 
    19351935!- 
    19361936  IF (itau /= itau_out(fid)) THEN 
     
    19421942    IF (tstp_out(fid) == 0) THEN 
    19431943      IF (nbvar_out(fid) < nbvar_read(fid)) THEN 
    1944         WRITE(*,*) "ERROR :",tstp_out(fid), & 
     1944        WRITE(ipslout,*) "ERROR :",tstp_out(fid), & 
    19451945                   nbvar_out(fid),nbvar_read(fid) 
    19461946        CALL ipslerr (1,'restput', & 
     
    19551955      ENDDO 
    19561956      IF (ierr > 0) THEN 
    1957         WRITE(*,*) "ERROR :",nbvar_out(fid) 
     1957        WRITE(ipslout,*) "ERROR :",nbvar_out(fid) 
    19581958        CALL ipslerr (1,'restput', & 
    19591959 &        'There are fewer variables in the output file for this', & 
     
    19711971!--- 
    19721972    IF (l_dbg) THEN 
    1973       WRITE(*,*) 'RESTPUT 3.1 : ',itau,secsince,corner(1),edge(1) 
     1973      WRITE(ipslout,*) 'RESTPUT 3.1 : ',itau,secsince,corner(1),edge(1) 
    19741974    ENDIF 
    19751975!--- 
     
    20582058!- 
    20592059  IF (l_dbg) THEN 
    2060     WRITE(*,*) 'restdefv 1.0 :',TRIM(varname),nbvar_out(fid) 
     2060    WRITE(ipslout,*) 'restdefv 1.0 :',TRIM(varname),nbvar_out(fid) 
    20612061  ENDIF 
    20622062!- 
     
    21342134!- 
    21352135  IF (l_dbg) THEN 
    2136     WRITE(*,*) 'restdefv 2.0 :',ndim,' :: ',dims(1:ndim),tdimid_out(fid) 
     2136    WRITE(ipslout,*) 'restdefv 2.0 :',ndim,' :: ',dims(1:ndim),tdimid_out(fid) 
    21372137  ENDIF 
    21382138!- 
     
    21692169!- 
    21702170  IF (l_dbg) THEN 
    2171     WRITE(*,*) & 
     2171    WRITE(ipslout,*) & 
    21722172 &    'restdefv 3.0 : LIST OF VARS ',varname_out(fid,1:nbvar_out(fid)) 
    21732173  ENDIF 
     
    21932193  IF (.NOT.ALLOCATED(t_index) .AND. .NOT.ALLOCATED(t_julian)) THEN 
    21942194    IF (l_msg) THEN 
    2195       WRITE(*,*) TRIM(c_p)//' : Allocate times axes at :', & 
     2195      WRITE(ipslout,*) TRIM(c_p)//' : Allocate times axes at :', & 
    21962196 &               max_file,tax_size_in(nb_fi) 
    21972197    ENDIF 
     
    21992199    ALLOCATE(t_index(max_file,tax_size_in(nb_fi)),STAT=i_err) 
    22002200    IF (i_err/=0) THEN 
    2201       WRITE(*,*) "ERROR IN ALLOCATION of t_index : ",i_err 
     2201      WRITE(ipslout,*) "ERROR IN ALLOCATION of t_index : ",i_err 
    22022202      CALL ipslerr (3,TRIM(c_p), & 
    22032203 &      'Problem in allocation of t_index','', & 
     
    22082208    ALLOCATE(t_julian(max_file,tax_size_in(nb_fi)),STAT=i_err) 
    22092209    IF (i_err/=0) THEN 
    2210       WRITE(*,*) "ERROR IN ALLOCATION of t_julian : ",i_err 
     2210      WRITE(ipslout,*) "ERROR IN ALLOCATION of t_julian : ",i_err 
    22112211      CALL ipslerr (3,TRIM(c_p), & 
    22122212 &      'Problem in allocation of max_file,tax_size_in','', & 
     
    22172217 &         .OR.(SIZE(t_julian,DIM=2) < tax_size_in(nb_fi)) ) THEN 
    22182218    IF (l_msg) THEN 
    2219       WRITE(*,*) TRIM(c_p)//' : Reallocate times axes at :', & 
     2219      WRITE(ipslout,*) TRIM(c_p)//' : Reallocate times axes at :', & 
    22202220 &               max_file,tax_size_in(nb_fi) 
    22212221    ENDIF 
     
    22232223    ALLOCATE (tmp_index(max_file,tax_size_in(nb_fi)),STAT=i_err) 
    22242224    IF (i_err/=0) THEN 
    2225       WRITE(*,*) "ERROR IN ALLOCATION of tmp_index : ",i_err 
     2225      WRITE(ipslout,*) "ERROR IN ALLOCATION of tmp_index : ",i_err 
    22262226      CALL ipslerr (3,TRIM(c_p), & 
    22272227 &      'Problem in allocation of tmp_index','', & 
     
    22332233    ALLOCATE (t_index(max_file,tax_size_in(nb_fi)),STAT=i_err) 
    22342234    IF (i_err/=0) THEN 
    2235       WRITE(*,*) "ERROR IN ALLOCATION of t_index : ",i_err 
     2235      WRITE(ipslout,*) "ERROR IN ALLOCATION of t_index : ",i_err 
    22362236      CALL ipslerr (3,TRIM(c_p), & 
    22372237 &     'Problem in reallocation of t_index','', & 
     
    22422242    ALLOCATE (tmp_julian(max_file,tax_size_in(nb_fi)),STAT=i_err) 
    22432243    IF (i_err/=0) THEN 
    2244       WRITE(*,*) "ERROR IN ALLOCATION of tmp_julian : ",i_err 
     2244      WRITE(ipslout,*) "ERROR IN ALLOCATION of tmp_julian : ",i_err 
    22452245      CALL ipslerr (3,TRIM(c_p), & 
    22462246 &     'Problem in allocation of tmp_julian','', & 
     
    22522252    ALLOCATE (t_julian(max_file,tax_size_in(nb_fi)),STAT=i_err) 
    22532253    IF (i_err/=0) THEN 
    2254       WRITE(*,*) "ERROR IN ALLOCATION of t_julian : ",i_err 
     2254      WRITE(ipslout,*) "ERROR IN ALLOCATION of t_julian : ",i_err 
    22552255      CALL ipslerr (3,TRIM(c_p), & 
    22562256 &      'Problem in reallocation of t_julian','', & 
     
    23082308      IF (    (l_alloc1.AND.ALLOCATED(buff_tmp1)) & 
    23092309 &        .OR.(l_alloc2.AND.ALLOCATED(buff_tmp2)) ) THEN 
    2310         WRITE(*,*) TRIM(c_p)//" : re_allocate "//TRIM(cbn)//"=",i_qsz 
     2310        WRITE(ipslout,*) TRIM(c_p)//" : re_allocate "//TRIM(cbn)//"=",i_qsz 
    23112311      ELSE 
    2312         WRITE(*,*) TRIM(c_p)//" : allocate "//TRIM(cbn)//"=",i_qsz 
     2312        WRITE(ipslout,*) TRIM(c_p)//" : allocate "//TRIM(cbn)//"=",i_qsz 
    23132313      ENDIF 
    23142314    ENDIF 
     
    24792479!--- 
    24802480    IF (l_dbg) THEN 
    2481       WRITE(*,*) & 
     2481      WRITE(ipslout,*) & 
    24822482        'restclo : Closing specified restart file number :', & 
    24832483        fid,netcdf_id(fid,1:2) 
     
    25112511  ELSE 
    25122512!--- 
    2513     IF (l_dbg) WRITE(*,*) 'restclo : Closing all files' 
     2513    IF (l_dbg) WRITE(ipslout,*) 'restclo : Closing all files' 
    25142514!--- 
    25152515    DO ifnc=1,nb_fi 
Note: See TracChangeset for help on using the changeset viewer.