Changeset 4195
- Timestamp:
- 12/14/18 10:55:21 (5 years ago)
- Location:
- TOOLS/MOSAIX
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/MOSAIX/CreateWeightsMask.bash
r4186 r4195 37 37 # $HeadURL$ 38 38 # 39 # CplModel=eORCA1.2xLMD144142 ; qsub -r ${CplModel} -o Out_${CplModel} -e Out_${CplModel} CreateWeightsMask.bash 40 # 41 39 42 set +vx 40 43 export Bold=$(tput bold) … … 55 58 echo ${Titre}"Defines models"${Norm} 56 59 # ============== 57 #OCE=ORCA2.358 OCE=eORCA1.260 OCE=ORCA2.3 61 #OCE=eORCA1.2 59 62 #OCE=eORCA025 60 63 61 #ATM=ICO3062 ATM=ICO4064 ATM=ICO30 65 #ATM=ICO40 63 66 #ATM=ICO450 64 67 #ATM=LMD9695 … … 66 69 #ATM=LMD256256 67 70 71 CplModel=${OCE}x${ATM} 72 if [[ 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} 74 fi 75 68 76 echo ${Titre}"ATM model : ${ATM}"${Norm} 69 77 echo ${Titre}"OCE model : ${OCE}"${Norm} 78 echo ${Titre}"Cpl model : ${CplModel}"${Norm} 70 79 71 80 # Runoff parameter. atmCoastWidth and oceCoastWidth in grid points, searchRadius in km … … 216 225 PROGRAM=${BRIDGE_MSUB_REQNAME} 217 226 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 219 228 source ${SUBMIT_DIR}/arch.env 220 229 module load nco … … 236 245 set -x ; set -e 237 246 238 mkdir -p ${TMPDIR}/${ OCE}x${ATM} || exit 1239 cd ${TMPDIR}/${ OCE}x${ATM} || exit 1247 mkdir -p ${TMPDIR}/${CplModel} || exit 1 248 cd ${TMPDIR}/${CplModel} || exit 1 240 249 rm -fr * 241 250 … … 265 274 FMT_XIOS=netcdf4 266 275 267 cp ${SUBMIT_DIR}/bin/interpol.exe .268 cp ${SUBMIT_DIR}/*.py .276 cp ${SUBMIT_DIR}/bin/interpol.exe . 277 cp ${SUBMIT_DIR}/*.py . 269 278 cp ${SUBMIT_DIR}/iodef_atm_to_oce.xml . 270 279 cp ${SUBMIT_DIR}/iodef_oce_to_atm.xml . … … 558 567 --attribute production,global,o,c,"$(finger ${LOGNAME} | head -1 | awk '{print $4, $5}') " \ 559 568 --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" \ 561 570 --attribute directory,global,o,c,"$(pwd)" \ 562 571 --attribute description,global,o,c,"Fields needed by OASIS-MCT" \ … … 780 789 #if [[ "X${okRunoff}" = "Xyes" && "${atm}" = "lmd" ]] ; then 781 790 if [[ "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} \ 783 792 --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 \ 785 794 --o2a=${ATM}_grid_maskFrom_${OCE}.nc --output=rmp_t${atm}_to_t${oce}_runoff_${runOff_atmQuantity}_to_${runOff_oceQuantity}_${FMT_OASIS}.nc \ 786 795 --fmt=${FMT_OASIS} \ … … 838 847 839 848 if [[ "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} 843 852 fi 844 853 … … 853 862 rmp_* are weights files 854 863 dia_* 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-MCT864 grids_${CplModel}.nc areas_${CplModel}.nc masks_${CplModel}.nc are auxiliary file needed by OASIS-MCT 856 865 All files have the same uuid in the global attributes 857 866 … … 865 874 production : $(finger ${LOGNAME} | head -1 | awk '{print $4, $5}') 866 875 originalFiles : ${OCE}_coordinates_mask.nc ${ATM}_grid_mask.nc 867 associatedFiles : grids_${ OCE}x${ATM}.nc areas_${OCE}x${ATM}.nc masks_${OCE}x${ATM}.nc876 associatedFiles : grids_${CplModel}.nc areas_${CplModel}.nc masks_${CplModel}.nc 868 877 directory : $(pwd) 869 878 timeStamp : $(date) … … 903 912 EOF 904 913 905 cp README.txt ${SUBMIT_DIR}/README_${ OCE}x${ATM}_MOSAIX.txt914 cp README.txt ${SUBMIT_DIR}/README_${CplModel}_MOSAIX.txt 906 915 907 916 ## =========================================================================== -
TOOLS/MOSAIX/RunoffWeights.py
r4188 r4195 3 3 ### 4 4 ### Compute runoff weights. 5 ### For LMDZ only. Not suitable for DYNAMICO6 5 ### 7 6 ### =========================================================================== … … 98 97 if atm_Name.find('LMD') >= 0 : atm_n = 'lmd' ; atmDomainType = 'rectilinear' 99 98 if atm_Name.find('ICO') >= 0 : atm_n = 'ico' ; atmDomainType = 'unstructured' 99 if oce_Name.find('ORC') >= 0 : oce_n = 'orc' ; oceDomainType = 'curvilinear' 100 100 101 101 print ('atmQuantity : ' + str (myargs.atmQuantity) ) … … 152 152 oce_grid_imask = oce_grid_imask2D.ravel() 153 153 ## 154 print ("De termination d'une bande cotiere ocean")154 print ("Defines a coastal bands (on ocean) in the ocean") 155 155 156 156 oceLand2D = np.reshape ( np.where (oce_grid_pmask[:] < 0.5, True, False), (oce_jpj, oce_jpi) ) … … 179 179 oceCoast_address = oce_address [oceCoast] 180 180 181 print ("De termination d'une bande cotiere atmosphere" )181 print ("Defines a coastal bands (on land) in the atmosphere" ) 182 182 atmLand = np.where (o2aFrac[:] < epsfrac , True, False) 183 183 atmLandFrac = np.where (o2aFrac[:] < zone-epsfrac , True, False) -
TOOLS/MOSAIX/update_xml.py
r4153 r4195 39 39 -v <value> | --value=<value> : new value for xml field 40 40 -t <text> | --text=<text> : will replace the 'text' part of the Xpath by <text> 41 example :41 examples : 42 42 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} 43 44 """ 44 45 #print ( texte % ( sys.argv[0], sys.argv[0], sys.argv[0], sys.argv[0] ) )
Note: See TracChangeset
for help on using the changeset viewer.