source: TOOLS/MOSAIX/cotes_etal.py @ 4151

Last change on this file since 4151 was 4151, checked in by omamce, 3 years ago

O.M. : adding comments to cotes_etal

  • Property svn:keywords set to Date Revision HeadURL Author Id
File size: 18.8 KB
Line 
1# -*- Mode: python -*-
2### ===========================================================================
3###
4### Compute runoff weights.
5### For LMDZ only. Not suitable for DYNAMICO
6###
7### ===========================================================================
8##
9##  Warning, to install, configure, run, use any of Olivier Marti's
10##  software or to read the associated documentation you'll need at least
11##  one (1) brain in a reasonably working order. Lack of this implement
12##  will void any warranties (either express or implied).
13##  O. Marti assumes no responsability for errors, omissions,
14##  data loss, or any other consequences caused directly or indirectly by
15##  the usage of his software by incorrectly or partially configured
16##  personal.
17##
18# SVN information
19__Author__   = "$Author$"
20__Date__     = "$Date$"
21__Revision__ = "$Revision$"
22__Id__       = "$Id$"
23__HeadURL__  = "$HeadURL$"
24__SVN_Date__ = "$SVN_Date: $"
25##
26
27import netCDF4
28import numpy as np
29import nemo
30from scipy import ndimage
31import sys, os, platform, argparse, textwrap, time
32
33## Userful constants
34zero = np.dtype('float64').type(0.0)
35zone = np.dtype('float64').type(1.0)
36epsfrac = np.dtype('float64').type(1.0E-10)
37pi  = np.pi
38rad = pi/np.dtype('float64').type(180.0)
39ra = np.dtype('float64').type(6400000.0) # Earth radius
40
41## Functions
42def geodist (plon1, plat1, plon2, plat2) :
43      """Distance between two points (on sphere)"""
44      zs = np.sin (rad*plat1) * np.sin (rad*plat2) +  np.cos (rad*plat1) * np.cos (rad*plat2) * np.cos(rad*(plon2-plon1))
45      zs = np.maximum (-zone, np.minimum (zone, zs))
46      geodist =  np.arccos (zs)
47      return geodist
48
49
50   
51
52### ===== Reading command line parameters ==================================================
53# Creating a parser
54parser = argparse.ArgumentParser (
55    description = """Compute calving weights""",
56    epilog='-------- End of the help message --------')
57
58# Adding arguments
59parser.add_argument ('--oce'   , help='oce model name', type=str, default='eORCA1.2', choices=['ORCA2.3', 'eORCA1.2', 'eORCA025'] )
60parser.add_argument ('--atm'   , help='atm model name (LMD*)', type=str, default='LMD9695'    )
61parser.add_argument ('--atmCoastWidth', help='width of the coastal band in atmosphere (in grid points)', default=1 )
62parser.add_argument ('--oceCoastWidth', help='width of the coastal band in ocean (in grid points)'     , default=2 )
63parser.add_argument ('--grids', help='grids file name', default='grids.nc' )
64parser.add_argument ('--areas', help='masks file name', default='areas.nc' )
65parser.add_argument ('--masks', help='areas file name', default='masks.nc' )
66parser.add_argument ('--o2a'  , help='o2a file name', default='o2a.nc' )
67parser.add_argument ('--output', help='output rmp file name', default='rmp_tlmd_to_torc_runoff.nc' )
68
69# Parse command line
70myargs = parser.parse_args()
71
72#
73grids = myargs.grids
74areas = myargs.areas
75masks = myargs.masks
76o2a   = myargs.o2a
77
78# Model Names
79atm_Name = myargs.atm
80oce_Name = myargs.oce
81# Width of the coastal band (land points) in the atmopshere
82atmCoastWidth = myargs.atmCoastWidth
83# Width of the coastal band (ocean points) in the ocean
84oceCoastWidth = myargs.oceCoastWidth
85
86
87### Read coordinates of all models
88###
89
90diaFile    = netCDF4.Dataset ( o2a   )
91gridFile   = netCDF4.Dataset ( grids )
92areaFile   = netCDF4.Dataset ( areas )
93maskFile   = netCDF4.Dataset ( masks )
94
95o2aFrac             = diaFile ['field01_dst'][:].filled()
96o2aFrac = np.where ( np.abs(o2aFrac) < 1E10, o2aFrac, 0.0)
97
98atm_grid_center_lat = gridFile['tlmd.lat'][:].filled()
99atm_grid_center_lon = gridFile['tlmd.lon'][:].filled()
100atm_grid_corner_lat = gridFile['tlmd.cla'][:].filled()
101atm_grid_corner_lon = gridFile['tlmd.clo'][:].filled()
102
103atm_grid_area       = areaFile['tlmd.srf'][:].filled()
104atm_grid_imask      = 1-maskFile['tlmd.msk'][:].squeeze().filled()
105atm_grid_dims       = atm_grid_area.shape
106(atm_nvertex, atm_jpj, atm_jpi) = atm_grid_corner_lat.shape
107atm_perio = 0
108atm_grid_pmask = nemo.lbc_mask (atm_grid_imask, 'T', atm_perio)
109atm_address = np.reshape ( np.arange(atm_jpj*atm_jpi), (atm_jpj, atm_jpi) )
110atm_grid_size = atm_jpj*atm_jpi
111
112oce_grid_center_lat = gridFile['torc.lat'][:].filled()
113oce_grid_center_lon = gridFile['torc.lon'][:].filled()
114oce_grid_corner_lat = gridFile['torc.cla'][:].filled()
115oce_grid_corner_lon = gridFile['torc.clo'][:].filled()
116oce_grid_area       = areaFile['torc.srf'][:].filled()
117oce_grid_imask      = 1-maskFile['torc.msk'][:].filled()
118oce_grid_dims       = oce_grid_area.shape
119(oce_nvertex, oce_jpj, oce_jpi) = oce_grid_corner_lat.shape ; jpon=oce_jpj*oce_jpj
120if oce_jpi ==  182 : oce_perio = 4 # ORCA 2
121if oce_jpi ==  362 : oce_perio = 6 # ORCA 1
122if oce_jpi == 1442 : oce_perio = 6 # ORCA 025
123oce_grid_pmask = nemo.lbc_mask (oce_grid_imask, 'T', oce_perio)
124oce_address = np.reshape ( np.arange(oce_jpj*oce_jpi), (oce_jpj, oce_jpi) )
125oce_grid_size = oce_jpj*oce_jpi
126
127## Fill closed sea with image processing library
128oce_grid_imask = nemo.lbc_mask ( 1-ndimage.binary_fill_holes (1-nemo.lbc(oce_grid_imask, nperio=oce_perio, cd_type='T')), nperio=oce_perio, cd_type='T' )
129
130##
131print ("Determination d'une bande cotiere ocean")
132
133oceLand  = np.where (oce_grid_pmask[:] < 0.5, True, False)
134oceOcean = np.where (oce_grid_pmask[:] > 0.5, True, False)
135
136NNocean = 1+2*oceCoastWidth
137oceOceanFiltered = ndimage.uniform_filter(oceOcean.astype(float), size=NNocean)
138oceCoast = np.where (oceOceanFiltered<(1.0-0.5/(NNocean**2)),True,False) & oceOcean
139oceCoast = nemo.lbc_mask (oceCoast, oce_perio, 'T')
140
141print ('Number of points in oceLand  : ' + str(oceLand.sum()) )
142print ('Number of points in oceOcean : ' + str(oceOcean.sum()) )
143print ('Number of points in oceCoast : ' + str(oceCoast.sum()) )
144
145# Arrays with coastal points only
146oceCoast_grid_center_lon = oce_grid_center_lon[oceCoast]
147oceCoast_grid_center_lat = oce_grid_center_lat[oceCoast]
148oceCoast_grid_area       = oce_grid_area      [oceCoast]
149oceCoast_grid_imask      = oce_grid_imask     [oceCoast]
150oceCoast_grid_pmask      = oce_grid_pmask     [oceCoast]
151oceCoast_address         = oce_address        [oceCoast]
152
153
154print ("Determination d'une bande cotiere atmosphere " )
155atmLand      = np.where (o2aFrac[:] < epsfrac       , True, False)
156atmLandFrac  = np.where (o2aFrac[:] < zone-epsfrac  , True, False)
157atmFrac      = np.where (o2aFrac[:] > epsfrac       , True, False) & np.where (o2aFrac[:] < (zone-epsfrac), True, False)
158atmOcean     = np.where (o2aFrac[:] < (zone-epsfrac), True, False)
159atmOceanFrac = np.where (o2aFrac[:] > epsfrac       , True, False)
160
161NNatm = 1+2*atmCoastWidth
162atmLandFiltered = ndimage.uniform_filter(atmLand.astype(float), size=NNatm)
163atmCoast = np.where (atmLandFiltered<(1.0-0.5/(NNatm**2)),True,False) & atmLandFrac
164atmCoast = nemo.lbc_mask (atmCoast, 1, 'T')
165
166print ('Number of points in atmLand  : ' + str(atmLand.sum()) )
167print ('Number of points in atmOcean : ' + str(atmOcean.sum()) )
168print ('Number of points in atmCoast : ' + str(atmCoast.sum()) )
169
170# Arrays with coastal points only
171atmCoast_grid_center_lon = atm_grid_center_lon[atmCoast]
172atmCoast_grid_center_lat = atm_grid_center_lat[atmCoast]
173atmCoast_grid_area       = atm_grid_area      [atmCoast]
174atmCoast_grid_imask      = atm_grid_imask     [atmCoast]
175atmCoast_grid_pmask      = atm_grid_pmask     [atmCoast]
176atmCoast_address         = atm_address        [atmCoast]
177
178remap_matrix = np.empty ( shape=(0), dtype=np.float64 )
179atm_address  = np.empty ( shape=(0), dtype=np.int32   )
180oce_address  = np.empty ( shape=(0), dtype=np.int32   )
181
182## Loop on atmosphere coastal points
183for ja in np.arange(len(atmCoast_grid_pmask)) :
184    z_dist = geodist ( atmCoast_grid_center_lon[ja], atmCoast_grid_center_lat[ja], oceCoast_grid_center_lon, oceCoast_grid_center_lat)
185    z_mask = np.where ( z_dist*ra < 600000.0, True, False)
186    num_links = z_mask.sum()
187    if num_links == 0 : continue
188    z_area = oceCoast_grid_area[z_mask].sum()
189    poids = 1.0 / z_area
190    print ( num_links, z_mask.sum(), z_area )
191    #
192    matrix_local     = np.ones ((num_links),dtype=np.float64) * poids
193    # address on source grid : all links points to the same LMDZ point.
194    atm_address_local = np.ones(num_links, dtype=np.int32 ) * atmCoast_address[ja]
195    # address on destination grid
196    oce_address_local = oceCoast_address[z_mask]
197    # Append to global tabs
198    remap_matrix = np.append ( remap_matrix, matrix_local      )
199    atm_address  = np.append ( atm_address , atm_address_local )
200    oce_address  = np.append ( oce_address , oce_address_local )
201       
202
203print ('End of loop')
204
205num_links = remap_matrix.shape[0]
206
207### Output file
208runoff = myargs.output
209f_runoff = netCDF4.Dataset ( runoff, 'w', format='NETCDF3_64BIT' )
210
211print ('Output file: ' + runoff )
212
213f_runoff.Conventions     = "CF-1.6"
214f_runoff.source          = "IPSL Earth system model"
215f_runoff.group           = "ICMC IPSL Climate Modelling Center"
216f_runoff.Institution     = "IPSL https.//www.ipsl.fr"
217f_runoff.Ocean           = oce_Name + " https://www.nemo-ocean.eu"
218f_runoff.Atmosphere      = atm_Name + " http://lmdz.lmd.jussieu.fr"
219f_runoff.associatedFiles = grids + " " + areas + " " + masks
220f_runoff.directory       = os.getcwd ()
221f_runoff.description     = "Generated with cotes_etal.py"
222f_runoff.title           = runoff
223f_runoff.Program         = "Generated by " + sys.argv[0] + " with flags " + str(sys.argv[1:])
224f_runoff.timeStamp       = time.asctime()
225f_runoff.uuid            = areaFile.uuid
226f_runoff.HOSTNAME        = platform.node()
227#f_runoff.LOGNAME         = os.getlogin()
228f_runoff.Python          = "Python version " +  platform.python_version()
229f_runoff.OS              = platform.system()
230f_runoff.release         = platform.release()
231f_runoff.hardware        = platform.machine()
232f_runoff.Comment         = "Preliminary attempt - Do not trust !"
233f_runoff.conventions     = "SCRIP"
234f_runoff.source_grid     = "curvilinear"
235f_runoff.dest_grid       = "curvilinear"
236f_runoff.Model           = "IPSL CM6"
237f_runoff.SVN_Author      = "$Author$"
238f_runoff.SVN_Date        = "$Date$"
239f_runoff.SVN_Revision    = "$Revision$"
240f_runoff.SVN_Id          = "$Id$"
241f_runoff.SVN_HeadURL     = "$HeadURL$"
242
243num_links        = f_runoff.createDimension ('num_links'       , num_links )
244num_wgts         = f_runoff.createDimension ('num_wgts'        ,         1 )
245
246atm_grid_size    = f_runoff.createDimension ('src_grid_size'   , atm_grid_size )
247atm_grid_corners = f_runoff.createDimension ('src_grid_corners', atm_grid_corner_lon.shape[0]  )
248atm_grid_rank    = f_runoff.createDimension ('src_grid_rank'   ,        2  )
249
250oce_grid_size    = f_runoff.createDimension ('dst_grid_size'   , oce_grid_size )
251oce_grid_corners = f_runoff.createDimension ('dst_grid_corners', oce_grid_corner_lon.shape[0] )
252oce_grid_rank    = f_runoff.createDimension ('dst_grid_rank'   ,        2  )
253
254v_remap_matrix = f_runoff.createVariable ( 'remap_matrix', 'f8', ('num_links', 'num_wgts') )
255
256v_atm_address  = f_runoff.createVariable ( 'src_address' , 'i4', ('num_links',) )
257v_oce_address  = f_runoff.createVariable ( 'dst_address' , 'i4', ('num_links',) )
258
259v_remap_matrix[:] = remap_matrix
260v_atm_address [:] = atm_address + 1 # OASIS uses Fortran style indexing
261v_oce_address [:] = oce_address + 1
262
263v_atm_grid_dims       = f_runoff.createVariable ( 'src_grid_dims'      , 'i4', ('src_grid_rank',) )
264v_atm_grid_center_lon = f_runoff.createVariable ( 'src_grid_center_lon', 'i4', ('src_grid_size',) )
265v_atm_grid_center_lat = f_runoff.createVariable ( 'src_grid_center_lat', 'i4', ('src_grid_size',) )
266v_atm_grid_center_lon.units='degrees_east'  ; v_atm_grid_center_lon.long_name='Longitude' ; v_atm_grid_center_lon.long_name='longitude' ; v_atm_grid_center_lon.bounds="src_grid_corner_lon"
267v_atm_grid_center_lat.units='degrees_north' ; v_atm_grid_center_lat.long_name='Latitude'  ; v_atm_grid_center_lat.long_name='latitude ' ; v_atm_grid_center_lat.bounds="src_grid_corner_lat"
268v_atm_grid_corner_lon = f_runoff.createVariable ( 'src_grid_corner_lon', 'f8', ('src_grid_size', 'src_grid_corners')  )
269v_atm_grid_corner_lat = f_runoff.createVariable ( 'src_grid_corner_lat', 'f8', ('src_grid_size', 'src_grid_corners')  )
270v_atm_grid_corner_lon.units="degrees_east"
271v_atm_grid_corner_lat.units="degrees_north"
272v_atm_grid_area       = f_runoff.createVariable ( 'src_grid_area'      , 'f8', ('src_grid_size',)  )
273v_atm_grid_area.long_name="Grid area" ; v_atm_grid_area.standard_name="cell_area" ; v_atm_grid_area.units="m2"
274v_atm_grid_imask      = f_runoff.createVariable ( 'src_grid_imask'     , 'i4', ('src_grid_size',)  )
275v_atm_grid_imask.long_name="Land-sea mask" ; v_atm_grid_imask.units="Land:1, Ocean:0"
276v_atm_grid_pmask      = f_runoff.createVariable ( 'src_grid_pmask'     , 'i4', ('src_grid_size',)  )
277v_atm_grid_pmask.long_name="Land-sea mask (periodicity removed)" ; v_atm_grid_pmask.units="Land:1, Ocean:0"
278
279v_atm_grid_dims      [:] = atm_grid_dims
280v_atm_grid_center_lon[:] = atm_grid_center_lon[:].ravel()
281v_atm_grid_center_lat[:] = atm_grid_center_lat[:].ravel()
282v_atm_grid_corner_lon[:] = atm_grid_corner_lon.reshape( (atm_jpi*atm_jpj, atm_grid_corners.__len__()) )
283v_atm_grid_corner_lat[:] = atm_grid_corner_lat.reshape( (atm_jpi*atm_jpj, atm_grid_corners.__len__()) )
284v_atm_grid_area      [:] = atm_grid_area[:].ravel()
285v_atm_grid_imask     [:] = atm_grid_imask[:].ravel()
286v_atm_grid_pmask     [:] = atm_grid_pmask[:].ravel()
287
288# --
289
290v_oce_grid_dims       = f_runoff.createVariable ( 'dst_grid_dims'      , 'i4', ('dst_grid_rank',) )
291v_oce_grid_center_lon = f_runoff.createVariable ( 'dst_grid_center_lon', 'i4', ('dst_grid_size',) )
292v_oce_grid_center_lat = f_runoff.createVariable ( 'dst_grid_center_lat', 'i4', ('dst_grid_size',) )
293v_oce_grid_center_lon.units='degrees_east'  ; v_oce_grid_center_lon.long_name='Longitude' ; v_oce_grid_center_lon.long_name='longitude' ; v_oce_grid_center_lon.bounds="dst_grid_corner_lon"
294v_oce_grid_center_lat.units='degrees_north' ; v_oce_grid_center_lat.long_name='Latitude'  ; v_oce_grid_center_lat.long_name='latitude'  ; v_oce_grid_center_lat.bounds="dst_grid_corner_lat"
295v_oce_grid_corner_lon = f_runoff.createVariable ( 'dst_grid_corner_lon', 'f8', ('dst_grid_size', 'dst_grid_corners')  )
296v_oce_grid_corner_lat = f_runoff.createVariable ( 'dst_grid_corner_lat', 'f8', ('dst_grid_size', 'dst_grid_corners')  )
297v_oce_grid_corner_lon.units="degrees_east"
298v_oce_grid_corner_lat.units="degrees_north"
299v_oce_grid_area       = f_runoff.createVariable ( 'dst_grid_area'  , 'f8', ('dst_grid_size',) )
300v_oce_grid_area.long_name="Grid area" ; v_oce_grid_area.standard_name="cell_area" ; v_oce_grid_area.units="m2"
301v_oce_grid_imask      = f_runoff.createVariable ( 'dst_grid_imask'     , 'i4', ('dst_grid_size',)  )
302v_oce_grid_imask.long_name="Land-sea mask" ; v_oce_grid_imask.units="Land:1, Ocean:0"
303v_oce_grid_pmask      = f_runoff.createVariable ( 'dst_grid_pmask'     , 'i4', ('dst_grid_size',)  )
304v_oce_grid_pmask.long_name="Land-sea mask (periodicity removed)" ; v_oce_grid_pmask.units="Land:1, Ocean:0"
305
306v_oce_grid_dims      [:] = oce_grid_dims
307v_oce_grid_center_lon[:] = oce_grid_center_lon[:].ravel()
308v_oce_grid_center_lat[:] = oce_grid_center_lat[:].ravel()
309v_oce_grid_corner_lon[:] = oce_grid_corner_lon.reshape( (oce_jpi*oce_jpj, oce_grid_corners.__len__()) )
310v_oce_grid_corner_lat[:] = oce_grid_corner_lon.reshape( (oce_jpi*oce_jpj, oce_grid_corners.__len__()) )
311v_oce_grid_area      [:] = oce_grid_area[:].ravel()
312v_oce_grid_imask     [:] = oce_grid_imask[:].ravel()
313v_oce_grid_pmask     [:] = oce_grid_pmask[:].ravel()
314
315## For diag, not used by OASIS
316v_atm_lon_addressed   = f_runoff.createVariable ( 'src_lon_addressed'  , 'f8', ('num_links',) )
317v_atm_lat_addressed   = f_runoff.createVariable ( 'src_lat_addressed'  , 'f8', ('num_links',) )
318v_atm_area_addressed  = f_runoff.createVariable ( 'src_area_addressed' , 'f8', ('num_links',) )
319v_atm_imask_addressed = f_runoff.createVariable ( 'src_imask_addressed', 'i4', ('num_links',) )
320v_atm_pmask_addressed = f_runoff.createVariable ( 'src_pmask_addressed', 'i4', ('num_links',) )
321
322v_oce_lon_addressed   = f_runoff.createVariable ( 'dst_lon_addressed'  , 'f8', ('num_links',) )
323v_oce_lat_addressed   = f_runoff.createVariable ( 'dst_lat_addressed'  , 'f8', ('num_links',) )
324v_oce_area_addressed  = f_runoff.createVariable ( 'dst_area_addressed' , 'f8', ('num_links',) )
325v_oce_imask_addressed = f_runoff.createVariable ( 'dst_imask_addressed', 'i4', ('num_links',) )
326v_oce_pmask_addressed = f_runoff.createVariable ( 'dst_pmask_addressed', 'i4', ('num_links',) )
327
328v_atm_lon_addressed.long_name="Longitude" ; v_atm_lon_addressed.standard_name="longitude" ; v_atm_lon_addressed.units="degrees_east"
329v_atm_lat_addressed.long_name="Latitude"  ; v_atm_lat_addressed.standard_name="latitude"  ; v_atm_lat_addressed.units="degrees_north"
330v_atm_lon_addressed  [:] = atm_grid_center_lon.ravel()[atm_address].ravel()
331v_atm_lat_addressed  [:] = atm_grid_center_lat.ravel()[atm_address].ravel()
332v_atm_area_addressed [:] = atm_grid_area.ravel()[atm_address].ravel()
333v_atm_imask_addressed[:] = 1-atm_grid_imask.ravel()[atm_address].ravel()
334v_atm_pmask_addressed[:] = 1-atm_grid_pmask.ravel()[atm_address].ravel()
335
336v_oce_lon_addressed.long_name="Longitude" ; v_oce_lon_addressed.standard_name="longitude" ; v_oce_lon_addressed.units="degrees_east"
337v_oce_lat_addressed.long_name="Latitude"  ; v_oce_lat_addressed.standard_name="latitude"  ; v_oce_lat_addressed.units="degrees_north"
338v_oce_lon_addressed  [:] = oce_grid_center_lon.ravel()[oce_address].ravel()
339v_oce_lat_addressed  [:] = oce_grid_center_lat.ravel()[oce_address].ravel()
340v_oce_area_addressed [:] = oce_grid_area.ravel()[oce_address].ravel()
341v_oce_imask_addressed[:] = 1-oce_grid_imask.ravel()[oce_address].ravel()
342v_oce_pmask_addressed[:] = 1-oce_grid_pmask.ravel()[oce_address].ravel()
343
344v_atmLand         = f_runoff.createVariable ( 'atmLand'        , 'i4', ('src_grid_size',) )
345v_atmLandFiltered = f_runoff.createVariable ( 'atmLandFiltered', 'f4', ('src_grid_size',) )
346v_atmLandFrac     = f_runoff.createVariable ( 'atmLandFrac'    , 'i4', ('src_grid_size',) )
347v_atmFrac         = f_runoff.createVariable ( 'atmFrac'        , 'i4', ('src_grid_size',) )
348v_atmOcean        = f_runoff.createVariable ( 'atmOcean'       , 'i4', ('src_grid_size',) )
349v_atmOceanFrac    = f_runoff.createVariable ( 'atmOceanFrac'   , 'i4', ('src_grid_size',) )
350v_atmCoast        = f_runoff.createVariable ( 'atmCoast'       , 'i4', ('src_grid_size',) ) 
351
352v_atmLand[:]         = atmLand.ravel()
353v_atmLandFrac[:]     = atmLandFrac.ravel()
354v_atmLandFiltered[:] = atmLandFiltered.ravel()
355v_atmFrac[:]         = atmFrac.ravel()
356v_atmOcean[:]        = atmOcean.ravel()
357v_atmOceanFrac[:]    = atmOceanFrac.ravel()
358v_atmCoast[:]        = atmCoast.ravel()
359
360v_oceLand          = f_runoff.createVariable ( 'oceLand'         , 'i4', ('dst_grid_size',) )
361v_oceOcean         = f_runoff.createVariable ( 'oceOcean'        , 'i4', ('dst_grid_size',) )
362v_oceOceanFiltered = f_runoff.createVariable ( 'oceOceanFiltered', 'f4', ('dst_grid_size',) )
363v_oceCoast         = f_runoff.createVariable ( 'oceCoast'        , 'i4', ('dst_grid_size',) )
364
365v_oceLand[:]      = oceLand.ravel()
366v_oceOcean[:]     = oceOcean.ravel()
367v_oceOceanFiltered[:]     = oceOceanFiltered.ravel()
368v_oceCoast[:]     = oceCoast.ravel()
369
370f_runoff.close ()
Note: See TracBrowser for help on using the repository browser.