C +-======-+ C Copyright (c) 2003-2007 United States Government as represented by C the Admistrator of the National Aeronautics and Space Administration. C All Rights Reserved. C C THIS OPEN SOURCE AGREEMENT ("AGREEMENT") DEFINES THE RIGHTS OF USE, C REPRODUCTION, DISTRIBUTION, MODIFICATION AND REDISTRIBUTION OF CERTAIN C COMPUTER SOFTWARE ORIGINALLY RELEASED BY THE UNITED STATES GOVERNMENT AS C REPRESENTED BY THE GOVERNMENT AGENCY LISTED BELOW ("GOVERNMENT AGENCY"). C THE UNITED STATES GOVERNMENT, AS REPRESENTED BY GOVERNMENT AGENCY, IS AN C INTENDED THIRD-PARTY BENEFICIARY OF ALL SUBSEQUENT DISTRIBUTIONS OR C REDISTRIBUTIONS OF THE SUBJECT SOFTWARE. ANYONE WHO USES, REPRODUCES, C DISTRIBUTES, MODIFIES OR REDISTRIBUTES THE SUBJECT SOFTWARE, AS DEFINED C HEREIN, OR ANY PART THEREOF, IS, BY THAT ACTION, ACCEPTING IN FULL THE C RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN THIS AGREEMENT. C C Government Agency: National Aeronautics and Space Administration C Government Agency Original Software Designation: GSC-15354-1 C Government Agency Original Software Title: GEOS-5 GCM Modeling Software C User Registration Requested. Please Visit http://opensource.gsfc.nasa.gov C Government Agency Point of Contact for Original Software: C Dale Hithon, SRA Assistant, (301) 286-2691 C C +-======-+ implicit none integer, parameter :: nargs = 3 integer, parameter :: ndummy = 1000 character(len=255) :: arg(nargs) character(len=255) :: fname integer :: nymd, nhms, n, argc, iargc argc = iargc() if ( argc .lt. 1 ) then print*, 'GEOS-5 temporary and specific program ' print*, 'to create d_rst file with date and time' print*, ' Usage: mkdrstdate.x nymd nhms' call exit(0) endif do n=1,argc call getarg(n,arg(n)) enddo read(arg(1), * ) nymd read(arg(2), * ) nhms if (argc==3) then read(arg(3), * ) fname open (10,file=trim(fname),form='unformatted') else open (10,file='d_rst',form='unformatted') endif write(10) ndummy, nymd, nhms close(10) end