Changeset 860 for trunk/LMDZ.MARS/util
- Timestamp:
- Jan 9, 2013, 5:49:56 PM (12 years ago)
- Location:
- trunk/LMDZ.MARS/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/util/hrecast.F90
r410 r860 14 14 ! from 90 to -90 (again, you may omit the endpoints). 15 15 ! EM 09/2009 16 ! TN 01/2013 : Adapted for large output files with at least 2 variables > 2 GiB 16 17 17 18 implicit none … … 91 92 logical :: out_has_poles ! Flag: true if output grid includes North and South 92 93 ! poles 94 95 integer, dimension(4) :: edges,corner ! needed to write variables for big files 96 93 97 !=============================================================================== 94 98 ! 1. Input parameters … … 537 541 538 542 ! time 539 ierr=NF_DEF_DIM(outfid,"Time", timelength,time_dimid)543 ierr=NF_DEF_DIM(outfid,"Time",NF_UNLIMITED,time_dimid) 540 544 if (ierr.ne.NF_NOERR) then 541 545 stop "Error: Could not define latitude dimension" … … 858 862 859 863 ! write time 860 ierr=NF_PUT_VAR _REAL(outfid,time_varid,time)864 ierr=NF_PUT_VARA_REAL(outfid,time_varid,1,timelength,time) 861 865 if (ierr.ne.NF_NOERR) then 862 866 stop "Error: Could not write Time data to output file" … … 944 948 enddo 945 949 ! write interpolated data to output 946 ierr=NF_PUT_VAR_REAL(outfid,var_id(i),out_3d_data) 950 corner(:)=1 951 edges(1)=lonlength 952 edges(2)=latlength 953 edges(3)=timelength 954 ierr=NF_PUT_VARA_REAL(outfid,var_id(i),corner(1:3),edges(1:3),out_3d_data) 947 955 if (ierr.ne.NF_NOERR) then 948 956 write(*,*) "Error: Could not write ",trim(var(i))," data to output file" … … 995 1003 enddo 996 1004 ! write interpolated data to output 997 ierr=NF_PUT_VAR_REAL(outfid,var_id(i),out_4d_data) 1005 corner(:)=1 1006 edges(1)=lonlength 1007 edges(2)=latlength 1008 edges(3)=altlength 1009 edges(4)=timelength 1010 ierr=NF_PUT_VARA_REAL(outfid,var_id(i),corner,edges,out_4d_data) 998 1011 if (ierr.ne.NF_NOERR) then 999 1012 write(*,*) "Error: Could not write ",trim(var(i))," data to output file" -
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.