Thursday, August 25, 2011

CDMS inconsistency

Not sure this counts as a bug, but it is a weird inconsistency.

>>> import cdms
>>> s1 ="")
>>> s2 ="")
>>> s3 ="")
>>> s4 ="")

>>> d1 = s1['FLNSOI']
>>> d2 = s2['FLNSOI']
>>> d3 = s3['FLNSOI']
>>> d4 = s4['FLNSOI']

>>> dd1 = d1 - d3
>>> dd2 = d2 - d4

>>> d1.getAxis(0).id
>>> d2.getAxis(0).id
>>> d3.getAxis(0).id
>>> d4.getAxis(0).id

>>> dd1.getAxis(0).id
>>> dd2.getAxis(0).id

The second behavior occurs repeatably on three out of 180 file pairs, was hard to track down, and prevented the NCO ncrcat command from working. Fortunately the workaround is easy.

>>> dd2.setAxisList(d2.getAxisList())

But it's baffling how this even happens. All of the files were created by the NCO ncra command. Probably it is correct to do this and there is no guarantee that an axis list will be inherited after a calculation. But why does it USUALLY happen? These files are all produced by the same processes!

I'd prefer to have my mind read every time or never, not 59 times out of 60.

This wasted three hours of my life.

Tuesday, January 4, 2011

New Slab Run How-To

Take an extant slab run namelist

ensure input files from $WORK/caminput
change nsrest
change case_id
set rest_pfile

create the file pointed to by rest_pfile, based on the lnd version; or edit as needed

in qsubscript:
change job name
ensure correct executable

ensure you have the right executable!

If everything is under control the executables should be properly named in CAM31Executables

Ah, python, python, when will I see you again?

Restart howto

> nrevsn = '/work/00671/tobis/camrun/restart/camrun.bsi.cam2.r.0021-01-01-00000'
> rest_pfile = './cam2.camrun.bsi.rpointer'
< nelapse = -14966
< nsrest = 0
> nestep = -14966
> nsrest = 1
> rpntpath = './lnd.camrun.bsi.rpointer'

what's with nrevsn vs rest_pfile? nrevsn seems to be for branch runs.

So what I think should be the case is just the nsrest should change; rest_pfile and rpntpath should botrh be set. As always, the cam2.*.rpointer file must be manually edited to remove the hard-wired NCAR path. The land model does not have this bug.