示例#1
0
    print '       clim => ' + str(ni0) + ', ' + str(
        nj0) + ', (' + vdic['F_T_OBS_3D_12'] + ')'
    print '       NEMO => ' + str(ni) + ', ' + str(nj)
    sys.exit(0)

if cvar in ['sss', 'sst', 'mld']:
    # Creating 1D long. and lat.:
    ji_lat0 = nmp.argmax(xlat[nj - 1, :])
    vlon = nmp.zeros(ni)
    vlon[:] = xlon[20, :]
    vlat = nmp.zeros(nj)
    vlat[:] = xlat[:, ji_lat0]

if cvar == 'ice':
    # Extraoplating sea values over continents:
    bt.drown(Vnemo[:, :, :], imask, k_ew=2, nb_max_inc=10, nb_smooth=10)

lpix = False
if vdic['ORCA'][:5] == 'ORCA0': lpix = True

for jt in range(nt):

    cm = "%02d" % (jt + 1)
    cdate = cy + cm
    cdatet = cy + '/' + cm

    if cvar == 'sst':
        bp.plot("2d")(vlon,
                      vlat,
                      Vnemo[jt, :, :] - Vclim[jt, :, :],
                      imask[:, :],
示例#2
0
文件: ice.py 项目: brodeau/barakuda
#  Getting NEMO mean monthly climatology of sea-ice coverage:
cf_nemo_mnmc = vdic['DIAG_D']+'/clim/mclim_'+CONFRUN+'_'+cy1+'-'+cy2+'_'+vdic['FILE_ICE_SUFFIX']+'.nc4'

bt.chck4f(cf_nemo_mnmc)
id_ice = Dataset(cf_nemo_mnmc)
xnemo_frac_03   = id_ice.variables[vdic['NN_ICEF']][2,:,:]
xnemo_frac_09   = id_ice.variables[vdic['NN_ICEF']][8,:,:]
xnemo_thic_03   = id_ice.variables[vdic['NN_ICET']][2,:,:]
xnemo_thic_09   = id_ice.variables[vdic['NN_ICET']][8,:,:]
id_ice.close()

[ nj, ni ] = xnemo_frac_03.shape ; print ' Shape of sea-ice :', nj, ni, '\n'


# Extraoplating sea values on continents:
bt.drown(xnemo_frac_03, xmask, k_ew=2, nb_max_inc=10, nb_smooth=10)
bt.drown(xnemo_frac_09, xmask, k_ew=2, nb_max_inc=10, nb_smooth=10)
bt.drown(xnemo_thic_03, xmask, k_ew=2, nb_max_inc=10, nb_smooth=10)
bt.drown(xnemo_thic_09, xmask, k_ew=2, nb_max_inc=10, nb_smooth=10)
bt.drown(xclim03, xmask, k_ew=2, nb_max_inc=10, nb_smooth=10)
bt.drown(xclim09, xmask, k_ew=2, nb_max_inc=10, nb_smooth=10)




# Time for figures:       
# -----------------
#
# Extending to 90S: (from 78 to 90):
#
js_ext = 12; nje = nj + js_ext
示例#3
0
文件: ice.py 项目: zklaus/barakuda
#  Getting NEMO mean monthly climatology of sea-ice coverage:
cf_nemo_mnmc = vdic['DIAG_D']+'/clim/mclim_'+CONFEXP+'_'+cy1+'-'+cy2+'_'+vdic['FILE_ICE_SUFFIX']+'.nc4'

bt.chck4f(cf_nemo_mnmc)
id_ice = Dataset(cf_nemo_mnmc)
xnemo_frac_03   = id_ice.variables[vdic['NN_ICEF']][2,:,:]
xnemo_frac_09   = id_ice.variables[vdic['NN_ICEF']][8,:,:]
xnemo_thic_03   = id_ice.variables[vdic['NN_ICET']][2,:,:]
xnemo_thic_09   = id_ice.variables[vdic['NN_ICET']][8,:,:]
id_ice.close()

[ nj, ni ] = xnemo_frac_03.shape ; print ' Shape of sea-ice :', nj, ni, '\n'


# Extraoplating sea values on continents:
bt.drown(xnemo_frac_03, xmask, k_ew=2, nb_max_inc=10, nb_smooth=10)
bt.drown(xnemo_frac_09, xmask, k_ew=2, nb_max_inc=10, nb_smooth=10)
bt.drown(xnemo_thic_03, xmask, k_ew=2, nb_max_inc=10, nb_smooth=10)
bt.drown(xnemo_thic_09, xmask, k_ew=2, nb_max_inc=10, nb_smooth=10)
bt.drown(xclim03, xmask, k_ew=2, nb_max_inc=10, nb_smooth=10)
bt.drown(xclim09, xmask, k_ew=2, nb_max_inc=10, nb_smooth=10)




# Time for figures:       
# -----------------
#
# Extending to 90S: (from 78 to 90):
#
js_ext = 12; nje = nj + js_ext
示例#4
0
if cvar == 'sss' or cvar == 'sst':
    if nj != nj0 or ni != ni0:
        print 'ERROR (prepare_movies.py): NEMO file and clim do no agree in shape!'
        print '       clim => '+str(ni0)+', '+str(nj0)+', '+str(nk0),' ('+vdic['F_T_CLIM_3D_12']+')'
        print '       NEMO => '+str(ni)+', '+str(nj)+', '+str(nk)
        sys.exit(0)
    # Creating 1D long. and lat.:
    ji_lat0 = nmp.argmax(xlat[nj-1])  ; #lolo
    vlon = nmp.zeros(ni) ; vlon[:] = xlon[20,:]
    vlat = nmp.zeros(nj) ; vlat[:] = xlat[:,ji_lat0]


if cvar == 'ice':
    # Extraoplating sea values on continents:
    bt.drown(Vnemo[:,:,:], imask, k_ew=2, nb_max_inc=10, nb_smooth=10)



for jt in range(nt):

    cm = "%02d" % (jt+1)
    cdate = cy+cm

    if cvar == 'sst':
        bp.plot("2d")(vlon, vlat, Vnemo[jt,:,:] - Vclim[jt,:,:],
                      imask[:,:],  tmin, tmax, dtemp,
                      corca=vdic['ORCA'], lkcont=False, cpal='RdBu_r',
                      cfignm=path_fig+'/'+cv+'_'+cdate,
                      cbunit='K', cfig_type=fig_type, lat_min=-65., lat_max=75.,
                      ctitle='SST (NEMO - obs) '+CONFRUN+' ('+cdate+')',
示例#5
0

#  Getting NEMO mean monthly climatology of sea-ice coverage:
cf_nemo_mnmc = DIAG_D+'/clim/mclim_'+CONFRUN+'_'+cy1+'-'+cy2+'_'+FILE_ICE_SUFFIX+'.nc4'

bt.chck4f(cf_nemo_mnmc)
id_ice = Dataset(cf_nemo_mnmc)
xnemo03   = id_ice.variables[NN_ICEF][2,:,:]
xnemo09   = id_ice.variables[NN_ICEF][8,:,:]
id_ice.close()

[ nj, ni ] = xnemo03.shape ; print ' Shape of sea-ice :', nj, ni, '\n'


# Extraoplating sea values on continents:
bt.drown(xnemo03, xmask, k_ew=2, nb_max_inc=10, nb_smooth=10)
bt.drown(xnemo09, xmask, k_ew=2, nb_max_inc=10, nb_smooth=10)
bt.drown(xclim03, xmask, k_ew=2, nb_max_inc=10, nb_smooth=10)
bt.drown(xclim09, xmask, k_ew=2, nb_max_inc=10, nb_smooth=10)




# Time for figures:       
# -----------------
#
# Extending to 90S: (from 78 to 90):
#
js_ext = 12; nje = nj + js_ext
xlat0     = nmp.zeros(nje*ni); xlat0.shape     = [ nje, ni ]
xlon0     = nmp.zeros(nje*ni); xlon0.shape     = [ nje, ni ]