[4147] | 1 | # -*- Mode: python -*- |
---|
| 2 | import netCDF4 |
---|
| 3 | import numpy as np |
---|
| 4 | import nemo |
---|
| 5 | from scipy import ndimage |
---|
| 6 | import sys, os, platform, argparse, textwrap, time |
---|
| 7 | |
---|
| 8 | zero = np.dtype('float64').type(0.0) |
---|
| 9 | zone = np.dtype('float64').type(1.0) |
---|
| 10 | epsfrac = np.dtype('float64').type(1.0E-10) |
---|
| 11 | pi = np.pi |
---|
| 12 | rad = pi/np.dtype('float64').type(180.0) |
---|
| 13 | ra = np.dtype('float64').type(6400000.0) # Earth radius |
---|
| 14 | |
---|
| 15 | def geodist (plon1, plat1, plon2, plat2) : |
---|
| 16 | """Distance between two points (on sphere)""" |
---|
| 17 | zs = np.sin (rad*plat1) * np.sin (rad*plat2) + np.cos (rad*plat1) * np.cos (rad*plat2) * np.cos(rad*(plon2-plon1)) |
---|
| 18 | zs = np.maximum (-zone, np.minimum (zone, zs)) |
---|
| 19 | geodist = np.arccos (zs) |
---|
| 20 | return geodist |
---|
| 21 | |
---|
| 22 | ### |
---|
| 23 | ### A partir d'un fichier de poids, complete avec les rivieres et |
---|
| 24 | ### les poids pour le run off |
---|
| 25 | ### On met a zero les poids sur les points non cotiers, et on renormalise |
---|
| 26 | ### |
---|
| 27 | |
---|
| 28 | |
---|
| 29 | ### Lecture de la ligne de comande |
---|
| 30 | # SVN information |
---|
[4148] | 31 | __Author__ = "$Author$" |
---|
| 32 | __Date__ = "$Date$" |
---|
| 33 | __Revision__ = "$Revision$" |
---|
| 34 | __Id__ = "$Id$" |
---|
| 35 | __HeadURL__ = "$HeadURL$" |
---|
[4147] | 36 | __SVN_Date__ = "$SVN_Date: $" |
---|
| 37 | |
---|
| 38 | ### |
---|
| 39 | |
---|
| 40 | ### ===== Handling command line parameters ================================================== |
---|
| 41 | # Creating a parser |
---|
| 42 | parser = argparse.ArgumentParser ( |
---|
| 43 | description = """Compute calving weights""", |
---|
| 44 | epilog='-------- This is the end of the help message --------') |
---|
| 45 | |
---|
| 46 | # Adding arguments |
---|
| 47 | parser.add_argument ('--oce' , help='oce model name', type=str, default='eORCA1.2', choices=['ORCA2.3', 'eORCA1.2', 'eORCA025'] ) |
---|
| 48 | parser.add_argument ('--atm' , help='atm model name (LMD*)', type=str, default='LMD9695' ) |
---|
| 49 | parser.add_argument ('--atmCoastWidth', help='width of the coastal band in atmosphere (in grid points)', default=1 ) |
---|
| 50 | parser.add_argument ('--oceCoastWidth', help='width of the coastal band in ocean (in grid points)', default=1 ) |
---|
| 51 | parser.add_argument ('--grids', help='grids file name', default='grids.nc' ) |
---|
| 52 | parser.add_argument ('--areas', help='masks file name', default='areas.nc' ) |
---|
| 53 | parser.add_argument ('--masks', help='areas file name', default='masks.nc' ) |
---|
| 54 | parser.add_argument ('--o2a' , help='o2a file name', default='o2a.nc' ) |
---|
| 55 | parser.add_argument ('--output', help='output rmp file name', default='rmp_tlmd_to_torc_runoff.nc' ) |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | # Parse command line |
---|
| 59 | myargs = parser.parse_args() |
---|
| 60 | |
---|
| 61 | # |
---|
| 62 | grids = myargs.grids |
---|
| 63 | areas = myargs.areas |
---|
| 64 | masks = myargs.masks |
---|
| 65 | o2a = myargs.o2a |
---|
| 66 | |
---|
| 67 | # Model Names |
---|
| 68 | atm_Name = myargs.atm |
---|
| 69 | oce_Name = myargs.oce |
---|
| 70 | # Largeur de la bande cotiere cote atm |
---|
| 71 | atmCoastWidth = myargs.atmCoastWidth |
---|
| 72 | # Largeur de la bande cotiere cote oce |
---|
| 73 | oceCoastWidth = myargs.oceCoastWidth |
---|
| 74 | |
---|
| 75 | |
---|
| 76 | ### Read coordinates of all models |
---|
| 77 | ### |
---|
| 78 | |
---|
| 79 | diaFile = netCDF4.Dataset ( o2a ) |
---|
| 80 | gridFile = netCDF4.Dataset ( grids ) |
---|
| 81 | areaFile = netCDF4.Dataset ( areas ) |
---|
| 82 | maskFile = netCDF4.Dataset ( masks ) |
---|
| 83 | |
---|
| 84 | o2aFrac = diaFile ['field01_dst'][:].filled() |
---|
| 85 | o2aFrac = np.where ( np.abs(o2aFrac) < 1E10, o2aFrac, 0.0) |
---|
| 86 | |
---|
| 87 | atm_grid_center_lat = gridFile['tlmd.lat'][:].filled() |
---|
| 88 | atm_grid_center_lon = gridFile['tlmd.lon'][:].filled() |
---|
| 89 | atm_grid_corner_lat = gridFile['tlmd.cla'][:].filled() |
---|
| 90 | atm_grid_corner_lon = gridFile['tlmd.clo'][:].filled() |
---|
| 91 | |
---|
| 92 | atm_grid_area = areaFile['tlmd.srf'][:].filled() |
---|
| 93 | atm_grid_imask = 1-maskFile['tlmd.msk'][:].squeeze().filled() |
---|
| 94 | atm_grid_dims = atm_grid_area.shape |
---|
| 95 | (atm_nvertex, atm_jpj, atm_jpi) = atm_grid_corner_lat.shape |
---|
| 96 | if atm_jpi == 1 : atm_perio = 0 # Icosahedre |
---|
| 97 | else : atm_perio = 1 # |
---|
| 98 | atm_grid_pmask = nemo.lbc_mask (atm_grid_imask, 'T', atm_perio) |
---|
| 99 | atm_address = np.reshape ( np.arange(atm_jpj*atm_jpi), (atm_jpj, atm_jpi) ) |
---|
| 100 | atm_grid_size = atm_jpj*atm_jpi |
---|
| 101 | |
---|
| 102 | oce_grid_center_lat = gridFile['torc.lat'][:].filled() |
---|
| 103 | oce_grid_center_lon = gridFile['torc.lon'][:].filled() |
---|
| 104 | oce_grid_corner_lat = gridFile['torc.cla'][:].filled() |
---|
| 105 | oce_grid_corner_lon = gridFile['torc.clo'][:].filled() |
---|
| 106 | oce_grid_area = areaFile['torc.srf'][:].filled() |
---|
| 107 | oce_grid_imask = 1-maskFile['torc.msk'][:].filled() |
---|
| 108 | oce_grid_dims = oce_grid_area.shape |
---|
| 109 | (oce_nvertex, oce_jpj, oce_jpi) = oce_grid_corner_lat.shape ; jpon=oce_jpj*oce_jpj |
---|
| 110 | if oce_jpi == 182 : oce_perio = 4 # ORCA 2 |
---|
| 111 | if oce_jpi == 362 : oce_perio = 6 # ORCA 1 |
---|
| 112 | if oce_jpi == 1442 : oce_perio = 6 # ORCA 025 |
---|
| 113 | oce_grid_pmask = nemo.lbc_mask (oce_grid_imask, 'T', oce_perio) |
---|
| 114 | oce_address = np.reshape ( np.arange(oce_jpj*oce_jpi), (oce_jpj, oce_jpi) ) |
---|
| 115 | oce_grid_size = oce_jpj*oce_jpi |
---|
| 116 | |
---|
| 117 | print ('Calculs points terre/oce/cote sur grille atmosphere' ) |
---|
| 118 | |
---|
| 119 | # Fill closed sea with image processing library |
---|
| 120 | oce_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' ) |
---|
| 121 | |
---|
| 122 | print ("Determination d'une bande cotiere ocean") |
---|
| 123 | |
---|
| 124 | oceLand = np.where (oce_grid_imask[:] < 0.5, True, False) |
---|
| 125 | oceOcean = np.where (oce_grid_imask[:] > 0.5, True, False) |
---|
| 126 | |
---|
| 127 | oceCoast = np.where (ndimage.uniform_filter(oceOcean.astype(float), size=1+2*oceCoastWidth)<1.0,True,False) & oceOcean |
---|
| 128 | oceCoast = nemo.lbc_mask (oceCoast, oce_perio, 'T') |
---|
| 129 | |
---|
| 130 | print ('Nombre de point oceLand : ' + str(oceLand.sum()) ) |
---|
| 131 | print ('Nombre de point oceOcean : ' + str(oceOcean.sum()) ) |
---|
| 132 | print ('Nombre de point oceCoast : ' + str(oceCoast.sum()) ) |
---|
| 133 | |
---|
| 134 | # Faire une liste de ces points |
---|
| 135 | oceCoast_grid_center_lon = oce_grid_center_lon[oceCoast] |
---|
| 136 | oceCoast_grid_center_lat = oce_grid_center_lat[oceCoast] |
---|
| 137 | oceCoast_grid_area = oce_grid_area [oceCoast] |
---|
| 138 | oceCoast_grid_imask = oce_grid_imask [oceCoast] |
---|
| 139 | oceCoast_grid_pmask = oce_grid_pmask [oceCoast] |
---|
| 140 | oceCoast_address = oce_address [oceCoast] |
---|
| 141 | |
---|
| 142 | |
---|
| 143 | print ("Determination d'une bande cotiere atmosphere " ) |
---|
| 144 | atmLand = np.where (o2aFrac[:] < epsfrac, True, False) |
---|
| 145 | atmFrac = np.where (o2aFrac[:] < epsfrac, True, False) & np.where (o2aFrac[:] < (zone-epsfrac), True, False) |
---|
| 146 | atmOcean = np.where (o2aFrac[:] < (zone-epsfrac), True, False) |
---|
| 147 | |
---|
| 148 | atmCoast = np.where (ndimage.uniform_filter(atmLand.astype(float), size=1+2*atmCoastWidth)<1.0,True,False) & atmLand |
---|
| 149 | atmCoast = nemo.lbc_mask (atmCoast, 1, 'T') |
---|
| 150 | |
---|
| 151 | print ('Nombre de point atmLand : ' + str(atmLand.sum()) ) |
---|
| 152 | print ('Nombre de point atmOcean : ' + str(atmOcean.sum()) ) |
---|
| 153 | print ('Nombre de point atmCoast : ' + str(atmCoast.sum()) ) |
---|
| 154 | |
---|
| 155 | # Faire une liste de ces points |
---|
| 156 | atmCoast_grid_center_lon = atm_grid_center_lon[atmCoast] |
---|
| 157 | atmCoast_grid_center_lat = atm_grid_center_lat[atmCoast] |
---|
| 158 | atmCoast_grid_area = atm_grid_area [atmCoast] |
---|
| 159 | atmCoast_grid_imask = atm_grid_imask [atmCoast] |
---|
| 160 | atmCoast_grid_pmask = atm_grid_pmask [atmCoast] |
---|
| 161 | atmCoast_address = atm_address [atmCoast] |
---|
| 162 | |
---|
| 163 | remap_matrix = np.empty ( shape=(0), dtype=np.float64 ) |
---|
| 164 | atm_address = np.empty ( shape=(0), dtype=np.int32 ) |
---|
| 165 | oce_address = np.empty ( shape=(0), dtype=np.int32 ) |
---|
| 166 | |
---|
| 167 | for ja in np.arange(len(atmCoast_grid_pmask)) : |
---|
| 168 | z_dist = geodist ( atmCoast_grid_center_lon[ja], atmCoast_grid_center_lat[ja], oceCoast_grid_center_lon, oceCoast_grid_center_lat) |
---|
| 169 | z_mask = np.where ( z_dist*ra < 600000.0, True, False) |
---|
| 170 | num_links = z_mask.sum() |
---|
| 171 | if num_links == 0 : continue |
---|
| 172 | z_area = oceCoast_grid_area[z_mask].sum() |
---|
| 173 | poids = 1.0 / z_area |
---|
| 174 | print ( num_links, z_mask.sum(), z_area ) |
---|
| 175 | # |
---|
| 176 | matrix_local = np.ones ((num_links),dtype=np.float64) * poids |
---|
| 177 | # address on source grid : all links points to the same LMDZ point. |
---|
| 178 | atm_address_local = np.ones(num_links, dtype=np.int32 ) * atmCoast_address[ja] |
---|
| 179 | # address on destination grid |
---|
| 180 | oce_address_local = oceCoast_address[z_mask] |
---|
| 181 | # Append to global tabs |
---|
| 182 | remap_matrix = np.append ( remap_matrix, matrix_local ) |
---|
| 183 | atm_address = np.append ( atm_address , atm_address_local ) |
---|
| 184 | oce_address = np.append ( oce_address , oce_address_local ) |
---|
| 185 | |
---|
| 186 | |
---|
| 187 | print ('fini') |
---|
| 188 | |
---|
| 189 | num_links = remap_matrix.shape[0] |
---|
| 190 | |
---|
| 191 | # Output file |
---|
| 192 | runoff = myargs.output |
---|
| 193 | f_runoff = netCDF4.Dataset ( runoff, 'w', format='NETCDF3_64BIT' ) |
---|
| 194 | |
---|
| 195 | print ('Output file: ' + runoff ) |
---|
| 196 | |
---|
| 197 | f_runoff.Conventions = "CF-1.6" |
---|
| 198 | f_runoff.source = "IPSL Earth system model" |
---|
| 199 | f_runoff.group = "ICMC IPSL Climate Modelling Center" |
---|
| 200 | f_runoff.Institution = "IPSL https.//www.ipsl.fr" |
---|
| 201 | f_runoff.Ocean = oce_Name + " https://www.nemo-ocean.eu" |
---|
| 202 | f_runoff.Atmosphere = atm_Name + " http://lmdz.lmd.jussieu.fr" |
---|
| 203 | f_runoff.associatedFiles = grids + " " + areas + " " + masks |
---|
| 204 | f_runoff.directory = os.getcwd () |
---|
| 205 | f_runoff.description = "Generated with ???" |
---|
| 206 | f_runoff.title = runoff |
---|
| 207 | f_runoff.Program = "Generated by " + sys.argv[0] + " with flags " + str(sys.argv[1:]) |
---|
| 208 | f_runoff.timeStamp = time.asctime() |
---|
| 209 | f_runoff.uuid = areaFile.uuid |
---|
| 210 | f_runoff.HOSTNAME = platform.node() |
---|
| 211 | #f_runoff.LOGNAME = os.getlogin() |
---|
| 212 | f_runoff.Python = "Python version " + platform.python_version() |
---|
| 213 | f_runoff.OS = platform.system() |
---|
| 214 | f_runoff.release = platform.release() |
---|
| 215 | f_runoff.hardware = platform.machine() |
---|
| 216 | f_runoff.Comment = "Preliminary attempt - Do not trust !" |
---|
| 217 | f_runoff.conventions = "SCRIP" |
---|
| 218 | f_runoff.source_grid = "curvilinear" |
---|
| 219 | f_runoff.dest_grid = "curvilinear" |
---|
| 220 | f_runoff.Model = "IPSL CM6" |
---|
[4148] | 221 | f_runoff.SVN_Author = "$Author$" |
---|
| 222 | f_runoff.SVN_Date = "$Date$" |
---|
| 223 | f_runoff.SVN_Revision = "$Revision$" |
---|
| 224 | f_runoff.SVN_Id = "$Id$" |
---|
| 225 | f_runoff.SVN_HeadURL = "$HeadURL$" |
---|
[4147] | 226 | |
---|
| 227 | num_links = f_runoff.createDimension ('num_links' , num_links ) |
---|
| 228 | num_wgts = f_runoff.createDimension ('num_wgts' , 1 ) |
---|
| 229 | |
---|
| 230 | atm_grid_size = f_runoff.createDimension ('src_grid_size' , atm_grid_size ) |
---|
| 231 | atm_grid_corners = f_runoff.createDimension ('src_grid_corners', atm_grid_corner_lon.shape[0] ) |
---|
| 232 | atm_grid_rank = f_runoff.createDimension ('src_grid_rank' , 2 ) |
---|
| 233 | |
---|
| 234 | oce_grid_size = f_runoff.createDimension ('dst_grid_size' , oce_grid_size ) |
---|
| 235 | oce_grid_corners = f_runoff.createDimension ('dst_grid_corners', oce_grid_corner_lon.shape[0] ) |
---|
| 236 | oce_grid_rank = f_runoff.createDimension ('dst_grid_rank' , 2 ) |
---|
| 237 | |
---|
| 238 | v_remap_matrix = f_runoff.createVariable ( 'remap_matrix', 'f8', ('num_links', 'num_wgts') ) |
---|
| 239 | |
---|
| 240 | v_atm_address = f_runoff.createVariable ( 'src_address' , 'i4', ('num_links',) ) |
---|
| 241 | v_oce_address = f_runoff.createVariable ( 'dst_address' , 'i4', ('num_links',) ) |
---|
| 242 | |
---|
| 243 | v_remap_matrix[:] = remap_matrix |
---|
| 244 | v_atm_address [:] = atm_address |
---|
| 245 | v_oce_address [:] = oce_address |
---|
| 246 | |
---|
| 247 | v_atm_grid_dims = f_runoff.createVariable ( 'src_grid_dims' , 'i4', ('src_grid_rank',) ) |
---|
| 248 | v_atm_grid_center_lon = f_runoff.createVariable ( 'src_grid_center_lon', 'i4', ('src_grid_size',) ) |
---|
| 249 | v_atm_grid_center_lat = f_runoff.createVariable ( 'src_grid_center_lat', 'i4', ('src_grid_size',) ) |
---|
| 250 | v_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" |
---|
| 251 | v_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" |
---|
| 252 | v_atm_grid_corner_lon = f_runoff.createVariable ( 'src_grid_corner_lon', 'f8', ('src_grid_size', 'src_grid_corners') ) |
---|
| 253 | v_atm_grid_corner_lat = f_runoff.createVariable ( 'src_grid_corner_lat', 'f8', ('src_grid_size', 'src_grid_corners') ) |
---|
| 254 | v_atm_grid_corner_lon.units="degrees_east" |
---|
| 255 | v_atm_grid_corner_lat.units="degrees_north" |
---|
| 256 | v_atm_grid_area = f_runoff.createVariable ( 'src_grid_area' , 'f8', ('src_grid_size',) ) |
---|
| 257 | v_atm_grid_area.long_name="Grid area" ; v_atm_grid_area.standard_name="cell_area" ; v_atm_grid_area.units="m2" |
---|
| 258 | v_atm_grid_imask = f_runoff.createVariable ( 'src_grid_imask' , 'f8', ('src_grid_size',) ) |
---|
| 259 | v_atm_grid_imask.long_name="Land-sea mask" ; v_atm_grid_imask.units="Land:1, Ocean:0" |
---|
| 260 | |
---|
| 261 | v_atm_grid_dims [:] = atm_grid_dims |
---|
| 262 | v_atm_grid_center_lon[:] = atm_grid_center_lon[:].ravel() |
---|
| 263 | v_atm_grid_center_lat[:] = atm_grid_center_lat[:].ravel() |
---|
| 264 | v_atm_grid_corner_lon[:] = atm_grid_corner_lon.reshape( (atm_jpi*atm_jpj, atm_grid_corners.__len__()) ) |
---|
| 265 | v_atm_grid_corner_lat[:] = atm_grid_corner_lat.reshape( (atm_jpi*atm_jpj, atm_grid_corners.__len__()) ) |
---|
| 266 | v_atm_grid_area [:] = atm_grid_area[:].ravel() |
---|
| 267 | v_atm_grid_imask [:] = atm_grid_imask[:].ravel() |
---|
| 268 | |
---|
| 269 | # -- |
---|
| 270 | |
---|
| 271 | v_oce_grid_dims = f_runoff.createVariable ( 'dst_grid_dims' , 'i4', ('dst_grid_rank',) ) |
---|
| 272 | v_oce_grid_center_lon = f_runoff.createVariable ( 'dst_grid_center_lon', 'i4', ('dst_grid_size',) ) |
---|
| 273 | v_oce_grid_center_lat = f_runoff.createVariable ( 'dst_grid_center_lat', 'i4', ('dst_grid_size',) ) |
---|
| 274 | v_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" |
---|
| 275 | v_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" |
---|
| 276 | v_oce_grid_corner_lon = f_runoff.createVariable ( 'oce_grid_corner_lon', 'f8', ('dst_grid_size', 'dst_grid_corners') ) |
---|
| 277 | v_oce_grid_corner_lat = f_runoff.createVariable ( 'dst_grid_corner_lat', 'f8', ('dst_grid_size', 'dst_grid_corners') ) |
---|
| 278 | v_oce_grid_corner_lon.units="degrees_east" |
---|
| 279 | v_oce_grid_corner_lat.units="degrees_north" |
---|
| 280 | v_oce_grid_area = f_runoff.createVariable ( 'dst_grid_area' , 'f8', ('dst_grid_size',) ) |
---|
| 281 | v_oce_grid_area.long_name="Grid area" ; v_oce_grid_area.standard_name="cell_area" ; v_oce_grid_area.units="m2" |
---|
| 282 | v_oce_grid_imask = f_runoff.createVariable ( 'dst_grid_imask' , 'f8', ('dst_grid_size',) ) |
---|
| 283 | v_oce_grid_imask.long_name="Land-sea mask" ; v_oce_grid_imask.units="Land:1, Ocean:0" |
---|
| 284 | |
---|
| 285 | v_oce_grid_dims [:] = oce_grid_dims |
---|
| 286 | v_oce_grid_center_lon[:] = oce_grid_center_lon[:].ravel() |
---|
| 287 | v_oce_grid_center_lat[:] = oce_grid_center_lat[:].ravel() |
---|
| 288 | v_oce_grid_corner_lon[:] = oce_grid_corner_lon.reshape( (oce_jpi*oce_jpj, oce_grid_corners.__len__()) ) |
---|
| 289 | v_oce_grid_corner_lat[:] = oce_grid_corner_lon.reshape( (oce_jpi*oce_jpj, oce_grid_corners.__len__()) ) |
---|
| 290 | v_oce_grid_area [:] = oce_grid_area[:].ravel() |
---|
| 291 | v_oce_grid_imask [:] = oce_grid_imask[:].ravel() |
---|
| 292 | |
---|
| 293 | # For diags |
---|
| 294 | v_atm_lon_addressed = f_runoff.createVariable ( 'src_lon_addressed', 'f8', ('num_links',) ) |
---|
| 295 | v_atm_lat_addressed = f_runoff.createVariable ( 'src_lat_addressed', 'f8', ('num_links',) ) |
---|
| 296 | v_oce_lon_addressed = f_runoff.createVariable ( 'dst_lon_addressed', 'f8', ('num_links',) ) |
---|
| 297 | v_oce_lat_addressed = f_runoff.createVariable ( 'dst_lat_addressed', 'f8', ('num_links',) ) |
---|
| 298 | |
---|
| 299 | v_atm_lon_addressed.long_name="Longitude" ; v_atm_lon_addressed.standard_name="longitude" ; v_atm_lon_addressed.units="degrees_east" |
---|
| 300 | v_atm_lat_addressed.long_name="Latitude" ; v_atm_lat_addressed.standard_name="latitude" ; v_atm_lat_addressed.units="degrees_east" |
---|
| 301 | v_atm_lon_addressed [:] = atm_grid_center_lon.ravel()[atm_address].ravel() |
---|
| 302 | v_atm_lat_addressed [:] = atm_grid_center_lat.ravel()[atm_address].ravel() |
---|
| 303 | |
---|
| 304 | v_oce_lon_addressed.long_name="Longitude" ; v_oce_lon_addressed.standard_name="longitude" ; v_oce_lon_addressed.units="degrees_east" |
---|
| 305 | v_oce_lat_addressed.long_name="Latitude" ; v_oce_lat_addressed.standard_name="latitude" ; v_oce_lat_addressed.units="degrees_east" |
---|
| 306 | v_oce_lon_addressed [:] = oce_grid_center_lon.ravel()[oce_address].ravel() |
---|
| 307 | v_oce_lat_addressed [:] = oce_grid_center_lat.ravel()[oce_address].ravel() |
---|
| 308 | |
---|
| 309 | f_runoff.close () |
---|