Changeset 1524
- Timestamp:
- 08/09/11 10:13:26 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
IOIPSL/trunk/src/restcom.f90
r1378 r1524 49 49 INTEGER,SAVE :: nb_fi = 0 50 50 INTEGER,DIMENSION(max_file,2),SAVE :: netcdf_id = -1 51 CHARACTER(LEN=120),DIMENSION(max_file,2),SAVE :: netcdf_name='NONE' 51 52 !- 52 53 ! Description of the content of the 'in' files and the 'out' files. … … 268 269 CALL restopenin (nb_fi,fname,l_rw,iim,jjm,lon,lat,llm,lev,ncfid) 269 270 netcdf_id(nb_fi,1) = ncfid 271 netcdf_name(nb_fi,1) = TRIM(fnamein) 270 272 !--- 271 273 !-- 1.3 Extract the time information … … 324 326 (nb_fi,fname,iim,jjm,lon,lat,llm,lev,dt,date0,ncfid,domain_id) 325 327 netcdf_id(nb_fi,2) = ncfid 328 netcdf_name(nb_fi,2) = TRIM(fnameout) 326 329 ELSE IF (l_fi.AND.l_fo) THEN 327 330 netcdf_id(nb_fi,2) = netcdf_id(nb_fi,1) 331 netcdf_name(nb_fi,2) = netcdf_name(nb_fi,1) 328 332 varname_out(nb_fi,:) = varname_in(nb_fi,:) 329 333 nbvar_out(nb_fi) = nbvar_in(nb_fi) … … 1372 1376 CHARACTER(LEN=80) attname 1373 1377 INTEGER,DIMENSION(4) :: corner,edge 1374 !--------------------------------------------------------------------- 1378 LOGICAL :: l_dbg 1379 !--------------------------------------------------------------------- 1380 CALL ipsldbg (old_status=l_dbg) 1381 !--------------------------------------------------------------------- 1382 IF (l_dbg) WRITE(ipslout,*) 'RESTGET 0.0 : ',netcdf_name(fid,2),vname_q,iim,jjm,llm,itau,def_beha 1383 !- 1375 1384 ncfid = netcdf_id(fid,1) 1376 1385 !- … … 1379 1388 ! 1.0 If the variable is not present then ERROR or filled up 1380 1389 ! by default values if allowed 1390 !- 1391 IF (l_dbg) WRITE(ipslout,*) 'RESTGET 1.0 : ',vnb 1381 1392 !- 1382 1393 IF (vnb < 0) THEN … … 1402 1413 !----- 1403 1414 CALL restdefv (fid,vname_q,iim,jjm,llm,.TRUE.) 1415 IF (l_dbg) WRITE(ipslout,*) 'RESTGET 1.1 : ',vnb 1404 1416 !----- 1405 1417 ELSE … … 1416 1428 !--- 1417 1429 vid = varid_in(fid,vnb) 1430 IF (l_dbg) WRITE(ipslout,*) 'RESTGET 2.0 : ',vid 1418 1431 !--- 1419 1432 nbvar_read(fid) = nbvar_read(fid)+1 … … 1437 1450 & str,'is not available in the current file',' ') 1438 1451 ENDIF 1452 IF (l_dbg) WRITE(ipslout,*) 'RESTGET 3.0 : ',index 1439 1453 !--- 1440 1454 !-- 4.0 Read the data. Note that the variables in the restart files … … 1488 1502 iret = NF90_GET_VAR(ncfid,vid,var, & 1489 1503 & start=corner(1:ndim),count=edge(1:ndim)) 1504 IF (l_dbg) WRITE(ipslout,*) 'RESTGET 4.0 : ',iret 1490 1505 !--- 1491 1506 !-- 5.0 The variable we have just read is created … … 1899 1914 ENDIF 1900 1915 CALL ioget_calendar (one_year,one_day) 1916 !- 1917 ! 0.0 show arguments 1918 IF (l_dbg) WRITE(ipslout,*) 'RESTPUT 0.0 : ',netcdf_name(fid,2),vname_q,iim,jjm,llm,itau 1901 1919 !- 1902 1920 ! 1.0 Check if the variable is already present … … 2053 2071 IF (itau_out(fid) >= 0) THEN 2054 2072 iret = NF90_REDEF(ncfid) 2073 IF (l_dbg) THEN 2074 WRITE(ipslout,*) 'restdefv 0.0 : REDEF',itau_out(fid) 2075 ENDIF 2055 2076 ENDIF 2056 2077 !- … … 2481 2502 WRITE(ipslout,*) & 2482 2503 'restclo : Closing specified restart file number :', & 2483 fid,netcdf_id(fid,1:2) 2504 fid,netcdf_id(fid,1:2),netcdf_name(fid,1:2) 2484 2505 ENDIF 2485 2506 !--- … … 2490 2511 WRITE (n_f,'(I3)') netcdf_id(fid,1) 2491 2512 CALL ipslerr (2,'restclo', & 2492 "Error "//n_e//" in closing file : "//n_f, '',' ')2513 "Error "//n_e//" in closing file : "//n_f,netcdf_name(fid,1),' ') 2493 2514 ENDIF 2494 2515 IF (netcdf_id(fid,1) == netcdf_id(fid,2)) THEN 2495 2516 netcdf_id(fid,2) = -1 2517 netcdf_name(fid,2) = 'NONE' 2496 2518 ENDIF 2497 2519 netcdf_id(fid,1) = -1 2520 netcdf_name(fid,1) = 'NONE' 2498 2521 ENDIF 2499 2522 !--- … … 2504 2527 WRITE (n_f,'(I3)') netcdf_id(fid,2) 2505 2528 CALL ipslerr (2,'restclo', & 2506 "Error "//n_e//" in closing file : "//n_f, '',' ')2529 "Error "//n_e//" in closing file : "//n_f,netcdf_name(fid,2),' ') 2507 2530 ENDIF 2508 2531 netcdf_id(fid,2) = -1 2532 netcdf_name(fid,2) = 'NONE' 2509 2533 ENDIF 2510 2534 !--- … … 2520 2544 WRITE (n_f,'(I3)') netcdf_id(ifnc,1) 2521 2545 CALL ipslerr (2,'restclo', & 2522 "Error "//n_e//" in closing file : "//n_f,'',' ') 2546 "Error "//n_e//" in closing file : "//n_f,netcdf_name(ifnc,1),' ') 2547 ENDIF 2548 IF (l_dbg) THEN 2549 WRITE(ipslout,*) & 2550 'restclo : Closing specified restart file number :', & 2551 ifnc,netcdf_id(ifnc,1:2),netcdf_name(ifnc,1:2) 2523 2552 ENDIF 2524 2553 IF (netcdf_id(ifnc,1) == netcdf_id(ifnc,2)) THEN 2525 2554 netcdf_id(ifnc,2) = -1 2555 netcdf_name(ifnc,2) = 'NONE' 2526 2556 ENDIF 2527 2557 netcdf_id(ifnc,1) = -1 2558 netcdf_name(ifnc,1) = 'NONE' 2528 2559 ENDIF 2529 2560 !----- … … 2534 2565 WRITE (n_f,'(I3)') netcdf_id(ifnc,2) 2535 2566 CALL ipslerr (2,'restclo', & 2536 "Error "//n_e//" in closing file : "//n_f,'',' ') 2567 "Error "//n_e//" in closing file : "//n_f,netcdf_name(ifnc,2),' ') 2568 END IF 2569 IF (l_dbg) THEN 2570 WRITE(ipslout,*) & 2571 'restclo : Closing specified restart file number :', & 2572 ifnc,netcdf_id(ifnc,1:2),netcdf_name(ifnc,1:2) 2537 2573 END IF 2538 2574 netcdf_id(ifnc,2) = -1 2575 netcdf_name(ifnc,2) = 'NONE' 2539 2576 ENDIF 2540 2577 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.