Changeset 6090 for TOOLS/MOSAIX
- Timestamp:
- 03/04/22 14:23:14 (2 years ago)
- Location:
- TOOLS/MOSAIX
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/MOSAIX/CalvingWeights.py
r6066 r6090 413 413 if myargs.type in ['iceberg', 'iceshelf' ]: f_calving.attrs['originalFiles'] = myargs.repartition_file 414 414 f_calving.attrs['associatedFiles'] = grids + " " + areas + " " + masks 415 f_calving.attrs['directory'] = os.getcwd () 415 416 416 f_calving.attrs['description'] = "Generated with XIOS http://forge.ipsl.jussieu.fr/ioserver and MOSAIX https://forge.ipsl.jussieu.fr/igcmg/browser/TOOLS/MOSAIX" 417 417 f_calving.attrs['title'] = calving 418 f_calving.attrs['Program'] = "Generated by " + sys.argv[0] + " with flags " + str(sys.argv[1:]) 418 f_calving.attrs['Program'] = "Generated by " + sys.argv[0] + " with flags " + ' '.join (sys.argv[1:]) 419 419 420 f_calving.attrs['repartitionType'] = myargs.type 420 421 if myargs.type in [ 'iceberg', 'iceshelf' ] : … … 425 426 f_calving.attrs['masksFile'] = masks 426 427 f_calving.attrs['timeStamp'] = time.asctime() 427 f_calving.attrs['HOSTNAME'] = platform.node() 428 f_calving.attrs['LOGNAME'] = os.getlogin() 429 f_calving.attrs['Python'] = "Python version " + platform.python_version() 430 f_calving.attrs['OS'] = platform.system() 431 f_calving.attrs['release'] = platform.release() 432 f_calving.attrs['hardware'] = platform.machine() 428 try : f_calving.attrs['directory'] = os.getcwd () 429 except : pass 430 try : f_runoff.attrs['HOSTNAME'] = platform.node () 431 except : pass 432 try : f_runoff.attrs['LOGNAME'] = os.getlogin () 433 except : pass 434 try : f_runoff.attrs['Python'] = "Python version " + platform.python_version () 435 except : pass 436 try : f_runoff.attrs['OS'] = platform.system () 437 except : pass 438 try : f_runoff.attrs['release'] = platform.release () 439 except : pass 440 try : f_runoff.attrs['hardware'] = platform.machine () 441 except : pass 433 442 f_calving.attrs['conventions'] = "SCRIP" 434 443 if src_name == 'lmd' : f_calving.attrs['source_grid'] = "curvilinear" -
TOOLS/MOSAIX/CreateWeightsMask.bash
r6066 r6090 68 68 echo ${Titre}"Defines model"${Norm} 69 69 # ================================= 70 #CplModel=ORCA2.3xLMD969570 CplModel=ORCA2.3xLMD9695 71 71 #CplModel=ORCA2.3xICO30 72 CplModel=ORCA2.3xICO4072 #CplModel=ORCA2.3xICO40 73 73 #CplModel=eORCA1.2xLMD144142 74 74 #CplModel=eORCA1.2xLMD256256 … … 340 340 cp iodef_oce_to_atm.xml iodef.xml 341 341 342 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/file_definition/file[@id="file_src"]/field[@id="mask_src"]' -k name -v maskutil_T343 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/file_definition/file[@id="file_src"]/field[@id="area_src"]' -k name -v area_grid_T344 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/domain_definition/domain[@id="domain_src"]' -k type -v ${srcDomainType}345 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/domain_definition/domain[@id="domain_dst"]' -k type -v ${dstDomainType}346 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain' -k order -v 1347 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain' -k quantity -v false348 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain' -k renormalize -v false349 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain' -k use_area -v false350 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="file_src"]/field[@id="mask_source"]' -k name -v maskutil_T351 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="file_src"]/field[@id="area_source"]' -k name -v area_grid_T352 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]' -k name -v dia_${OutFileName}353 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="title"]' -t "${SRC} mask interpolated to ${DST}"354 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="source_grid"]' -t ${srcDomainType}355 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="dest_grid"]' -t ${dstDomainType}356 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="order"]' -t 1357 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_src"]' -k type -v ${srcDomainType}358 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]' -k type -v ${dstDomainType}359 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain' -k weight_filename -v rmp_${OutFileName}.nc342 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/file_definition/file[@id="file_src"]/field[@id="mask_src"]' -k name -v maskutil_T 343 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/file_definition/file[@id="file_src"]/field[@id="area_src"]' -k name -v area_grid_T 344 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/domain_definition/domain[@id="domain_src"]' -k type -v ${srcDomainType} 345 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/domain_definition/domain[@id="domain_dst"]' -k type -v ${dstDomainType} 346 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain' -k order -v 1 347 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain' -k quantity -v false 348 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain' -k renormalize -v false 349 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain' -k use_area -v false 350 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="file_src"]/field[@id="mask_source"]' -k name -v maskutil_T 351 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="file_src"]/field[@id="area_source"]' -k name -v area_grid_T 352 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]' -k name -v dia_${OutFileName} 353 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="title"]' -t "${SRC} mask interpolated to ${DST}" 354 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="source_grid"]' -t ${srcDomainType} 355 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="dest_grid"]' -t ${dstDomainType} 356 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="order"]' -t 1 357 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_src"]' -k type -v ${srcDomainType} 358 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]' -k type -v ${dstDomainType} 359 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain' -k weight_filename -v rmp_${OutFileName}.nc 360 360 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain' -k order -v 1 361 361 python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="normalization"]' -t false … … 832 832 --grids=grids_${CplModel}.nc --areas=areas_${CplModel}.nc --masks=masks_${CplModel}.nc \ 833 833 --o2a=${ATM}_grid_maskFrom_${OCE}.nc 834 ${PyRun} python3 -u CalvingWeights.py --output=rmp_t${atm}_to_t${oce}_calving_iceshelf.nc --fmt=${FMT_XIOS }\834 ${PyRun} python3 -u CalvingWeights.py --output=rmp_t${atm}_to_t${oce}_calving_iceshelf.nc --fmt=${FMT_XIOS} \ 835 835 --oce=${OCE} --atm=${ATM} --type=iceshelf --repartition_file=runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc --repartition_var=sornfisf \ 836 836 --grids=grids_${CplModel}.nc --areas=areas_${CplModel}.nc --masks=masks_${CplModel}.nc \ -
TOOLS/MOSAIX/RunoffWeights.py
r6066 r6090 369 369 370 370 f_runoff = xr.Dataset ( { 371 'remap_matrix' : remap_matrix, 371 372 'src_address' : src_address, 372 373 'dst_address' : dst_address, … … 409 410 f_runoff.attrs['Atmosphere'] = atm_Name + " http://lmdz.lmd.jussieu.fr" 410 411 f_runoff.attrs['associatedFiles'] = grids + " " + areas + " " + masks 411 f_runoff.attrs['directory'] = os.getcwd ()412 412 f_runoff.attrs['description'] = "Generated with RunoffWeights.py" 413 413 f_runoff.attrs['title'] = runoff 414 args = '' 415 for i in np.arange(1,len(sys.argv[1:])) : args += sys.argv[i] + ' ' 416 f_runoff.attrs['Program'] = "Generated by " + sys.argv[0] + " with flags " + args 414 f_runoff.attrs['Program'] = "Generated by " + sys.argv[0] + " with flags " + ' '.join (sys.argv[1:]) 417 415 f_runoff.attrs['atmCoastWidth'] = "{:d} grid points".format(atmCoastWidth) 418 416 f_runoff.attrs['oceCoastWidth'] = "{:d} grid points".format(oceCoastWidth) … … 424 422 f_runoff.attrs['masksFile'] = masks 425 423 f_runoff.attrs['o2aFile'] = o2a 426 f_runoff.attrs['timeStamp'] = time.asctime() 427 f_runoff.attrs['HOSTNAME'] = platform.node() 428 f_runoff.attrs['LOGNAME'] = os.getlogin() 429 f_runoff.attrs['Python'] = "Python version " + platform.python_version() 430 f_runoff.attrs['OS'] = platform.system() 431 f_runoff.attrs['release'] = platform.release() 432 f_runoff.attrs['hardware'] = platform.machine() 424 f_runoff.attrs['timeStamp'] = time.asctime () 425 try : f_calving.attrs['directory'] = os.getcwd () 426 except : pass 427 try : f_runoff.attrs['HOSTNAME'] = platform.node () 428 except : pass 429 try : f_runoff.attrs['LOGNAME'] = os.getlogin () 430 except : pass 431 try : f_runoff.attrs['Python'] = "Python version " + platform.python_version () 432 except : pass 433 try : f_runoff.attrs['OS'] = platform.system () 434 except : pass 435 try : f_runoff.attrs['release'] = platform.release () 436 except : pass 437 try : f_runoff.attrs['hardware'] = platform.machine () 438 except : pass 433 439 f_runoff.attrs['conventions'] = "SCRIP" 434 440 f_runoff.attrs['source_grid'] = "curvilinear"
Note: See TracChangeset
for help on using the changeset viewer.