I am having issues changing ioapi file projection using allocator.exe
Projection from LATLON TO LCC
SCRIPT:
#! /bin/csh -f #******************* Allocate Run Script ************************************* # Allocates an I/O API file onto a different map projection # Dec. 2007, LR -- projection specification changes #***************************************************************************** setenv DEBUG_OUTPUT Y # Set executable setenv EXE "/Spatial-Allocator/bin/32bits/allocator.exe" #"$SA_HOME/bin/32bits/allocator.exe" set SA_HOME = /prefia_project/Spatial-Allocator # Set Input Directory setenv DATADIR $SA_HOME/data setenv OUTPUT $SA_HOME/output # Select method of spatial analysis setenv MIMS_PROCESSING ALLOCATE setenv TIME time #set "data" shapefile parameters setenv GRIDDESC $DATADIR/GRIDDESC #set parameters for file being allocated setenv INPUT_FILE_NAME $DATADIR/EF_IOAPI_DO1.ncf #hr1800_2001.ioapi setenv INPUT_FILE_TYPE IoapiFile setenv INPUT_GRID_NAME d01 setenv INPUT_FILE_MAP_PRJN "+proj=latlong" #"+proj=lcc,+lat_1=1.39,+lat_2=49,+lat_0=40.000,+lon_0=85.396" setenv INPUT_FILE_ELLIPSOID "+a=6370000.0,+b=6370000.0" setenv ALLOCATE_ATTRS ALL setenv ALLOC_MODE_FILE ALL_AGGREGATE #ALL_AVERAGE # Whether you select ALL_AGGREGATE or ALL_AVERAGE depends on the # type of data. Population data would typically be aggregated, but # emission densities for example would typically be averaged. # The difference is in whether the result is divided by the size of # the output grid cell. # setenv ALLOC_MODE_FILE ALL_AGGREGATE # Set name and path of resulting shapefile setenv OUTPUT_FILE_NAME $OUTPUT/newFile.ncf setenv OUTPUT_FILE_TYPE IoapiFile setenv OUTPUT_GRID_NAME ASIA_d01 setenv OUTPUT_FILE_MAP_PRJN #"+proj=lcc,+lat_1=1.39,+lat_2=49,+lat_0=40.000,+lon_0=85.396" #"+proj=latlong" setenv OUTPUT_FILE_ELLIPSOID "+a=6370000.0,+b=6370000.0" #echo "Allocating I/O API file to new map projection" $TIME $EXE
LOG FILE WITH ERROR:
WARNING: Environment variable: MAX_INPUT_FILE_SHAPES, not set WARNING: Environment variable: OVERLAY_TYPE, not set WARNING: Environment variable: MAX_LINE_SEG, not set WARNING: Environment variable: OVERLAY_TYPE, not set WARNING: Environment variable: MAX_LINE_SEG, not set Spatial Allocator Version 3.6, 03/10/2009 EV: MIMS_PROCESSING=ALLOCATE EV: ALLOCATE_ATTRS=ALL EV: OUTPUT_FILE_NAME= /Spatial-Allocator/output/newFile.ncf Using ALLOCATE mode EV: OUTPUT_FILE_TYPE=IoapiFile EV: OUTPUT_FILE_TYPE=IoapiFile EV: OUTPUT_FILE_TYPE=IoapiFile Reading Regular Grid EV: OUTPUT_GRID_NAME=ASIA_d01 MAX_LINE_SEG not set, discretization intervals disabled griddesc file name = /Spatial-Allocator/data/GRIDDESC Ellipsoid var = OUTPUT_FILE_ELLIPSOID EV: OUTPUT_FILE_ELLIPSOID=+a=6370000.0,+b=6370000.0 Ellipsoid=+a=6370000.0,+b=6370000.0 EV: OUTPUT_GRID_NAME=ASIA_d01 Not using BB optimization Finished reading the output file...... EV: INPUT_FILE_TYPE=IoapiFile EV: INPUT_FILE_ELLIPSOID=+a=6370000.0,+b=6370000.0 Ellipsoid=+a=6370000.0,+b=6370000.0 EV: INPUT_FILE_MAP_PRJN=+proj=latlong EV: INPUT_FILE_TYPE=IoapiFile EV: OUTPUT_FILE_TYPE=IoapiFile Reading Regular Grid from I/O API file EV: INPUT_FILE_NAME=/Spatial-Allocator/data/EF_IOAPI_DO1.ncf MAX_LINE_SEG not set, discretization intervals disabled This program uses the EPA-AREAL/MCNC-EnvPgms/BAMS Models-3 I/O Applications Programming Interface, [I/O API] which is built on top of the netCDF I/O library (Copyright 1993, 1996 University Corporation for Atmospheric Research/Unidata Program) and the PVM parallel-programming library (from Oak Ridge National Laboratory). Copyright (C) 1992-2002 MCNC and Carlie J. Coats, Jr., and 2003-2006 Baron Advanced Meteorological Systems, LLC and released under the GNU LGPL License, version 2.1. See URL http://www.baronams.com/products/ioapi/LGPL.txt for conditions of use. Library release tag: $JDate: 2010068 $ $Id: @(#) ioapi library version 3.1 $ Version with PARMS3.EXT/PARAMETER::MXVARS3= 2048 netCDF version "4.0" of Nov 12 2008 12:22:06 $ Missing environment variable EXECUTION_ID I/O API not yet initialized Value for IOAPI_CHECK_HEADERS not defined;returning default: FALSE "INPUT_FILE_NAME" opened as OLD:READ-ONLY File name "/Spatial-Allocator/data/EF_IOAPI_DO1.ncf" File type GRDDED3 Execution ID "????????????????" Grid name "ASIA_d01" Dimensions: 118 rows, 118 cols, 1 lays, 37 vbles NetCDF ID: 3 opened as READONLY Time-independent data. ERROR in /Spatial-Allocator/bin/32bits/allocator.exe: Error in projectionPointInt: p.u=HUGE_VAL. Exiting... Input projection: args[1]=+a=6370000.0 args[2]=+b=6370000.0 setting geographic lat-long parameters PROJ args=+proj=latlong+a=6370000.0+b=6370000.0 Output projection: args[1]=+a=6370000.0 args[2]=+b=6370000.0 setting Lambert Conic Conformal -- 2SP parameters PROJ args=+proj=lcc+a=6370000.0+b=6370000.0+lat_1=30.000000+lat_2=60.000000+lon_0=85.396000+lat_0=40.000000+units=m Not using BB optimization 0.015u 0.016s 0:00.04 50.0% 0+0k 10570+7io 28pf+0w args[2]=+b=6370000.0 setting geographic lat-long parameters PROJ args=+proj=latlong+a=6370000.0+b=6370000.0 Output projection: args[1]=+a=6370000.0 args[2]=+b=6370000.0 setting Lambert Conic Conformal -- 2SP parameters PROJ args=+proj=lcc+a=6370000.0+b=6370000.0+lat_1=30.000000+lat_2=60.000000+lon_0=85.396000+lat_0=40.000000+units=m Not using BB optimization
0.015u 0.016s 0:00.04 50.0% 0+0k 10570+7io 28pf+0w
KINDLY ASSIST
Thanks
JOHN