Ignore:
Timestamp:
May 24, 2013, 5:03:26 PM (12 years ago)
Author:
aslmd
Message:

UTIL PYTHON online MCD. v5 is no more beta and default. separated index5.html and index4.html. added variables. corrected dust scenario numbering which changed in mcd5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/mcd/mcd.py

    r944 r971  
    9292
    9393    def getdustlabel(self):
    94         if self.dust == 1: self.dustlabel = "climatology minimum solar scenario"
    95         elif self.dust == 2: self.dustlabel = "climatology average solar scenario"
    96         elif self.dust == 3: self.dustlabel = "climatology maximum solar scenario"
     94        if self.dust == 1:
     95            self.dustlabel = "MY24 minimum solar scenario"
     96            if "v5" in self.name: self.dustlabel = "climatology average solar scenario"
     97        elif self.dust == 2:
     98            self.dustlabel = "MY24 average solar scenario"
     99            if "v5" in self.name: self.dustlabel = "climatology minimum solar scenario"
     100        elif self.dust == 3:
     101            self.dustlabel = "MY24 maximum solar scenario"
     102            if "v5" in self.name: self.dustlabel = "climatology maximum solar scenario"
    97103        elif self.dust == 4: self.dustlabel = "dust storm minimum solar scenario"
    98104        elif self.dust == 5: self.dustlabel = "dust storm average solar scenario"
     
    224230        dastuff = whichfield[num]
    225231        if "(K)" in dastuff:      self.fmt="%.0f"
     232        elif "effective radius" in dastuff: self.fmt="%.2e"
    226233        elif "(Pa)" in dastuff:   self.fmt="%.1f"
    227234        elif "(W/m2)" in dastuff: self.fmt="%.0f"
     
    249256            if "v5" in self.name:  num = 43
    250257            else:                  num = 42
    251         elif num == "ps_ddv": num = 22
    252258        elif num == "h2ovap":
    253259            if "v5" in self.name:  num = 42
     
    258264        elif num == "cp": num = 8
    259265        elif num == "rho_ddv": num = 10
     266        elif num == "ps_ddv": num = 22
     267        elif num == "p_ddv": num = 21
     268        elif num == "t_ddv": num = 23
     269        elif num == "w": num = 26
    260270        elif num == "tsurfmx": num = 16
    261271        elif num == "tsurfmn": num = 17
     
    264274        elif num == "lwup": num = 33
    265275        elif num == "swup": num = 34
     276        elif num == "tau": num = 36
     277        elif num == "tau_ddv":
     278            if "v5" in self.name:  num = 37
     279            else:                  num = 38
     280        elif num == "qdust":
     281            if "v5" in self.name:  num = 38
     282            else:                  num = 37
     283        elif num == "co2":
     284            if "v5" in self.name:  num = 57
     285            else:                  num = 45
    266286        elif num == "o3":
    267287            if "v5" in self.name:  num = 63
     
    277297            else:                  num = 50
    278298        elif num == "co2ice": num = 35
     299        elif num == "rdust":
     300            if "v5" in self.name:  num = 39
     301            else:                  num = 30 # an undefined variable to avoid misleading output
     302        elif num == "sdust":
     303            if "v5" in self.name:  num = 40
     304            else:                  num = 30 # an undefined variable to avoid misleading output
    279305        elif num == "pbl":
    280306            if "v5" in self.name:  num = 46
     
    297323        elif num == "ar":
    298324            if "v5" in self.name:  num = 59
     325            else:                  num = 30 # an undefined variable to avoid misleading output
     326        elif num == "o2":
     327            if "v5" in self.name:  num = 62
     328            else:                  num = 30 # an undefined variable to avoid misleading output
     329        elif num == "co2col":
     330            if "v5" in self.name:  num = 67
     331            else:                  num = 30 # an undefined variable to avoid misleading output
     332        elif num == "arcol":
     333            if "v5" in self.name:  num = 69
     334            else:                  num = 30 # an undefined variable to avoid misleading output
     335        elif num == "cocol":
     336            if "v5" in self.name:  num = 70
     337            else:                  num = 30 # an undefined variable to avoid misleading output
     338        elif num == "o3col":
     339            if "v5" in self.name:  num = 73
     340            else:                  num = 30 # an undefined variable to avoid misleading output
     341        elif num == "hydro":
     342            if "v5" in self.name:  num = 64
     343            else:                  num = 30 # an undefined variable to avoid misleading output
     344        elif num == "hydro2":
     345            if "v5" in self.name:  num = 65
     346            else:                  num = 30 # an undefined variable to avoid misleading output
     347        elif num == "e":
     348            if "v5" in self.name:  num = 66
     349            else:                  num = 30 # an undefined variable to avoid misleading output
     350        elif num == "ecol":
     351            if "v5" in self.name:  num = 76
    299352            else:                  num = 30 # an undefined variable to avoid misleading output
    300353        elif not isinstance(num, np.int): myplot.errormess("field reference not found.")
     
    340393        strloct = str(self.loct)+str(self.locts)+str(self.locte)
    341394        name = str(self.zkey)+strxz+strlon+strlat+str(self.hrkey)+str(self.datekey)+str(self.xdate)+strloct+str(self.dust)
    342         if "v5" in self.name: name = "v5beta_" + name
     395        if "v5" in self.name: name = "v5_" + name
    343396        return name
    344397
Note: See TracChangeset for help on using the changeset viewer.