From 5d8e22a9f4eab57b6aedbe3a41cc140f89fb3d61 Mon Sep 17 00:00:00 2001 From: Catherine Seppanen Date: Thu, 26 May 2022 02:43:40 -0400 Subject: [PATCH] Convert FIPS to integers for output to NetCDF (#46) --- src/emutil/gentpro.f | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/emutil/gentpro.f b/src/emutil/gentpro.f index 1a3b5701..693c6035 100644 --- a/src/emutil/gentpro.f +++ b/src/emutil/gentpro.f @@ -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 ) @@ -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 )