source: trunk/MESOSCALE/LMD_MM_MARS/WPS_GEOG/rough_GCM/extract.py @ 315

Last change on this file since 315 was 315, checked in by aslmd, 13 years ago

MESOSCALE: * implemented z0 roughness map from Hebrard et al. 2011

  • also possible to prescribe a constant value in namelist.input through init_Z0
  • if there is a missing value [z0=0] or a problem, default value is 1cm
  • note: in surface.nc and geo_em.d01.nc, z0 is in cm

in wrfinput_d01 and LMD physics integrations, z0 is in m

MODIFIED files in the physics [MESOSCALE ONLY]
M 314 LMDZ.MARS/libf/phymars/meso_inc/meso_inc_ini.F
M 314 LMDZ.MARS/libf/phymars/meso_inc/meso_inc_inifisini.F
M 314 LMDZ.MARS/libf/phymars/meso_inc/meso_inc_inifisinvar.F
M 314 LMDZ.MARS/libf/phymars/meso_inc/meso_inc_inifisvar.F

MODIFIED files in the dynamical core and interface
M 314 MESOSCALE/LMD_MM_MARS/SRC/WRFV2/call_meso_inifis1.inc
M 314 MESOSCALE/LMD_MM_MARS/SRC/WRFV2/call_meso_inifis2.inc
M 314 MESOSCALE/LMD_MM_MARS/SRC/WRFV2/call_meso_inifis3.inc
M 314 MESOSCALE/LMD_MM_MARS/SRC/WRFV2/Registry/Registry.EM
M 314 MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/module_initialize_real.F
M 314 MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/solve_em.F
M 314 MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F

MODIFIED files for geogrid.exe [interpolation on the domain]
M 314 MESOSCALE/LMD_MM_MARS/SRC/WPS/wps_mars/geogrid/GEOGRID.TBL.ARW_Mars
M 314 MESOSCALE/LMD_MM_MARS/SRC/WPS/wps_mars/namelist.wps_TEST
A 0 MESOSCALE/LMD_MM_MARS/WPS_GEOG/rough_GCM



M 314 MESOSCALE_DEV/TESTS/LMD_MM_MARS_FASTCASEnewphys.tar.gz

The manual does not feature the few indications necessary for simulations
with new physics so we took a few notes, commented for the moment
M 314 MESOSCALE_DEV/MANUAL/SRC

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#! /usr/bin/env python
2
3##file:///home/aymeric/Software/epd-7.0-2-rh5-x86/Doc/library/stdtypes.html?highlight=file#file.write
4##file:///home/aymeric/Software/epd-7.0-2-rh5-x86/Doc/library/struct.html?highlight=endian
5
6## marche pas probleme encodage...
7
8from myplot import getfield,definesubplot,smooth
9from netCDF4 import Dataset
10from matplotlib.pyplot import contourf,show,pcolor,subplot,figure
11from numpy import flipud,array,transpose
12from os import sys
13
14print sys.byteorder
15
16charvar = "albedo"
17charvar = "zMOL"
18#charvar = "thermal"
19charvar = "z0"
20
21nc = Dataset("surface.nc")
22
23var = getfield(nc,charvar)*1000.
24var = flipud(var)
25var = smooth(var,10) ##change le type!
26
27tile = 180  # resolution
28
29print var.shape
30
31# Eastern part
32epart = var[0:tile-1,tile:2*tile-1]
33epart = transpose(epart)
34fid = open('00181-00360.00001-00180','wb')
35#fid.write(str(part2))
36#pickle.dump(epart,fid)
37#epart = array(epart,'<h')
38epart = array(epart,dtype='h')
39epart.tofile(fid)
40fid.close()
41#### integer*2
42print epart.itemsize
43
44## Western part
45wpart = var[0:tile-1,0:tile-1]
46wpart = transpose(wpart)
47fid2 = open('00001-00180.00001-00180','wb')
48#fid2.write(str(part))
49#pickle.dump(wpart,fid2)
50#wpart = array(wpart,'<h')
51wpart = array(wpart,dtype='h')
52wpart.tofile(fid2)
53fid2.close()
54
55#fid = open('00181-00360.00001-00180','r')
56#epart = pickle.load(fid)
57#fid.close()
58#
59#fid2 = open('00001-00180.00001-00180','r')
60#wpart = pickle.load(fid2)
61#fid2.close()
62
63fig = figure()
64sub = definesubplot(2,fig)
65
66subplot(sub)
67contourf(epart)
68
69subplot(sub+1)
70contourf(wpart)
71
72show()
73
74
Note: See TracBrowser for help on using the repository browser.