Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems running pncglobal2cmaq.py #7

Closed
JeremySilver opened this issue Dec 1, 2015 · 6 comments
Closed

problems running pncglobal2cmaq.py #7

JeremySilver opened this issue Dec 1, 2015 · 6 comments
Assignees

Comments

@JeremySilver
Copy link

Hi there,

I've tried running pncglobal2cmaq.py on some sample data, and after some trial and error, the most I can get this script to do is make dummyicon.nc and dummybcon.nc files, without populating them.

I've copied below the resulting error messages.

Any suggestions/comments/criticism is very welcome.

Thanks!

pncglobal2cmaq.py -f bpch ctm.bpch.v10-01-public-release-Run0 --METBDY3D METBDY3D_testrun --METCRO3D METCRO3D_testrun --mapping=mappings.json --outifolder=icon/ --outbfolder=bcon/
NO2, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'NO2' = 'NO2'; using default file
NO, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'NO' = 'NO'; using default file
O3, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'O3' = 'O3'; using default file
NO3, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'NO3' = 'NO3'; using default file
N2O5, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'N2O5' = 'N2O5'; using default file
HNO3, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'HNO3' = 'HNO3'; using default file
HONO, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'HONO' = 'HNO2'; using default file
PNA, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'PNA' = 'HNO4'; using default file
H2O2, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'H2O2' = 'H2O2'; using default file
NTR, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'NTR' = 'R4N2'; using default file
ROOH, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ROOH' = 'RIP'; using default file
FORM, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'FORM' = 'CH2O'; using default file
ALD2, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ALD2' = 'ALD2'; using default file
PAR, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'PAR' = '1.5 * C3H8 + 4. * ALK4 + 3. * ACET + 4. * MEK + 1. * BENZ + 0.5 * PRPE'; using default file
CO, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'CO' = 'CO'; using default file
MEPX, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'MEPX' = 'MP'; using default file
PAN, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'PAN' = 'PAN'; using default file
PACD, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'PACD' = 'MAP'; using default file
PANX, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'PANX' = 'PPN + PMN'; using default file
OLE, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'OLE' = '0.5 * PRPE'; using default file
IOLE, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'IOLE' = '0.5 * 1./4. * 3. * PRPE'; using default file
TOL, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'TOL' = 'TOLU'; using default file
XYL, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'XYL' = 'XYLE'; using default file
ISOP, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ISOP' = 'ISOP'; using default file
SO2, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SO2' = 'SO2'; using default file
ETHA, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ETHA' = 'C2H6'; using default file
BENZENE, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'BENZENE' = 'BENZ'; using default file
NH3, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'NH3' = 'NH3'; using default file
SV_XYL1, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_XYL1' = '0.19 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_XYL2, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_XYL2' = '0.06 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_TOL1, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_TOL1' = '0.23 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_TOL2, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_TOL2' = '0.23 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_BNZ1, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_BNZ1' = '0.06 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_BNZ2, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_BNZ2' = '0.23 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_TRP1, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_TRP1' = '0.33 * TSOG0 + 0.33 * TSOG1 + 0.33 * TSOG2 + 0.33 * TSOG3'; using default file
SV_TRP2, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_TRP2' = '0.34 * TSOG0 + 0.34 * TSOG1 + 0.34 * TSOG2 + 0.34 * TSOG3'; using default file
SV_ISO1, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_ISO1' = '0.75 * (ISOG1 + ISOG2 + ISOG3)'; using default file
SV_ISO2, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_ISO2' = '0.25 * (ISOG1 + ISOG2 + ISOG3)'; using default file
SV_SQT, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_SQT' = '0.33 * TSOG0 + 0.33 * TSOG1 + 0.33 * TSOG2 + 0.33 * TSOG3'; using default file
ASO4J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ASO4J' = '0.99 * SO4 + 0.0225 * DST1 + 0.0776 * SALA'; using default file
ASO4I, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ASO4I' = '0.01 * SO4'; using default file
AXYL1J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'AXYL1J' = '0.03 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
AXYL2J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'AXYL2J' = '0.01 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
AXYL3J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'AXYL3J' = '0.11 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ATOL1J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ATOL1J' = '0.04 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ATOL2J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ATOL2J' = '0.04 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ATOL3J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ATOL3J' = '0.29 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ABNZ1J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ABNZ1J' = '0.12 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ABNZ2J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ABNZ2J' = '0.04 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ABNZ3J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ABNZ3J' = '0.32 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ATRP1J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ATRP1J' = '0.33 * TSOA0 + 0.33 * TSOA1 + 0.33 * TSOA2 + 0.33 * TSOA3'; using default file
ATRP2J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ATRP2J' = '0.34 * TSOA0 + 0.34 * TSOA1 + 0.34 * TSOA2 + 0.34 * TSOA3'; using default file
AISO1J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'AISO1J' = '0.75 * (ISOA1 + ISOA2 + ISOA3)'; using default file
AISO2J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'AISO2J' = '0.25 * (ISOA1 + ISOA2 + ISOA3)'; using default file
ASQTJ, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ASQTJ' = '0.33 * TSOA0 + 0.33 * TSOA1 + 0.33 * TSOA2 + 0.33 * TSOA3'; using default file
ASOIL, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ASOIL' = '0.95995 * DST2 + 0.95995 * DST3 + 0.95995 * DST4'; using default file
ACLK, **PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ACLK' = '0.01190 * DST2 + 0.01190 * DST3 + 0.01190 * DST4 + 0.5538 * SALC'; using default file
Traceback (most recent call last):
File "/home/563/jds563/.local/bin/pncglobal2cmaq.py", line 1503, in
makeibcon(args)
File "/home/563/jds563/.local/bin/pncglobal2cmaq.py", line 1301, in makeibcon
minout = getdefault(oldcon, vark, noutstep)
File "/home/563/jds563/.local/bin/pncglobal2cmaq.py", line 1157, in getdefault
defval = np.ma.filled(oldcon.variables[vark][:], 0)

