Changeset 860 for trunk/LMDZ.MARS/util/zrecast.F90
- Timestamp:
- Jan 9, 2013, 5:49:56 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/util/zrecast.F90
r829 r860 59 59 ! EM 11/2012 : Adapted so it can be used on "generic" model outputs; planet 60 60 ! constants (radius, R, etc.) are now read from file 61 ! TN 01/2013 : Adapted for large output files with at least 2 variables > 2 GiB 62 ! 61 63 implicit none 62 64 … … 138 140 logical :: auto_mcd_levels ! Flag: specific case for MCD automatic above 139 141 ! local surface levels 142 integer,dimension(4) :: edges,corner ! needed to write variables for big files 143 140 144 !=============================================================================== 141 145 ! 1. Input parameters … … 1019 1023 1020 1024 ! time 1021 ierr=NF_DEF_DIM(outfid,"Time", timelength,time_dimid)1025 ierr=NF_DEF_DIM(outfid,"Time",NF_UNLIMITED,time_dimid) 1022 1026 if (ierr.ne.NF_NOERR) then 1023 1027 write(*,*) "Error: Could not define Time dimension" … … 1506 1510 1507 1511 ! Write time 1508 ierr=NF_PUT_VAR _REAL(outfid,time_varid,time)1512 ierr=NF_PUT_VARA_REAL(outfid,time_varid,1,timelength,time) 1509 1513 if (ierr.ne.NF_NOERR) then 1510 1514 write(*,*) "Error: Could not write Time data to output file" … … 1518 1522 1519 1523 ! Write surface pressure 1520 1521 ierr=NF_PUT_VAR_REAL(outfid,ps_varid,ps) 1524 corner(:)=1 1525 edges(1)=lonlength 1526 edges(2)=latlength 1527 edges(3)=timelength 1528 ierr=NF_PUT_VARA_REAL(outfid,ps_varid,corner(1:3),edges(1:3),ps) 1522 1529 if (ierr.ne.NF_NOERR) then 1523 1530 write(*,*) "Error: Could not write ps data to output file" … … 1581 1588 miss_val,ps,press,za_gcm,plevel,outdata) 1582 1589 ! write result to output file 1583 ierr=NF_PUT_VAR_REAL(outfid,za_varid,outdata) 1590 corner(:)=1 1591 edges(1)=lonlength 1592 edges(2)=latlength 1593 edges(3)=nblev 1594 edges(4)=timelength 1595 ierr=NF_PUT_VARA_REAL(outfid,var_id(i),corner,edges,outdata) 1584 1596 if (ierr.ne.NF_NOERR) then 1585 1597 write(*,*) "Error, Failed to write zareoid to output file"
Note: See TracChangeset
for help on using the changeset viewer.