-
Notifications
You must be signed in to change notification settings - Fork 35
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
Comments
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.
|
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 I'll show a the first part of the mappings.json file: {
.................... 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! |
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.
|
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 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 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 { 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! |
You are passing METDOT3D when you should be passing METCRO3D.
|
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... |
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)
The text was updated successfully, but these errors were encountered: