Changeset 1422 in lmdz_wrf


Ignore:
Timestamp:
Jan 20, 2017, 11:58:27 AM (8 years ago)
Author:
lfita
Message:

Adding CFification of `mthDYNAMICO'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/model_graphics.py

    r1420 r1422  
    909909            # At this stage, let's be simple. It might be necessary to complicate it! Since
    910910            #   DYNAMICO might have 'time_counter' or 'time_instant'
    911             elif minf.name == 'DYNAMICO' or minf.name == 'mthDYNAMICO':
     911            elif minf.name == 'DYNAMICO':
    912912                try:
    913913                    with gen.Capturing() as output:
     
    923923                if db:
    924924                    for s1out in output: print s1out
     925            elif minf.name == 'mthDYNAMICO':
     926                try:
     927                    with gen.Capturing() as output:
     928                        ncvar.mthDYNAMICO_toCF(Tunits + '!since!' + Tref, ifilen)
     929                except:
     930                    print errmsg
     931                    print 'mthDYNAMICO_toCF('+Tunits+'!since!'+Tref+ ', ' + ifilen + ')'
     932                    for s1out in output: print s1out
     933                    # Removing file in order to make sure that it will be redone
     934                    print '  ' + fname + " removing file '" + ifilen + "' ..."
     935                    sub.call('rm ' + ifilen + ' >& /dev/null', shell=True)
     936                    quit(-1)
     937                if db:
     938                    for s1out in output: print s1out
    925939            else:
    926940                print errmsg
    927941                print '  ' + fname + ": no CFification for model '" +minf.name+ "' !!"
    928                 print "    available ones: 'WRF', 'WRF_LMDZ', 'LMDZ', 'DYNAMICO'"
     942                print "    available ones: 'WRF', 'WRF_LMDZ', 'LMDZ', 'DYNAMICO', "+ \
     943                  'mthDYNAMICO'"
    929944                quit(-1)
    930945
Note: See TracChangeset for help on using the changeset viewer.