ESMCI / cime

Common Infrastructure for Modeling the Earth
http://esmci.github.io/cime
Other
161 stars 206 forks source link

KeyError "DMODE" #2109

Closed rljacob closed 6 years ago

rljacob commented 6 years ago

Having trouble finding the source of this error message when building the ACME CAM namelist.

Running /lcrc/group/earthscience/jacob/ACME3/components/cam/cime_config/buildnml Traceback (most recent call last): File "./xmlquery", line 365, in _main_func() File "./xmlquery", line 322, in _main_func dtype=dtype, valid_values=valid_values, xmlfile=xmlfile) File "./xmlquery", line 262, in xmlquery_sub results[group][var]['value'] = value KeyError: 'DMODE'

Its not a fatal error. Case continues to setup and build/run sucessfully.

Grep-ing for DMODE turns up nothing except for a substring of AODMODE*

jedwards4b commented 6 years ago

what's at line 365 of /lcrc/group/earthscience/jacob/ACME3/components/cam/cime_config/buildnml?

rljacob commented 6 years ago

buildnml only has 223 lines. Its still in perl.

jedwards4b commented 6 years ago

oh - I see, it's in 365 of xmlquery - you need to figure out which xmlquery call in the buildnml is causing the problem. You can run the buildnml directly from the command line with: buildnml $caseroot this may yield more info.

sarich commented 6 years ago

I'm getting this too (on blues)

bash-4.1$ ./xmlquery DOCN_MODE Traceback (most recent call last): File "./xmlquery", line 365, in _main_func() File "./xmlquery", line 322, in _main_func dtype=dtype, valid_values=valid_values, xmlfile=xmlfile) File "./xmlquery", line 262, in xmlquery_sub results[group][var]['value'] = value KeyError: 'DMODE'

On Tue, Dec 5, 2017 at 10:38 AM, jedwards4b notifications@github.com wrote:

oh - I see, it's in 365 of xmlquery - you need to figure out which xmlquery call in the buildnml is causing the problem. You can run the buildnml directly from the command line with: buildnml $caseroot this may yield more info.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ESMCI/cime/issues/2109#issuecomment-349362022, or mute the thread https://github.com/notifications/unsubscribe-auth/AEs_ujXma5w5T_jz4_mcllGJlVlmWlxeks5s9XFtgaJpZM4Q1x-Q .

jgfouca commented 6 years ago

@rljacob , i've hit this before. JimE is correct, this is a problem in one of the ACME perl buildnml scripts.

jgfouca commented 6 years ago

@rljacob , you should probably move this ticket to E3SM. You can assign it to me.

sarich commented 6 years ago

This is a CIME bug. envbase.py is stripping out the 'OCN'

jedwards4b commented 6 years ago

No - it's a buildnml problem. There is no variable in cime called OCN_DMODE

jedwards4b commented 6 years ago

Oops - ignore my last - this is a cime bug, I'll take it.

jedwards4b commented 6 years ago

What is the compset for this case? In particular what ocn is it?

rljacob commented 6 years ago

I see it in a fully coupled case using MPAS.

1850_CAM5%CMIP6_CLM45%SPBC_MPASCICE%SPUNUP_MPASO%SPUNUP_MOSART_SGLC_SWAV

jedwards4b commented 6 years ago

thanks

sarich commented 6 years ago

I'm getting the error building cam running --res ne11_oQU240 --compset A_WCYCL1850, but you can recreate with stubs:


./create_newcase --case TEST --compset X --res ne30_g16
cd TEST
./xmlquery DOCN_MODE
Traceback (most recent call last):
  File "./xmlquery", line 366, in <module>
    _main_func()
  File "./xmlquery", line 323, in _main_func
    dtype=dtype, valid_values=valid_values, xmlfile=xmlfile)
  File "./xmlquery", line 262, in xmlquery_sub
    results[group][var]['value'] = value
KeyError: 'DMODE'
jedwards4b commented 6 years ago

I have a fix in To git@github.com:jedwards4b/cime.git

PR coming soon.

jgfouca commented 6 years ago

Thanks @jedwards4b , do you mind adding a quick test for this in your branch so we don't regress?

jedwards4b commented 6 years ago

will do

jgfouca commented 6 years ago

This got fixed by #2114

rljacob commented 6 years ago

I'm seeing something related to this again when running case.setup:

Creating component namelists
   Running /lcrc/group/earthscience/jacob/ACME3/components/cam/cime_config/buildnml 
ERROR:  No results found for variable DOCN_MODE

This is a fully coupled case so there is no DOCN.

jedwards4b commented 6 years ago

Is there a DOCN variable in that buildnml file?

mvertens commented 6 years ago

Can you please provide us with the create_newcase command you are using.

On Wed, Jan 24, 2018 at 7:29 AM, jedwards4b notifications@github.com wrote:

Is there a DOCN variable in that buildnml file?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ESMCI/cime/issues/2109#issuecomment-360152698, or mute the thread https://github.com/notifications/unsubscribe-auth/AHlxE5-Wkv8q3cRT66nsd-zDBcwlY2COks5tNz5MgaJpZM4Q1x-Q .

rljacob commented 6 years ago

./create_newcase --case Wcm6brup --res ne30np4_oEC60to30v3_ICG --compset A_WCYCL1850S_CMIP6 --machine anvil

blogin2[102]: grep DOCN buildnml my $DOCN_MODE = ./xmlquery DOCN_MODE -value; if ($DOCN_MODE eq 'som') {$ocn = "pop";}

jedwards4b commented 6 years ago

It's not clear from your post - what buildnml is that?

sarich commented 6 years ago

components/cam/cime_config/buildnml

On Thu, Feb 1, 2018 at 8:52 AM, jedwards4b notifications@github.com wrote:

It's not clear from your post - what buildnml is that?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ESMCI/cime/issues/2109#issuecomment-362289283, or mute the thread https://github.com/notifications/unsubscribe-auth/AEs_ujxv116SNNbe7pAHK54NJQUb1hbTks5tQc_GgaJpZM4Q1x-Q .

jedwards4b commented 6 years ago

I believe that this issue has been resolved in the latest CIME - in particular:

./create_newcase --case TEST --compset X --res ne30_g16
cd TEST
./xmlquery DOCN_MODE
ERROR:  No results found for variable DOCN_MODE
jedwards4b commented 6 years ago

This is the correct result, you may need to add code to your cam buildnml not to fail in this case.

rljacob commented 6 years ago

So remove the "-value" argument?

rljacob commented 6 years ago

Still getting this weird harmless error message:

Creating component namelists
   Running /lcrc/group/earthscience/jacob/ACME2/components/cam/cime_config/buildnml 
ERROR:  No results found for variable DOCN_MODE
CAM writing dry deposition namelist to drv_flds_in 
CAM writing namelist to atm_in

The case is a fully coupled case: 1850_CAM5%AV1C-L_CLM45%SPBC_MPASCICE%SPUNUP_MPASO%SPUNUP_MOSART_SGLC_SWAV

rljacob commented 6 years ago

The case build and runs fine. Inside the CASEDIR:

blogin3[136]: ./xmlquery DOCN_MODE
ERROR:  No results found for variable DOCN_MODE
Exit 1
rljacob commented 6 years ago

After reading the rest of the thread, just had to remove the query of DOCN_MODE from the eam buildnml.