Skip to content

Commit

Permalink
Convert FIPS to integers for output to NetCDF (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
cseppan committed May 26, 2022
1 parent 9c7cb2e commit 5d8e22a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/emutil/gentpro.f
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ PROGRAM GENTPRO
INTEGER, ALLOCATABLE :: SRGSTA ( : ) ! list of state in surrogates
INTEGER, ALLOCATABLE :: INDXREF ( : ) ! Index of matched xref entries
INTEGER, ALLOCATABLE :: MATCHED ( :,: ) ! FIPS/SCC/POL matched source
INTEGER, ALLOCATABLE :: ISRGFIPS( : ) ! FIPS as integers

C........... character arrays
CHARACTER(16) SEGMENT( MXSEG )
Expand Down Expand Up @@ -1779,12 +1780,18 @@ PROGRAM GENTPRO

JDATE = SDATE
JTIME = STIME

ALLOCATE( ISRGFIPS( NSRGFIPS ), STAT=IOS )
CALL CHECKMEM( IOS, 'ISRGFIPS', PROGNAME )
DO I = 1, NSRGFIPS
ISRGFIPS( I ) = STR2INT( SRGFIPS( I ) )
END DO

DO T = 1, NSTEPS

C................. Write county codes to file
IF( .NOT. WRITE3( HNAME, 'COUNTIES', JDATE, JTIME,
& SRGFIPS ) ) THEN
& ISRGFIPS ) ) THEN
MESG = 'Could not write county codes to "' //
& TRIM( HNAME ) // '".'
CALL M3EXIT( PROGNAME, JDATE, JTIME, MESG, 2 )
Expand Down

0 comments on commit 5d8e22a

Please sign in to comment.