Changeset 4195


Ignore:
Timestamp:
12/14/18 10:55:21 (22 months ago)
Author:
omamce
Message:

O.M. : mostly improvment of documentation

Location:
TOOLS/MOSAIX
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/MOSAIX/CreateWeightsMask.bash

    r4186 r4195  
    3737#  $HeadURL$ 
    3838# 
     39# CplModel=eORCA1.2xLMD144142 ; qsub -r ${CplModel} -o Out_${CplModel} -e Out_${CplModel} CreateWeightsMask.bash 
     40# 
     41 
    3942set +vx 
    4043export Bold=$(tput bold)   
     
    5558echo ${Titre}"Defines models"${Norm} 
    5659# ============== 
    57 #OCE=ORCA2.3 
    58 OCE=eORCA1.2 
     60OCE=ORCA2.3 
     61#OCE=eORCA1.2 
    5962#OCE=eORCA025 
    6063 
    61 #ATM=ICO30 
    62 ATM=ICO40 
     64ATM=ICO30 
     65#ATM=ICO40 
    6366#ATM=ICO450 
    6467#ATM=LMD9695 
     
    6669#ATM=LMD256256 
    6770 
     71CplModel=${OCE}x${ATM} 
     72if [[ X${SLURM_JOB_NAME} = X*ORC* ||  X${SLURM_JOB_NAME} = X*LMD*  ||  X${SLURM_JOB_NAME} = X*ICO* ]] ; then 
     73    CplModel=${SLURM_JOB_NAME} ; OCE=${CplModel//x*} ; ATM=${CplModel##*x} 
     74fi 
     75 
    6876echo ${Titre}"ATM model : ${ATM}"${Norm} 
    6977echo ${Titre}"OCE model : ${OCE}"${Norm} 
     78echo ${Titre}"Cpl model : ${CplModel}"${Norm} 
    7079 
    7180# Runoff parameter. atmCoastWidth and oceCoastWidth in grid points, searchRadius in km 
     
    216225    PROGRAM=${BRIDGE_MSUB_REQNAME} 
    217226    MpiRun="time ccc_mprun" 
    218     PyRun="time ccc_mprun -n 1" 
     227    PyRun="time ccc_mprun -n 1" # Needed to force python to run on one process only 
    219228    source ${SUBMIT_DIR}/arch.env 
    220229    module load nco 
     
    236245set -x ; set -e 
    237246 
    238 mkdir -p ${TMPDIR}/${OCE}x${ATM} || exit 1 
    239 cd       ${TMPDIR}/${OCE}x${ATM} || exit 1 
     247mkdir -p ${TMPDIR}/${CplModel} || exit 1 
     248cd       ${TMPDIR}/${CplModel} || exit 1 
    240249rm -fr * 
    241250 
     
    265274FMT_XIOS=netcdf4 
    266275 
    267 cp ${SUBMIT_DIR}/bin/interpol.exe    . 
    268 cp ${SUBMIT_DIR}/*.py                . 
     276cp ${SUBMIT_DIR}/bin/interpol.exe       . 
     277cp ${SUBMIT_DIR}/*.py                   . 
    269278cp ${SUBMIT_DIR}/iodef_atm_to_oce.xml   . 
    270279cp ${SUBMIT_DIR}/iodef_oce_to_atm.xml   . 
     
    558567            --attribute production,global,o,c,"$(finger ${LOGNAME} | head -1 | awk '{print $4, $5}') " \ 
    559568            --attribute originalFiles,global,o,c,"${OCE}_coordinates_mask.nc ${ATM}_grid_mask.nc"      \ 
    560             --attribute associatedFiles,global,o,c,"grids_${OCE}x${ATM}.nc areas_${OCE}x${ATM}.nc masks_${OCE}x${ATM}.nc" \ 
     569            --attribute associatedFiles,global,o,c,"grids_${CplModel}.nc areas_${CplModel}.nc masks_${CplModel}.nc" \ 
    561570            --attribute directory,global,o,c,"$(pwd)"                             \ 
    562571            --attribute description,global,o,c,"Fields needed by OASIS-MCT"       \ 
     
    780789#if [[ "X${okRunoff}" = "Xyes" && "${atm}" = "lmd" ]] ; then 
    781790if [[ "X${okRunoff}" = "Xyes" ]] ; then 
    782     ${PyRun} python3 -u cotes_etal.py --oce=${OCE} --atm=${ATM} \ 
     791    ${PyRun} python3 -u RunoffWeights.py --oce=${OCE} --atm=${ATM} \ 
    783792              --atmCoastWidth=${atmCoastWidth} --oceCoastWidth=${oceCoastWidth} --searchRadius=${searchRadius} \ 
    784               --grids=grids_${OCE}x${ATM}.nc --areas=areas_${OCE}x${ATM}.nc --masks=masks_${OCE}x${ATM}.nc \ 
     793              --grids=grids_${CplModel}.nc --areas=areas_${CplModel}.nc --masks=masks_${CplModel}.nc \ 
    785794              --o2a=${ATM}_grid_maskFrom_${OCE}.nc --output=rmp_t${atm}_to_t${oce}_runoff_${runOff_atmQuantity}_to_${runOff_oceQuantity}_${FMT_OASIS}.nc \ 
    786795              --fmt=${FMT_OASIS} \ 
     
    838847 
    839848if [[ "X${okGrids}" = "Xyes" ]] ; then 
    840     cp areas_${OCE}x${ATM}.nc ${SUBMIT_DIR} 
    841     cp grids_${OCE}x${ATM}.nc ${SUBMIT_DIR} 
    842     cp masks_${OCE}x${ATM}.nc ${SUBMIT_DIR} 
     849    cp areas_${CplModel}.nc ${SUBMIT_DIR} 
     850    cp grids_${CplModel}.nc ${SUBMIT_DIR} 
     851    cp masks_${CplModel}.nc ${SUBMIT_DIR} 
    843852fi 
    844853 
     
    853862rmp_* are weights files 
    854863dia_* are diagnostic files not needed for the coupler 
    855 grids_${OCE}x${ATM}.nc areas_${OCE}x${ATM}.nc masks_${OCE}x${ATM}.nc are auxiliary file needed by OASIS-MCT 
     864grids_${CplModel}.nc areas_${CplModel}.nc masks_${CplModel}.nc are auxiliary file needed by OASIS-MCT 
    856865All files have the same uuid in the global attributes 
    857866 
     
    865874production      : $(finger ${LOGNAME} | head -1 | awk '{print $4, $5}')  
    866875originalFiles   : ${OCE}_coordinates_mask.nc ${ATM}_grid_mask.nc 
    867 associatedFiles : grids_${OCE}x${ATM}.nc areas_${OCE}x${ATM}.nc masks_${OCE}x${ATM}.nc 
     876associatedFiles : grids_${CplModel}.nc areas_${CplModel}.nc masks_${CplModel}.nc 
    868877directory       : $(pwd) 
    869878timeStamp       : $(date) 
     
    903912EOF 
    904913 
    905 cp README.txt ${SUBMIT_DIR}/README_${OCE}x${ATM}_MOSAIX.txt 
     914cp README.txt ${SUBMIT_DIR}/README_${CplModel}_MOSAIX.txt 
    906915 
    907916## =========================================================================== 
  • TOOLS/MOSAIX/RunoffWeights.py

    r4188 r4195  
    33### 
    44### Compute runoff weights. 
    5 ### For LMDZ only. Not suitable for DYNAMICO 
    65### 
    76### =========================================================================== 
     
    9897if atm_Name.find('LMD') >= 0 : atm_n = 'lmd' ; atmDomainType = 'rectilinear' 
    9998if atm_Name.find('ICO') >= 0 : atm_n = 'ico' ; atmDomainType = 'unstructured' 
     99if oce_Name.find('ORC') >= 0 : oce_n = 'orc' ; oceDomainType = 'curvilinear' 
    100100 
    101101print ('atmQuantity : ' + str (myargs.atmQuantity) ) 
     
    152152oce_grid_imask = oce_grid_imask2D.ravel() 
    153153##  
    154 print ("Determination d'une bande cotiere ocean") 
     154print ("Defines a coastal bands (on ocean) in the ocean") 
    155155 
    156156oceLand2D  = np.reshape ( np.where (oce_grid_pmask[:] < 0.5, True, False), (oce_jpj, oce_jpi) ) 
     
    179179oceCoast_address         = oce_address        [oceCoast] 
    180180 
    181 print ("Determination d'une bande cotiere atmosphere " ) 
     181print ("Defines a coastal bands (on land) in the atmosphere" ) 
    182182atmLand      = np.where (o2aFrac[:] < epsfrac       , True, False) 
    183183atmLandFrac  = np.where (o2aFrac[:] < zone-epsfrac  , True, False) 
  • TOOLS/MOSAIX/update_xml.py

    r4153 r4195  
    3939 -v <value> | --value=<value> : new value for xml field 
    4040 -t <text>  | --text=<text>   : will replace the 'text' part of the Xpath by <text> 
    41 example 
     41examples 
    4242    python %(prog)s -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="file_src"]/field[@id="mask_source"]' -k name -v maskutil_T 
     43    python %(prog)s -i iodef.xml -n 'context[@id="interpol_run"]/file_definition/file[@id="dia"]/variable[@name="dest_grid"]'   -t ${dstDomainType} 
    4344    """ 
    4445    #print ( texte % ( sys.argv[0], sys.argv[0], sys.argv[0], sys.argv[0] ) ) 
Note: See TracChangeset for help on using the changeset viewer.