Changeset 317 for trunk/MESOSCALE


Ignore:
Timestamp:
Oct 11, 2011, 4:17:58 PM (13 years ago)
Author:
aslmd
Message:

GRAPHICS: - winds.py works for diagfi.nc

  • still a problem with ortho projection
  • better handling for time should be done

example:
winds.py -f diagfi1.nc -x -v fluxsurf_lw -n 1 -F 450

LMD_MM_MARS: cosmetic changes. checked that z0 changes are OK with old input files.

Location:
trunk/MESOSCALE/LMD_MM_MARS/SRC/PYTHON
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/PYTHON/myplot.py

    r310 r317  
    2121def whatkindfile (nc):
    2222    if 'controle' in nc.variables:   typefile = 'gcm'
    23     elif 'phisinit' in nc.variables: typefile = 'gcmex'
     23    elif 'phisinit' in nc.variables: typefile = 'gcm'
    2424    elif 'vert' in nc.variables:     typefile = 'mesoapi'
    2525    elif 'U' in nc.variables:        typefile = 'meso'
     
    152152    if zetime is not None \
    153153       and 'vert' not in nc.variables:
    154        #### strangely enough this does not work for api or ncrcat results!
     154        #### strangely enough this does not work for api or ncrcat results!
    155155        zetimestart = getattr(nc, 'START_DATE')
    156156        zeday = int(zetime[8]+zetime[9]) - int(zetimestart[8]+zetimestart[9])
     
    254254
    255255def getcoorddef ( nc ):   
     256    import numpy as np
    256257    ## getcoord2d for predefined types
    257258    typefile = whatkindfile(nc)
     
    260261        lon2d = dumpbdy(lon2d,6)
    261262        lat2d = dumpbdy(lat2d,6)
    262     elif typefile in ['gcm','gcmex']:
     263    elif typefile in ['gcm']:
    263264        [lon2d,lat2d] = getcoord2d(nc,nlat="latitude",nlon="longitude",is1d=True)
    264265    elif typefile in ['geo']:
     
    495496             "Um":           "%.0f",\
    496497             "ALBBARE":      "%.2f",\
     498             "TAU":          "%.1f",\
    497499                    }
    498500    if whichvar not in fmtvar:
     
    520522             "QSURFICE":     "hot_r",\
    521523             "ALBBARE":      "spectral",\
     524             "TAU":          "YlOrBr_r",\
    522525                     }
    523526#W --> spectral ou jet
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/PYTHON/winds.py

    r295 r317  
    196196    ### Save the figure in a file in the data folder or an user-defined folder
    197197    if typefile in ['meso','mesoapi']:   prefix = getprefix(nc)   
    198     elif typefile in ['gcm','gcmex']:    prefix = 'LMD_GCM_'
     198    elif typefile in ['gcm']:            prefix = 'LMD_GCM_'
    199199    else:                                prefix = ''
    200200    ###
Note: See TracChangeset for help on using the changeset viewer.