@barronh
Copy link
Owner

barronh commented Dec 1, 2015

It looks to me as if you are trying to generate boundary conditions from the benchmark run. I have always used specific inputs before, but this sounds like a functionality that many people may like.

I have updated the pncglobal2cmaq script to have an optional way to achieve this goal. You'll also want to replace PSURF in AIRMASSDEN and AIRDEN with "(hyam[:].reshape(1, -1).T + hybm[:].reshape(1, -1).T * PSURF[:][:, [0]].T).T" as in AIRMOLDEN.

Then the command below will work. METCRO3D and METBDY3D need the VGLVLS property

pncglobal2cmaq.py --sigma --stack=time -f benchmark ctm.bpch.v10-01-public-Run0.2013*00 --mapping=mapping.json --METCRO3D /path/to/cmaq/data/mcip/METCRO3D_Benchmark --METBDY3D /path/to/cmaq/data/mcip/METBDY3D_Benchmark

I tested it on my machine. Try it on yours and tell me if it works for you.

On Nov 30, 2015, at 10:18 PM, nullglob notifications@github.com wrote:

Hi there,

I've tried running pncglobal2cmaq.py on some sample data, and after some trial and error, the most I can get this script to do is make dummyicon.nc and dummybcon.nc files, without populating them.

I've copied below the resulting error messages.

Any suggestions/comments/criticism is very welcome.

Thanks!

#################

