Changeset 3966


Ignore:
Timestamp:
07/06/18 16:42:03 (2 years ago)
Author:
omamce
Message:

O.M. : adaptation to Irene. Adaptation to recent version of NCO (4.6)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/MOSAIX/CreateWeightsMask.bash

    r3913 r3966  
    44#MSUB -e Out_WeightsMask    # Error output 
    55#MSUB -eo 
    6 #MSUB -n 4              # Number of processors 
    7 #MSUB -T 1800           # Time limit (seconds) 
    8 #MSUB -q standard 
     6#MSUB -n 4                  # Number of processors 
     7#MSUB -T 1800               # Time limit (seconds) 
     8#MSUB -q skylake 
    99#MSUB -Q test 
    10 #MSUB -p devcmip6 
     10#MSUB -p gen2212 
     11#MSUB -m work 
    1112 
    1213### =========================================================================== 
     
    8586 
    8687case ${arch} in 
    87     ( curie | irene ) 
     88    ( curie ) 
    8889    set +vx 
    8990    module purge 
    9091    source /ccc/cont003/home/dsm/p86ipsl/.env_intel17.0.2_curie; 
    9192    source /ccc/cont003/home/dsm/p86ipsl/.env_netcdf4.3.3.1_curie 
     93    module load datadir/igcmg 
    9294    R_IN=$(ccc_home -u igcmg --cccwork)/IGCM 
    9395    TMPDIR=${SCRATCHDIR}/TMP 
     
    9597    PROGRAM=${BRIDGE_MSUB_REQNAME} 
    9698    MPIRUN=ccc_mprun 
     99    ;; 
     100    ( irene ) 
     101    set +vx 
     102    module purge 
     103    source $(ccc_home -u igcmg)/MachineEnvironment/irene/env_irene 
     104    module load python/2.7.8 
     105    module load datadir/igcmg 
     106    R_IN=$(ccc_home -u igcmg --cccwork)/IGCM 
     107    TMPDIR=${CCCWORKDIR}/TMP 
     108    SUBMIT_DIR=${BRIDGE_MSUB_PWD:-${SUBMIT_DIR}} 
     109    PROGRAM=${BRIDGE_MSUB_REQNAME} 
     110    MPIRUN=ccc_mprun 
     111    module list 
    97112    ;; 
    98113    ( spip ) 
     
    232247ncks --alphabetize --history --append --variable OceMask dia_t${oce}_to_t${atm}_1storder_false_mask.nc   ${ATM}_grid_maskFrom_${OCE}.nc 
    233248rm dia_t${oce}_to_t${atm}_1storder_false_mask.nc 
    234  
    235  
    236249 
    237250## 
     
    381394#ncatted --history -a coordinates,aire,m,c,"lat lon" ${ATM}_grid_maskFrom_${OCE}.nc 
    382395ncap2 --overwrite --history --script 'defdim("time_counter",1) ;' ${ATM}_grid_maskFrom_${OCE}.nc tmp_${ATM}_grid_maskFrom_${OCE}.nc ; mv tmp_${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}.nc 
     396ncdump -h ${ATM}_grid_maskFrom_${OCE}.nc 
     397 
    383398ncks --alphabetize --history --overwrite --fl_fmt=${FMT_OASIS} ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_${FMT_OASIS}.nc 
     399ncdump -h ${ATM}_grid_maskFrom_${OCE}_${FMT_OASIS}.nc 
    384400 
    385401if [[ ${atm} = ico ]] ; then 
    386402    cat <<EOF > add_time.nco 
    387 OceFrac    [time_counter,cell] = OceFrac    (:) ; 
    388 OceMask    [time_counter,cell] = OceMask    (:) ; 
    389 AtmCoastal [time_counter,cell] = AtmCoastal (:) ; 
     403OceFrac    [time_counter,cell] = OceFrac    [cell] ; 
     404OceMask    [time_counter,cell] = OceMask    [cell] ; 
     405AtmCoastal [time_counter,cell] = AtmCoastal [cell] ; 
    390406EOF 
    391407    ncap2 --overwrite --history --script-file add_time.nco ${ATM}_grid_maskFrom_${OCE}.nc tmp_${ATM}_grid_maskFrom_${OCE}.nc ; mv tmp_${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}.nc 
     
    401417if [[ ${atm} = lmd ]] ; then 
    402418    cat <<EOF > add_time.nco 
    403 OceFrac    [time_counter,lat,lon] = OceFrac    (:,:) ; 
    404 OceMask    [time_counter,lat,lon] = OceMask    (:,:) ; 
    405 AtmCoastal [time_counter,lat,lon] = AtmCoastal (:,:) ; 
    406 EOF 
    407     ncap2 --overwrite --history --script-file add_time.nco ${ATM}_grid_maskFrom_${OCE}.nc tmp_${ATM}_grid_maskFrom_${OCE}.nc ; mv tmp_${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}.nc 
     419OceFrac    [time_counter,lat,lon] = OceFrac    [lat,lon] ; 
     420OceMask    [time_counter,lat,lon] = OceMask    [lat,lon]  ; 
     421AtmCoastal [time_counter,lat,lon] = AtmCoastal [lat,lon]  ; 
     422EOF 
     423    ncap2 --overwrite --history --script-file add_time.nco ${ATM}_grid_maskFrom_${OCE}.nc tmp_${ATM}_grid_maskFrom_${OCE}.nc 
     424    ncdump -h tmp_${ATM}_grid_maskFrom_${OCE}.nc 
     425    mv tmp_${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}.nc 
     426     
    408427    ncatted --history \ 
    409             -a coordinates,OceFrac,c,c,"time_counter lat lon"    \ 
    410             -a coordinates,OceMask,c,c,"time_counter lat lon"    \ 
    411             -a coordinates,AtmCoastal,c,c,"time_counter lat lon" \ 
    412             -a coordinates,aire,c,c,"lat lon" \ 
     428            -a coordinates,OceFrac,m,c,"time_counter lat lon"    \ 
     429            -a coordinates,OceMask,m,c,"time_counter lat lon"    \ 
     430            -a coordinates,AtmCoastal,m,c,"time_counter lat lon" \ 
     431            -a coordinates,aire,m,c,"lat lon" \ 
    413432            ${ATM}_grid_maskFrom_${OCE}.nc 
    414433fi 
     
    579598dst_grid_imask.int() ; 
    580599dst_grid_area  (:) = aire(:) ; 
     600dst_grid_frac  (:) = OceFrac(0,:) ; 
    581601EOF 
    582602        if [[ ${o_to_a} = true ]] ; then 
     
    593613        fi 
    594614    fi 
     615     
    595616    if [[ ${atm} = lmd ]] ; then 
    596617        cat <<EOF >add_varatm.nco 
Note: See TracChangeset for help on using the changeset viewer.