Changeset 6090 for TOOLS


Ignore:
Timestamp:
03/04/22 14:23:14 (2 years ago)
Author:
omamce
Message:

O.M: small corrections in MOSAIX

Location:
TOOLS/MOSAIX
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/MOSAIX/CalvingWeights.py

    r6066 r6090  
    413413if myargs.type in ['iceberg', 'iceshelf' ]: f_calving.attrs['originalFiles'] = myargs.repartition_file 
    414414f_calving.attrs['associatedFiles'] = grids + " " + areas + " " + masks 
    415 f_calving.attrs['directory']       = os.getcwd () 
     415 
    416416f_calving.attrs['description']     = "Generated with XIOS http://forge.ipsl.jussieu.fr/ioserver and MOSAIX https://forge.ipsl.jussieu.fr/igcmg/browser/TOOLS/MOSAIX" 
    417417f_calving.attrs['title']           = calving 
    418 f_calving.attrs['Program']         = "Generated by " + sys.argv[0] + " with flags " + str(sys.argv[1:]) 
     418f_calving.attrs['Program']         = "Generated by " + sys.argv[0] + " with flags " + ' '.join (sys.argv[1:])  
     419 
    419420f_calving.attrs['repartitionType'] = myargs.type 
    420421if myargs.type in [ 'iceberg', 'iceshelf' ] : 
     
    425426f_calving.attrs['masksFile']       = masks 
    426427f_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() 
     428try    : f_calving.attrs['directory'] = os.getcwd () 
     429except : pass 
     430try    : f_runoff.attrs['HOSTNAME'] = platform.node () 
     431except : pass 
     432try    : f_runoff.attrs['LOGNAME']  = os.getlogin () 
     433except : pass 
     434try    : f_runoff.attrs['Python']   = "Python version " +  platform.python_version () 
     435except : pass 
     436try    : f_runoff.attrs['OS']       = platform.system () 
     437except : pass 
     438try    : f_runoff.attrs['release']  = platform.release () 
     439except : pass 
     440try    : f_runoff.attrs['hardware'] = platform.machine () 
     441except : pass 
    433442f_calving.attrs['conventions']     = "SCRIP" 
    434443if src_name == 'lmd' : f_calving.attrs['source_grid'] = "curvilinear" 
  • TOOLS/MOSAIX/CreateWeightsMask.bash

    r6066 r6090  
    6868echo ${Titre}"Defines model"${Norm} 
    6969# ================================= 
    70 #CplModel=ORCA2.3xLMD9695 
     70CplModel=ORCA2.3xLMD9695 
    7171#CplModel=ORCA2.3xICO30 
    72 CplModel=ORCA2.3xICO40 
     72#CplModel=ORCA2.3xICO40 
    7373#CplModel=eORCA1.2xLMD144142 
    7474#CplModel=eORCA1.2xLMD256256 
     
    340340cp iodef_oce_to_atm.xml   iodef.xml 
    341341 
    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_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 
     342python3 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 
     343python3 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 
     344python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/domain_definition/domain[@id="domain_src"]'                     -k type  -v ${srcDomainType} 
     345python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_read"]/domain_definition/domain[@id="domain_dst"]'                     -k type  -v ${dstDomainType} 
     346python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain'   -k order -v 1 
     347python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain'   -k quantity    -v false 
     348python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain'   -k renormalize -v false 
     349python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain'   -k use_area -v false 
     350python3 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 
     351python3 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 
     352python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]'                                 -k name  -v dia_${OutFileName} 
     353python3 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}" 
     354python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="source_grid"]'   -t ${srcDomainType} 
     355python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="dest_grid"]'     -t ${dstDomainType} 
     356python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="order"]'         -t 1 
     357python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_src"]'                      -k type  -v ${srcDomainType} 
     358python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]'                      -k type  -v ${dstDomainType} 
     359python3 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 
    360360python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/domain_definition/domain[@id="domain_dst"]/interpolate_domain'   -k order -v 1 
    361361python3 update_xml.py -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="normalization"]' -t false 
     
    832832                 --grids=grids_${CplModel}.nc --areas=areas_${CplModel}.nc --masks=masks_${CplModel}.nc \ 
    833833                 --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} \ 
    835835                 --oce=${OCE} --atm=${ATM} --type=iceshelf --repartition_file=runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc --repartition_var=sornfisf \ 
    836836                 --grids=grids_${CplModel}.nc --areas=areas_${CplModel}.nc --masks=masks_${CplModel}.nc \ 
  • TOOLS/MOSAIX/RunoffWeights.py

    r6066 r6090  
    369369 
    370370f_runoff = xr.Dataset ( { 
     371    'remap_matrix'            : remap_matrix, 
    371372        'src_address'         : src_address, 
    372373        'dst_address'         : dst_address, 
     
    409410f_runoff.attrs['Atmosphere']      = atm_Name + " http://lmdz.lmd.jussieu.fr" 
    410411f_runoff.attrs['associatedFiles'] = grids + " " + areas + " " + masks 
    411 f_runoff.attrs['directory']       = os.getcwd () 
    412412f_runoff.attrs['description']     = "Generated with RunoffWeights.py" 
    413413f_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 
     414f_runoff.attrs['Program']         = "Generated by " + sys.argv[0] + " with flags " + ' '.join (sys.argv[1:])  
    417415f_runoff.attrs['atmCoastWidth']   = "{:d} grid points".format(atmCoastWidth) 
    418416f_runoff.attrs['oceCoastWidth']   = "{:d} grid points".format(oceCoastWidth) 
     
    424422f_runoff.attrs['masksFile']       = masks 
    425423f_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() 
     424f_runoff.attrs['timeStamp']       = time.asctime () 
     425try    : f_calving.attrs['directory'] = os.getcwd () 
     426except : pass 
     427try    : f_runoff.attrs['HOSTNAME'] = platform.node () 
     428except : pass 
     429try    : f_runoff.attrs['LOGNAME']  = os.getlogin () 
     430except : pass 
     431try    : f_runoff.attrs['Python']   = "Python version " +  platform.python_version () 
     432except : pass 
     433try    : f_runoff.attrs['OS']       = platform.system () 
     434except : pass 
     435try    : f_runoff.attrs['release']  = platform.release () 
     436except : pass 
     437try    : f_runoff.attrs['hardware'] = platform.machine () 
     438except : pass 
    433439f_runoff.attrs['conventions']     = "SCRIP" 
    434440f_runoff.attrs['source_grid']     = "curvilinear" 
Note: See TracChangeset for help on using the changeset viewer.