pncglobal2cmaq.py -f bpch ctm.bpch.v10-01-public-release-Run0 --METBDY3D METBDY3D_testrun --METCRO3D METCRO3D_testrun --mapping=mappings.json --outifolder=icon/ --outbfolder=bcon/
NO2, _PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'NO2' = 'NO2'; using default file
NO, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'NO' = 'NO'; using default file
O3, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'O3' = 'O3'; using default file
NO3, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'NO3' = 'NO3'; using default file
N2O5, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'N2O5' = 'N2O5'; using default file
HNO3, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'HNO3' = 'HNO3'; using default file
HONO, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'HONO' = 'HNO2'; using default file
PNA, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'PNA' = 'HNO4'; using default file
H2O2, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'H2O2' = 'H2O2'; using default file
NTR, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'NTR' = 'R4N2'; using default file
ROOH, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ROOH' = 'RIP'; using default file
FORM, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'FORM' = 'CH2O'; using default file
ALD2, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ALD2' = 'ALD2'; using default file
PAR, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'PAR' = '1.5 * C3H8 + 4. * ALK4 + 3. * ACET + 4. * MEK + 1. * BENZ + 0.5 * PRPE'; using default file
CO, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'CO' = 'CO'; using default file
MEPX, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'MEPX' = 'MP'; using default file
PAN, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'PAN' = 'PAN'; using default file
PACD, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'PACD' = 'MAP'; using default file
PANX, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'PANX' = 'PPN + PMN'; using default file
OLE, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'OLE' = '0.5 * PRPE'; using default file
IOLE, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'IOLE' = '0.5 * 1./4. * 3. * PRPE'; using default file
TOL, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'TOL' = 'TOLU'; using default file
XYL, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'XYL' = 'XYLE'; using default file
ISOP, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ISOP' = 'ISOP'; using default file
SO2, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SO2' = 'SO2'; using default file
ETHA, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ETHA' = 'C2H6'; using default file
BENZENE, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'BENZENE' = 'BENZ'; using default file
NH3, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'NH3' = 'NH3'; using default file
SV_XYL1, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_XYL1' = '0.19 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_XYL2, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_XYL2' = '0.06 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_TOL1, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_TOL1' = '0.23 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_TOL2, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_TOL2' = '0.23 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_BNZ1, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_BNZ1' = '0.06 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_BNZ2, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_BNZ2' = '0.23 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_TRP1, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_TRP1' = '0.33 * TSOG0 + 0.33 * TSOG1 + 0.33 * TSOG2 + 0.33 * TSOG3'; using default file
SV_TRP2, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_TRP2' = '0.34 * TSOG0 + 0.34 * TSOG1 + 0.34 * TSOG2 + 0.34 * TSOG3'; using default file
SV_ISO1, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_ISO1' = '0.75 * (ISOG1 + ISOG2 + ISOG3)'; using default file
SV_ISO2, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_ISO2' = '0.25 * (ISOG1 + ISOG2 + ISOG3)'; using default file
SV_SQT, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'SV_SQT' = '0.33 * TSOG0 + 0.33 * TSOG1 + 0.33 * TSOG2 + 0.33 * TSOG3'; using default file
ASO4J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ASO4J' = '0.99 * SO4 + 0.0225 * DST1 + 0.0776 * SALA'; using default file
ASO4I, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ASO4I' = '0.01 * SO4'; using default file
AXYL1J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'AXYL1J' = '0.03 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
AXYL2J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'AXYL2J' = '0.01 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
AXYL3J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'AXYL3J' = '0.11 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ATOL1J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ATOL1J' = '0.04 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ATOL2J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ATOL2J' = '0.04 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ATOL3J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ATOL3J' = '0.29 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ABNZ1J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ABNZ1J' = '0.12 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ABNZ2J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ABNZ2J' = '0.04 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ABNZ3J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ABNZ3J' = '0.32 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ATRP1J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ATRP1J' = '0.33 * TSOA0 + 0.33 * TSOA1 + 0.33 * TSOA2 + 0.33 * TSOA3'; using default file
ATRP2J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ATRP2J' = '0.34 * TSOA0 + 0.34 * TSOA1 + 0.34 * TSOA2 + 0.34 * TSOA3'; using default file
AISO1J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'AISO1J' = '0.75 * (ISOA1 + ISOA2 + ISOA3)'; using default file
AISO2J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'AISO2J' = '0.25 * (ISOA1 + ISOA2 + ISOA3)'; using default file
ASQTJ, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ASQTJ' = '0.33 * TSOA0 + 0.33 * TSOA1 + 0.33 * TSOA2 + 0.33 * TSOA3'; using default file
ASOIL, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ASOIL' = '0.95995 * DST2 + 0.95995 * DST3 + 0.95995 * DST4'; using default file
ACLK, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1299:UserWarning:
Cannot evaluate any parts of 'ACLK' = '0.01190 * DST2 + 0.01190 * DST3 + 0.01190 * DST4 + 0.5538 * SALC'; using default file
Traceback (most recent call last):
File "/home/563/jds563/.local/bin/pncglobal2cmaq.py", line 1503, in
makeibcon(args)
File "/home/563/jds563/.local/bin/pncglobal2cmaq.py", line 1301, in makeibcon
minout = getdefault(oldcon, vark, noutstep)
File "/home/563/jds563/.local/bin/pncglobal2cmaq.py", line 1157, in getdefault
defval = np.ma.filled(oldcon.variables[vark][:], 0)


Reply to this email directly or view it on GitHub.

@JeremySilver
Copy link
Author

Hi again,

Thanks very much for coming up with a suggested fix!

