Changeset 6360 for TOOLS


Ignore:
Timestamp:
04/05/23 16:37:45 (13 months ago)
Author:
omamce
Message:

Mosaix - O.M. :

  • Correct eORCA1.4.2 case (calving with localisation file)
  • Correct some nccatted commands
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/MOSAIX/CreateWeightsMask.bash

    r6190 r6360  
    66#MSUB -T 7200              # Time limit (seconds) 
    77#MSUB -Q normal 
    8 #MSUB -q skylake 
     8#MSUB -q rome 
    99#MSUB -p devcmip6 
    1010#MSUB -m work,store,scratch 
     
    8282echo ${Titre}"Defines model"${Norm} 
    8383# ================================= 
    84 CplModel=ORCA2.3xLMD9695 
     84#CplModel=ORCA2.3xLMD9695 
    8585#CplModel=ORCA2.3xICO30 
    8686#CplModel=ORCA2.3xICO40 
     
    9393#CplModel=eORCA1.2xICO450 
    9494#CplModel=eORCA025.1xLMD256256 
     95CplModel=eORCA1.4.2xICO80 
    9596 
    9697#Version="v0" ; Comment="Fully tested in IPSLCM6 eORCA1.2 x LMD 144x142" 
    9798#Version="v1" ; Comment="Fully tested in IPSLCM6 eORCA1.2 x LMD 144x142" 
    9899#Version="NoSearchRadius" ; Comment="For testing new routing" 
    99 Version="v2" ; Comment="Correction of ORCA masks to have a perfect conservation of run-off" 
     100Version="v3" ; Comment="Correction of ORCA masks to have a perfect conservation of run-off" 
    100101 
    101102# If available, get model name from job name 
     
    291292    module purge 
    292293    source ${SUBMIT_DIR}/arch.env 
    293     module load nco/4.9.1 
    294     module load cdo/1.9.5 
     294    module load nco #/4.9.1 
     295    module load cdo #/1.9.5 
    295296    module load python3  
    296297    module load datadir/igcmg 
     
    441442## =========================================================================== 
    442443cp dia_t${oce}_to_t${atm}_${FullName}.nc  dia_t${oce}_to_t${atm}_${FullName}_mask.nc 
    443 ncks --alphabetize --history --overwrite --variable OceFrac dia_t${oce}_to_t${atm}_${FullName}_mask.nc ${ATM}_grid_maskFrom_${OCE}.nc 
    444 ncatted  --history --attribute name,global,m,c,"${ATM}_grid_maskFrom_${OCE}.nc" ${ATM}_grid_maskFrom_${OCE}.nc 
     444ncks --no_abc --history --overwrite --variable OceFrac dia_t${oce}_to_t${atm}_${FullName}_mask.nc ${ATM}_grid_maskFrom_${OCE}.nc 
     445ncatted --history --attribute ,global,d,c, ${ATM}_grid_maskFrom_${OCE}.nc 
    445446 
    446447cat <<EOF > creation_masque.nco 
     
    484485fi 
    485486 
    486 ncks --history --alphabetize --append --variable aire atm_grid.nc ${ATM}_grid_maskFrom_${OCE}.nc 
     487ncks --history --no_abc --append --variable aire atm_grid.nc ${ATM}_grid_maskFrom_${OCE}.nc 
    487488ncatted  --history --attribute units,aire,m,c,"m^2" ${ATM}_grid_maskFrom_${OCE}.nc 
    488489 
    489 [[ ${atm} = *ico* ]] && ncks --alphabetize --history --append --variable bounds_lon,bounds_lat atm_grid.nc ${ATM}_grid_maskFrom_${OCE}.nc 
     490[[ ${atm} = *ico* ]] && ncks --no_abc --history --append --variable bounds_lon,bounds_lat atm_grid.nc ${ATM}_grid_maskFrom_${OCE}.nc 
    490491 
    491492## 
     
    627628# Duplicate with no global attribute to avoid erasing attributes in other files 
    628629cp ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_noglobal.nc 
    629 ncatted --history --attribute,global,d,c, ${ATM}_grid_maskFrom_${OCE}_noglobal.nc 
     630ncatted --history --attribute ,global,d,c, ${ATM}_grid_maskFrom_${OCE}_noglobal.nc 
    630631 
    631632## 
     
    747748        if [[ ${o_to_a} = true ]] ; then 
    748749            ncap2 --history --append --script-file add_varatm_$(basename ${rmpFile} .nc)_o_to_a.nco ${ATM}_grid_maskFrom_${OCE}_noglobal.nc ${rmpFile} 
    749             ncks --alphabetize --history --overwrite --variable src_address,dst_address,remap_matrix,src_grid_dims,src_grid_center_lat,src_grid_center_lon,src_grid_corner_lon,src_grid_corner_lat,src_grid_area,src_grid_imask,dst_grid_dims,dst_grid_center_lat,dst_grid_center_lon,dst_grid_corner_lon,dst_grid_corner_lat,dst_grid_area,dst_grid_imask ${rmpFile} rmp_tmp.nc 
     750            ncks --no_abc --history --overwrite --variable src_address,dst_address,remap_matrix,src_grid_dims,src_grid_center_lat,src_grid_center_lon,src_grid_corner_lon,src_grid_corner_lat,src_grid_area,src_grid_imask,dst_grid_dims,dst_grid_center_lat,dst_grid_center_lon,dst_grid_corner_lon,dst_grid_corner_lat,dst_grid_area,dst_grid_imask ${rmpFile} rmp_tmp.nc 
    750751            mv rmp_tmp.nc ${rmpFile} 
    751752        fi 
     
    755756        if [[ ${a_to_o} = true ]] ; then 
    756757            ncap2 --history --append --script-file add_varatm_$(basename ${rmpFile} .nc)_a_to_o.nco ${ATM}_grid_maskFrom_${OCE}_noglobal.nc ${rmpFile} 
    757             ncks --alphabetize --history --overwrite --variable src_address,dst_address,remap_matrix,src_grid_dims,src_grid_center_lat,src_grid_center_lon,src_grid_corner_lon,src_grid_corner_lat,src_grid_area,src_grid_imask,dst_grid_dims,dst_grid_center_lat,dst_grid_center_lon,dst_grid_corner_lon,dst_grid_corner_lat,dst_grid_area,dst_grid_imask ${rmpFile} rmp_tmp.nc 
     758            ncks --no_abc --history --overwrite --variable src_address,dst_address,remap_matrix,src_grid_dims,src_grid_center_lat,src_grid_center_lon,src_grid_corner_lon,src_grid_corner_lat,src_grid_area,src_grid_imask,dst_grid_dims,dst_grid_center_lat,dst_grid_center_lon,dst_grid_corner_lon,dst_grid_corner_lat,dst_grid_area,dst_grid_imask ${rmpFile} rmp_tmp.nc 
    758759            mv rmp_tmp.nc ${rmpFile} 
    759760        fi 
     
    791792        if [[ ${o_to_a} = true ]] ; then 
    792793            ncap2 --history --append --script-file add_varatm_$(basename ${rmpFile} .nc)_o_to_a.nco ${ATM}_grid_maskFrom_${OCE}_noglobal.nc ${rmpFile} 
    793             ncks --alphabetize --history --overwrite --variable src_address,dst_address,remap_matrix,src_grid_dims,src_grid_center_lat,src_grid_center_lon,src_grid_corner_lon,src_grid_corner_lat,src_grid_area,src_grid_imask,dst_grid_dims,dst_grid_center_lat,dst_grid_center_lon,dst_grid_area,dst_grid_imask ${rmpFile} rmp_tmp.nc 
     794            ncks --no_abc --history --overwrite --variable src_address,dst_address,remap_matrix,src_grid_dims,src_grid_center_lat,src_grid_center_lon,src_grid_corner_lon,src_grid_corner_lat,src_grid_area,src_grid_imask,dst_grid_dims,dst_grid_center_lat,dst_grid_center_lon,dst_grid_area,dst_grid_imask ${rmpFile} rmp_tmp.nc 
    794795            mv rmp_tmp.nc ${rmpFile} 
    795796        fi 
     
    799800        if [[ ${a_to_o} = true ]] ; then 
    800801            ncap2 --history --append --script-file add_varatm_$(basename ${rmpFile} .nc)_a_to_o.nco ${ATM}_grid_maskFrom_${OCE}_noglobal.nc ${rmpFile} 
    801             ncks --alphabetize --history --overwrite --variable src_address,dst_address,remap_matrix,src_grid_dims,src_grid_center_lat,src_grid_center_lon,src_grid_area,src_grid_imask,dst_grid_dims,dst_grid_center_lat,dst_grid_center_lon,dst_grid_corner_lon,dst_grid_corner_lat,dst_grid_area,dst_grid_imask ${rmpFile} rmp_tmp.nc 
     802            ncks --no_abc --history --overwrite --variable src_address,dst_address,remap_matrix,src_grid_dims,src_grid_center_lat,src_grid_center_lon,src_grid_area,src_grid_imask,dst_grid_dims,dst_grid_center_lat,dst_grid_center_lon,dst_grid_corner_lon,dst_grid_corner_lat,dst_grid_area,dst_grid_imask ${rmpFile} rmp_tmp.nc 
    802803            mv rmp_tmp.nc ${rmpFile} 
    803804        fi 
     
    845846        ;; 
    846847         
    847         ( eORCA1.2 | eORCA1.4 ) 
    848         cp ${R_IN}/OCE/NEMO/${OCE}/OPA/runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc . 
     848        ( eORCA1.2 | eORCA1.4 | eORCA1.4.2 ) 
     849 
     850        case ${OCE} in 
     851            ( eORCA1.2 | eORCA1.4 )  
     852            cp ${R_IN}/OCE/NEMO/${OCE}/OPA/runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc . ;; 
     853            ( eORCA1.4.2 )  
     854            cp ${R_IN}/OCE/NEMO/${OCE}/OPA/eORCA1.4.2_runoff-icb_DaiTrenberth_Depoorter.nc runoff-icb_DaiTrenberth_Depoorter_eORCA1_JD.nc ;; 
     855        esac 
    849856         
    850857        ${PyRun} python3 -u CalvingWeights.py --output=rmp_t${atm}_to_t${oce}_calving_nosouth.nc  --fmt=${FMT_XIOS} \ 
Note: See TracChangeset for help on using the changeset viewer.