Yes, the GEOS-CHEM data bpch file is from the benchmark (I'm new to GEOS-CHEM, but have a bit more experience with CMAQ). I just wanted to figure out how to use GEOS-CHEM to define boundary and initial conditions. The CMAQ data (actually output from MCIP) is from one of my own runs.

I downloaded the latest image of the repository, upgraded from the updates source code, and edited the mappings.json file. I'm now getting a different error message:

pncglobal2cmaq.py --sigma --stack=time -f bpch ctm.bpch.v10-01-public-release-Run0 --mapping=mappings.json --METCRO3D METCRO3D_testrun --METBDY3D METBDY3D_testrun
**PNC:/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/geoschemfiles/_bpch.py:847:UserWarning:
vertgrid selected (GEOS-5-REDUCED) and output layers are not consistent
Traceback (most recent call last):
File "/home/563/jds563/.local/bin/pncglobal2cmaq.py", line 1578, in
ifiles, args = pncparse(has_ofile = False, parser = parser)
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/pncparse.py", line 297, in pncparse
return pncprep(args)
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/pncparse.py", line 322, in pncprep
fs = getfiles(ipaths, args)
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/pncparse.py", line 397, in getfiles
fs = [stack_files(fs, args.stack, coordkeys = args.coordkeys)]
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/core/_functions.py", line 789, in stack_files
p2p.addVariable(tmpf, f, varkey, data = True)
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/pncgen.py", line 112, in addVariable
self.addVariableData(pfile, nfile, k)
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/pncgen.py", line 132, in addVariableData
nvar[:] = pvar[...]
ValueError: could not broadcast input array from shape (47) into shape (72)

I'll show a the first part of the mappings.json file:

{
"comment1": "comments are added like this",
"comment2": "Each line has the form "Species": {"expression": "some expression", "unit": "some unit"},",
"comment3": "Variables with the output unit (micrograms/m3) will be multiplied by air density (moles/m3) and molar mass in the script. It should not be done in the expression.",
"comment4": "Set "manual_unit": true to bypass script unit corrections",
"comment5": "If you do not have PSURF and/or TMPU, you can use values from the standard atmosphere by replacing the 'expression' value with the 'for_stdatm_use' value",
"comment6": "more comments are added like this",
"PRESS": {
"expression": "(hyam[:].reshape(1, -1).T + hybm[:].reshape(1, -1).T * PSURF[:][:, [0]].T).T * 100.",
"outunit": "Pa"
},
"AIRMOLDEN": {
"expression": "(hyam[:].reshape(1, -1).T + hybm[:].reshape(1, -1).T * PSURF[:][:, [0]].T).T * 100. / 8.3144621 / TMPU[:]",
"outunit": "moles/m**3",
"for_stdatm_use": "((hyam[:, None] + hybm[:, None] * 1013.25) * 100 / 8.3144621 / np.maximum(216.6, 288.15 * ((hyam[:] + hybm[:] * 1013.25) / 1013.25)**C)[:NLAYS, None] * np.ones_like(O3).T).T"

    }, 
"AIRMASSDEN": {
        "expression": "0.0289645 * (hyam[:].reshape(1, -1).T + hybm[:].reshape(1, -1).T * PSURF[:][:, [0]].T).T * 100 / 8.3144621 / TMPU[:]",
        "outunit": "kg/m**3",
        "for_stdatm_use_as_expr": "(0.0289645 * ((hyam[:, None] + hybm[:, None] * 1013.25) * 100 / 8.3144621 / np.array([287.7,286.9,286.0,285.2,284.3,283.4,282.6,281.7,280.7,279.8,278.9,277.9,276.8,275.3,273.6,271.8,270.0,268.2,265.8,262.8,259.7,256.4,252.9,249.2,245.2,241.0,236.4,230.5,223.6,216.8,216.6,216.6,216.6,216.6,216.6,216.6,216.6,217.5,219.8,222.0,225.3,233.6,250.5,269.2,260.0,237.7,214.3])[:NLAYS, None] * np.ones_like(O3).T).T"
    }, 
"CMAQSPECIES": {
    "AIRDEN": {
        "expression": "(hyam[:].reshape(1, -1).T + hybm[:].reshape(1, -1).T * PSURF[:][:, [0]].T).T * 100 / 8.3144621 / TMPU[:] * 6.022e23 / 1e6",
        "outunit": "molec/cm3",
        "manual_unit": true,
        "comment": "Full calculated unit",
        "for_stdatm_use_as_expr": "((hyam[:, None] + hybm[:, None] * 1013.25) * 100 / 8.3144621 / np.array([287.7,286.9,286.0,285.2,284.3,283.4,282.6,281.7,280.7,279.8,278.9,277.9,276.8,275.3,273.6,271.8,270.0,268.2,265.8,262.8,259.7,256.4,252.9,249.2,245.2,241.0,236.4,230.5,223.6,216.8,216.6,216.6,216.6,216.6,216.6,216.6,216.6,217.5,219.8,222.0,225.3,233.6,250.5,269.2,260.0,237.7,214.3])[:NLAYS, None] * np.ones_like(O3).T).T * 6.022e23 / 1e6"
    },
    "O3": {
        "expression": "O3",
        "outunit": "ppmV"
    },

....................

Sorry to bother you about this. I try to avoid asking questions of package maintainers, and try to solve things myself. However I'm out of my depth here... Any help/comments are very welcome!

@barronh
Copy link
Owner

barronh commented Dec 2, 2015

Look closely at the command that I sent you compared to the command you're using.

I used "-f benchmark" and you used "-f bpch". I created a new reader that would prep benchmark files (really any non-ND49 output that has PSURF and TMPU). If you use "-f benchmark" it should work.

On Dec 2, 2015, at 1:51 AM, nullglob notifications@github.com wrote:

Hi again,

Thanks very much for coming up with a suggested fix!

Yes, the GEOS-CHEM data bpch file is from the benchmark (I'm new to GEOS-CHEM, but have a bit more experience with CMAQ). I just wanted to figure out how to use GEOS-CHEM to define boundary and initial conditions. The CMAQ data (actually output from MCIP) is from one of my own runs.

I downloaded the latest image of the repository, upgraded from the updates source code, and edited the mappings.json file. I'm now getting a different error message:

pncglobal2cmaq.py --sigma --stack=time -f bpch ctm.bpch.v10-01-public-release-Run0 --mapping=mappings.json --METCRO3D METCRO3D_testrun --METBDY3D METBDY3D_testrun
**PNC:/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/geoschemfiles/_bpch.py:847:UserWarning:
vertgrid selected (GEOS-5-REDUCED) and output layers are not consistent
Traceback (most recent call last):
File "/home/563/jds563/.local/bin/pncglobal2cmaq.py", line 1578, in
ifiles, args = pncparse(has_ofile = False, parser = parser)
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/pncparse.py", line 297, in pncparse
return pncprep(args)
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/pncparse.py", line 322, in pncprep
fs = getfiles(ipaths, args)
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/pncparse.py", line 397, in getfiles
fs = [stack_files(fs, args.stack, coordkeys = args.coordkeys)]
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/core/_functions.py", line 789, in stack_files
p2p.addVariable(tmpf, f, varkey, data = True)
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/pncgen.py", line 112, in addVariable
self.addVariableData(pfile, nfile, k)
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/pncgen.py", line 132, in addVariableData
nvar[:] = pvar[...]
ValueError: could not broadcast input array from shape (47) into shape (72)

I'll show a the first part of the mappings.json file:

{
"comment1": "comments are added like this",
"comment2": "Each line has the form "Species": {"expression": "some expression", "unit": "some unit"},",
"comment3": "Variables with the output unit (micrograms/m3) will be multiplied by air density (moles/m3) and molar mass in the script. It should not be done in the expression.",
"comment4": "Set "manual_unit": true to bypass script unit corrections",
"comment5": "If you do not have PSURF and/or TMPU, you can use values from the standard atmosphere by replacing the 'expression' value with the 'for_stdatm_use' value",
"comment6": "more comments are added like this",
"PRESS": {
"expression": "(hyam[:].reshape(1, -1).T + hybm[:].reshape(1, -1).T * PSURF[:][:, [0]].T).T * 100.",
"outunit": "Pa"
},
"AIRMOLDEN": {
"expression": "(hyam[:].reshape(1, -1).T + hybm[:].reshape(1, -1).T * PSURF[:][:, [0]].T).T * 100. / 8.3144621 / TMPU[:]",
"outunit": "moles/m3",
"for_stdatm_use": "((hyam[:, None] + hybm[:, None] * 1013.25) * 100 / 8.3144621 / np.maximum(216.6, 288.15 * ((hyam[:] + hybm[:] * 1013.25) / 1013.25)C)[:NLAYS, None] * np.ones_like(O3).T).T"

}, 

"AIRMASSDEN": {
"expression": "0.0289645 * (hyam[:].reshape(1, -1).T + hybm[:].reshape(1, -1).T * PSURF[:][:, [0]].T).T * 100 / 8.3144621 / TMPU[:]",
"outunit": "kg/m**3",
"for_stdatm_use_as_expr": "(0.0289645 * ((hyam[:, None] + hybm[:, None] * 1013.25) * 100 / 8.3144621 / np.array([287.7,286.9,286.0,285.2,284.3,283.4,282.6,281.7,280.7,279.8,278.9,277.9,276.8,275.3,273.6,271.8,270.0,268.2,265.8,262.8,259.7,256.4,252.9,249.2,245.2,241.0,236.4,230.5,223.6,216.8,216.6,216.6,216.6,216.6,216.6,216.6,216.6,217.5,219.8,222.0,225.3,233.6,250.5,269.2,260.0,237.7,214.3])[:NLAYS, None] * np.ones_like(O3).T).T"
},
"CMAQSPECIES": {
"AIRDEN": {
"expression": "(hyam[:].reshape(1, -1).T + hybm[:].reshape(1, -1).T * PSURF[:][:, [0]].T).T * 100 / 8.3144621 / TMPU[:] * 6.022e23 / 1e6",
"outunit": "molec/cm3",
"manual_unit": true,
"comment": "Full calculated unit",
"for_stdatm_use_as_expr": "((hyam[:, None] + hybm[:, None] * 1013.25) * 100 / 8.3144621 / np.array([287.7,286.9,286.0,285.2,284.3,283.4,282.6,281.7,280.7,279.8,278.9,277.9,276.8,275.3,273.6,271.8,270.0,268.2,265.8,262.8,259.7,256.4,252.9,249.2,245.2,241.0,236.4,230.5,223.6,216.8,216.6,216.6,216.6,216.6,216.6,216.6,216.6,217.5,219.8,222.0,225.3,233.6,250.5,269.2,260.0,237.7,214.3])[:NLAYS, None] * np.ones_like(O3).T).T * 6.022e23 / 1e6"
},
"O3": {
"expression": "O3",
"outunit": "ppmV"
},

....................

Sorry to bother you about this. I try to avoid asking questions of package maintainers, and try to solve things myself. However I'm out of my depth here... Any help/comments are very welcome!


Reply to this email directly or view it on GitHub.

@JeremySilver
Copy link
Author

Thanks for the suggestion. I used the "-f benchmark" option both with the benchmark MCIP data (which I believe you're using) and my own MCIP data. In both cases, it's crashing. In the case when using the benchmark data, I get the following errors:

% pncglobal2cmaq.py -f benchmark ctm.bpch.v10-01-public-release-Run0 --mapping=mappings.json --METCRO3D METDOT3D_Benchmark --METBDY3D METBDY3D_Benchmark
*_PNC:/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/core/_functions.py:73:UserWarning:
Skipping PRES, TA
*_PNC:/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/core/_functions.py:364:UserWarning:
TSTEP not in file
Traceback (most recent call last):
File "/home/563/jds563/.local/bin/pncglobal2cmaq.py", line 1588, in
makeibcon(args)
File "/home/563/jds563/.local/bin/pncglobal2cmaq.py", line 1279, in makeibcon
add_cf_from_ioapi(metcro)
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/conventions/ioapi/_ioapi.py", line 274, in add_cf_from_ioapi
add_lcc_coordinates(ifileo)
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/conventions/ioapi/_ioapi.py", line 196, in add_lcc_coordinates
var = ifileo.createVariable('x', x.dtype.char, (xdim,))
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/core/_files.py", line 92, in createVariable
var = self.variables[name] = PseudoNetCDFVariable(self, name, type, dimensions, **properties)
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/core/_variables.py", line 55, in new
dim = parent.dimensions[d]
KeyError: 'COL'

And when I use my own data, I get the following error:

% pncglobal2cmaq.py --sigma --stack=time -f benchmark ctm.bpch.v10-01-public-release-Run0 --mapping=mappings.json --METCRO3D METCRO3D_testrun --METBDY3D METBDY3D_testrun
NO2, NO, O3, NO3, N2O5, HNO3, HONO, PNA, H2O2, NTR, ROOH, FORM, ALD2, PAR, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1394:UserWarning:
Cannot evaluate part of 'PAR' = '1.5 * C3H8[:] / 3.000000 + 4. * ALK4[:] / 4.000000 + 3. * ACET[:] / 3.000000 + 4. * MEK[:] / 4.000000 + 1. * BENZ + 0.5 * PRPE[:] / 3.000000'
CO, MEPX, PAN, PACD, PANX, OLE, IOLE, TOL, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'TOL' = 'TOLU'; using default file
XYL, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'XYL' = 'XYLE'; using default file
ISOP, SO2, ETHA, BENZENE, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'BENZENE' = 'BENZ'; using default file
NH3, SV_XYL1, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_XYL1' = '0.19 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_XYL2, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_XYL2' = '0.06 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_TOL1, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_TOL1' = '0.23 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_TOL2, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_TOL2' = '0.23 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_BNZ1, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_BNZ1' = '0.06 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_BNZ2, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_BNZ2' = '0.23 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_TRP1, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_TRP1' = '0.33 * TSOG0 + 0.33 * TSOG1 + 0.33 * TSOG2 + 0.33 * TSOG3'; using default file
SV_TRP2, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_TRP2' = '0.34 * TSOG0 + 0.34 * TSOG1 + 0.34 * TSOG2 + 0.34 * TSOG3'; using default file
SV_ISO1, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_ISO1' = '0.75 * (ISOG1 + ISOG2 + ISOG3)'; using default file
SV_ISO2, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_ISO2' = '0.25 * (ISOG1 + ISOG2 + ISOG3)'; using default file
SV_SQT, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_SQT' = '0.33 * TSOG0 + 0.33 * TSOG1 + 0.33 * TSOG2 + 0.33 * TSOG3'; using default file
ASO4J, ASO4I, AXYL1J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'AXYL1J' = '0.03 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
AXYL2J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'AXYL2J' = '0.01 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
AXYL3J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'AXYL3J' = '0.11 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ATOL1J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ATOL1J' = '0.04 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ATOL2J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ATOL2J' = '0.04 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ATOL3J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ATOL3J' = '0.29 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ABNZ1J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ABNZ1J' = '0.12 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ABNZ2J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ABNZ2J' = '0.04 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ABNZ3J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ABNZ3J' = '0.32 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ATRP1J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ATRP1J' = '0.33 * TSOA0 + 0.33 * TSOA1 + 0.33 * TSOA2 + 0.33 * TSOA3'; using default file
ATRP2J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ATRP2J' = '0.34 * TSOA0 + 0.34 * TSOA1 + 0.34 * TSOA2 + 0.34 * TSOA3'; using default file
AISO1J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'AISO1J' = '0.75 * (ISOA1 + ISOA2 + ISOA3)'; using default file
AISO2J, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'AISO2J' = '0.25 * (ISOA1 + ISOA2 + ISOA3)'; using default file
ASQTJ, **PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ASQTJ' = '0.33 * TSOA0 + 0.33 * TSOA1 + 0.33 * TSOA2 + 0.33 * TSOA3'; using default file
ASOIL, ACLK, AMGJ, ACAJ, ANH4J, AFEJ, AKJ, AMNJ, APNCOMJ, ANO3I, ANO3J, ANO3K, ASIJ, AECJ, APNCOMI, AOTHRJ, ANH4I, ATIJ, ASEACAT, ASO4K, ISPD, ALDX, AALJ, ANAJ, AIRDEN, APOCJ, APOCI, AECI, ACLJ, Traceback (most recent call last):
File "/home/563/jds563/.local/bin/pncglobal2cmaq.py", line 1588, in
makeibcon(args)
File "/home/563/jds563/.local/bin/pncglobal2cmaq.py", line 1481, in makeibcon
raise ValueError('Unable to determine timestep from file; use --tstep option to assign manually')
ValueError: Unable to determine timestep from file; use --tstep option to assign manually

Could the problem be due to a mismatch between the dates? Running pncdump on the input file suggests that there is only data for one timepoint (however I can't figure out how to extract the value of the timestamp). Here's the truncated output from pncdump

PseudoNetCDF.geoschemfiles._bpch.bpch ctm.bpch.v10-01-public-release-Run0 {
dimensions:
longitude = 72 ;
latitude = 46 ;
layer = 47 ;
nv = 2 ;
tnv = 2 ;
layer1 = 1 ;
layer59 = 59 ;
layer72 = 72 ;
layer73 = 73 ;
layer_bounds = 48 ;
time = UNLIMITED // (1 currently)
...........

Would be better, while I'm just trying out this utility, to use a sample dataset with multiple timestamps? If so, is there a publicly-available dataset that you might suggest? I am able to modify the timestamps in the METCRO3D and METBDY3D files to match the inputs.

Thanks again for the help!

@barronh
Copy link
Owner

barronh commented Dec 3, 2015

You are passing METDOT3D when you should be passing METCRO3D.

On Dec 2, 2015, at 7:42 PM, nullglob notifications@github.com wrote:

Thanks for the suggestion. I used the "-f benchmark" option both with the benchmark MCIP data (which I believe you're using) and my own MCIP data. In both cases, it's crashing. In the case when using the benchmark data, I get the following errors:

% pncglobal2cmaq.py -f benchmark ctm.bpch.v10-01-public-release-Run0 --mapping=mappings.json --METCRO3D METDOT3D_Benchmark --METBDY3D METBDY3D_Benchmark
_PNC:/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/core/_functions.py:73:UserWarning:
Skipping PRES, TA
*PNC:/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/core/functions.py:364:UserWarning:
TSTEP not in file
Traceback (most recent call last):
File "/home/563/jds563/.local/bin/pncglobal2cmaq.py", line 1588, in
makeibcon(args)
File "/home/563/jds563/.local/bin/pncglobal2cmaq.py", line 1279, in makeibcon
add_cf_from_ioapi(metcro)
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/conventions/ioapi/ioapi.py", line 274, in add_cf_from_ioapi
add_lcc_coordinates(ifileo)
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/conventions/ioapi/_ioapi.py", line 196, in add_lcc_coordinates
var = ifileo.createVariable('x', x.dtype.char, (xdim,))
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/core/_files.py", line 92, in createVariable
var = self.variables[name] = PseudoNetCDFVariable(self, name, type, dimensions, *_properties)
File "/home/563/jds563/.local/lib/python2.7/site-packages/PseudoNetCDF/core/_variables.py", line 55, in __new
dim = parent.dimensions[d]
KeyError: 'COL'

And when I use my own data, I get the following error:

% pncglobal2cmaq.py --sigma --stack=time -f benchmark ctm.bpch.v10-01-public-release-Run0 --mapping=mappings.json --METCRO3D METCRO3D_testrun --METBDY3D METBDY3D_testrun
NO2, NO, O3, NO3, N2O5, HNO3, HONO, PNA, H2O2, NTR, ROOH, FORM, ALD2, PAR, _PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1394:UserWarning:
Cannot evaluate part of 'PAR' = '1.5 * C3H8[:] / 3.000000 + 4. * ALK4[:] / 4.000000 + 3. * ACET[:] / 3.000000 + 4. * MEK[:] / 4.000000 + 1. * BENZ + 0.5 * PRPE[:] / 3.000000'
CO, MEPX, PAN, PACD, PANX, OLE, IOLE, TOL, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'TOL' = 'TOLU'; using default file
XYL, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'XYL' = 'XYLE'; using default file
ISOP, SO2, ETHA, BENZENE, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'BENZENE' = 'BENZ'; using default file
NH3, SV_XYL1, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_XYL1' = '0.19 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_XYL2, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_XYL2' = '0.06 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_TOL1, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_TOL1' = '0.23 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_TOL2, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_TOL2' = '0.23 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_BNZ1, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_BNZ1' = '0.06 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_BNZ2, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_BNZ2' = '0.23 * (ASOG1 + ASOG2 + ASOG3)'; using default file
SV_TRP1, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_TRP1' = '0.33 * TSOG0 + 0.33 * TSOG1 + 0.33 * TSOG2 + 0.33 * TSOG3'; using default file
SV_TRP2, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_TRP2' = '0.34 * TSOG0 + 0.34 * TSOG1 + 0.34 * TSOG2 + 0.34 * TSOG3'; using default file
SV_ISO1, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_ISO1' = '0.75 * (ISOG1 + ISOG2 + ISOG3)'; using default file
SV_ISO2, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_ISO2' = '0.25 * (ISOG1 + ISOG2 + ISOG3)'; using default file
SV_SQT, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'SV_SQT' = '0.33 * TSOG0 + 0.33 * TSOG1 + 0.33 * TSOG2 + 0.33 * TSOG3'; using default file
ASO4J, ASO4I, AXYL1J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'AXYL1J' = '0.03 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
AXYL2J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'AXYL2J' = '0.01 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
AXYL3J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'AXYL3J' = '0.11 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ATOL1J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ATOL1J' = '0.04 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ATOL2J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ATOL2J' = '0.04 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ATOL3J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ATOL3J' = '0.29 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ABNZ1J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ABNZ1J' = '0.12 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ABNZ2J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ABNZ2J' = '0.04 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ABNZ3J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ABNZ3J' = '0.32 * (ASOAN + ASOA1 + ASOA2 + ASOA3)'; using default file
ATRP1J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ATRP1J' = '0.33 * TSOA0 + 0.33 * TSOA1 + 0.33 * TSOA2 + 0.33 * TSOA3'; using default file
ATRP2J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ATRP2J' = '0.34 * TSOA0 + 0.34 * TSOA1 + 0.34 * TSOA2 + 0.34 * TSOA3'; using default file
AISO1J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'AISO1J' = '0.75 * (ISOA1 + ISOA2 + ISOA3)'; using default file
AISO2J, *PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'AISO2J' = '0.25 * (ISOA1 + ISOA2 + ISOA3)'; using default file
ASQTJ, *_PNC:/home/563/jds563/.local/bin/pncglobal2cmaq.py:1352:UserWarning:
Cannot evaluate any parts of 'ASQTJ' = '0.33 * TSOA0 + 0.33 * TSOA1 + 0.33 * TSOA2 + 0.33 * TSOA3'; using default file
ASOIL, ACLK, AMGJ, ACAJ, ANH4J, AFEJ, AKJ, AMNJ, APNCOMJ, ANO3I, ANO3J, ANO3K, ASIJ, AECJ, APNCOMI, AOTHRJ, ANH4I, ATIJ, ASEACAT, ASO4K, ISPD, ALDX, AALJ, ANAJ, AIRDEN, APOCJ, APOCI, AECI, ACLJ, Traceback (most recent call last):
File "/home/563/jds563/.local/bin/pncglobal2cmaq.py", line 1588, in
makeibcon(args)
File "/home/563/jds563/.local/bin/pncglobal2cmaq.py", line 1481, in makeibcon
raise ValueError('Unable to determine timestep from file; use --tstep option to assign manually')
ValueError: Unable to determine timestep from file; use --tstep option to assign manually

Could the problem be due to a mismatch between the dates? Running pncdump on the input file suggests that there is only data for one timepoint (however I can't figure out how to extract the value of the timestamp). Here's the truncated output from pncdump

PseudoNetCDF.geoschemfiles._bpch.bpch ctm.bpch.v10-01-public-release-Run0 {
dimensions:
longitude = 72 ;
latitude = 46 ;
layer = 47 ;
nv = 2 ;
tnv = 2 ;
layer1 = 1 ;
layer59 = 59 ;
layer72 = 72 ;
layer73 = 73 ;
layer_bounds = 48 ;
time = UNLIMITED // (1 currently)
...........

Would be better, while I'm just trying out this utility, to use a sample dataset with multiple timestamps? If so, is there a publicly-available dataset that you might suggest? I am able to modify the timestamps in the METCRO3D and METBDY3D files to match the inputs.

Thanks again for the help!


Reply to this email directly or view it on GitHub.

@JeremySilver
Copy link
Author

Ooops... Well upon fixing that the error messages from the two calls to the script were consistent, at least. I then followed the hint about setting the "--tstep" option (I used "--tstep 10000") and then it worked. Case closed 👍

Thanks very much for the help, and also for providing this very useful tool.

Finally, one question: When I started trying out this script, I was having troubles due to what appeared to be duplicate entries in the mappings.json file. The species "APNCOMJ" is represented twice (I think this occurs around pseudonetcdf/scripts/pncglobal2cmaq.py around line 456). When I deleted one of the duplicate entries, the script appeared to proceed further (and I was met with some of the issues that we discussed above). I just thought I should raise this because I wasn't sure whether this was a feature or a bug...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants