Ignore:
Timestamp:
03/23/18 10:55:23 (6 years ago)
Author:
omamce
Message:

O.M. : correct OIceFrc variable name.
More documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/MOSAIX/CreateRestartAtm4Oasis.bash

    r3665 r3686  
    100100## Extract variables 
    101101## =========================================================================== 
    102 ncks --overwrite --fl_fmt=${FL_FMT} --history -d time_counter,0,0 -v lon,lat,sols,soll,fract_oce,fract_sic,precip,snow,evap_sic,evap_oce,wind10m,taux_oce,tauy_oce,taux_sic,tauy_sic ${AtmFile} flxat_fields.nc 
    103 ncwa --overwrite --fl_fmt=${FL_FMT} --history -a time_counter flxat_fields.nc flxat_fields_notime.nc # remove time dimension  
     102ncks --overwrite --fl_fmt=${FL_FMT} --history --dimension time_counter,0,0 --variable lon,lat,sols,soll,fract_oce,fract_sic,precip,snow,evap_sic,evap_oce,wind10m,taux_oce,tauy_oce,taux_sic,tauy_sic ${AtmFile} flxat_fields.nc 
     103ncwa --overwrite --fl_fmt=${FL_FMT} --history --average time_counter flxat_fields.nc flxat_fields_notime.nc # remove time dimension  
    104104ncatted --history --attribute history,global,d,c,""  flxat_fields_notime.nc          # cleaning of history attributes 
    105105 
     
    114114    ico_nbp=$( echo "sqrt(($dim_cell-2)/10)+1" | bc -l | sed 's/\..*//' ) 
    115115    ATM=ICO${ico_nbp} 
    116     ncrename --history -d cell,y flxat_fields_notime.nc 
     116    ncrename --history --dimension cell,y flxat_fields_notime.nc 
    117117cat <<EOF > add_dim.nco 
    118118defdim("x",1) ; 
     
    133133tauy_sic [y,x] = tauy_sic  ; 
    134134EOF 
    135     ncap2 --history --overwrite --fl_fmt=${FL_FMT} -S add_dim.nco flxat_fields_notime.nc tmp_flxat_fields_notime.nc 
     135    ncap2 --history --overwrite --fl_fmt=${FL_FMT} --script-file add_dim.nco flxat_fields_notime.nc tmp_flxat_fields_notime.nc 
    136136    mv tmp_flxat_fields_notime.nc flxat_fields_notime.nc 
    137137 
     
    147147    dim_lat=$(ncdump -h flxat_fields_notime.nc | grep "lat *=" | awk '{print $3}' ) 
    148148    dim_lon=$(ncdump -h flxat_fields_notime.nc | grep "lon *=" | awk '{print $3}' ) 
    149     ncrename --history -d lon,x flxat_fields_notime.nc 
    150     ncrename --history -d lat,y flxat_fields_notime.nc 
     149    ncrename --history --dimension lon,x flxat_fields_notime.nc 
     150    ncrename --history --dimension lat,y flxat_fields_notime.nc 
    151151cat <<EOF > add_dim.nco 
    152152lon[y,x] = lon ; 
    153153lat[y,x] = lat ; 
    154154EOF 
    155     ncap2 --history --overwrite --fl_fmt=${FL_FMT} -S add_dim.nco flxat_fields_notime.nc tmp_flxat_fields_notime.nc 
     155    ncap2 --history --overwrite --fl_fmt=${FL_FMT} --script-file add_dim.nco flxat_fields_notime.nc tmp_flxat_fields_notime.nc 
    156156    mv tmp_flxat_fields_notime.nc flxat_fields_notime.nc 
    157157    (( dim_lat = dim_lat - 1 )) 
     
    216216// 
    217217EOF 
    218 ncap2 --overwrite --fl_fmt=${FL_FMT} -h -S create_flxat.nco flxat_fields_notime.nc tmp_flxat.nc 
     218ncap2 --overwrite --fl_fmt=${FL_FMT} --history --script-file create_flxat.nco flxat_fields_notime.nc tmp_flxat.nc 
    219219  
    220 ncks --fl_fmt=${FL_FMT} --overwrite -h -v lon,lat tmp_flxat.nc flxat.nc 
    221 [[ ${IsUnstructured} = yes ]] && ncks --fl_fmt=${FL_FMT} --append -v bounds_lon,bounds_lat tmp_flxat.nc flxat.nc 
    222 ncks --fl_fmt=${FL_FMT} --append  -h -v COTAUXXU,COTAUYYU,COTAUZZU,COTAUXXV,COTAUYYV,COTAUZZV,COTOTRAI,COTOTSNO,COTOTEVA,COICEVAP,COQSRMIX,COQNSMIX,COSHFICE,CONSFICE,CODFLXDT,COCALVIN,COLIQRUN,COWINDSP,COTAUMOD tmp_flxat.nc flxat.nc 
     220ncks --fl_fmt=${FL_FMT} --overwrite --history --variable lon,lat tmp_flxat.nc flxat.nc 
     221[[ ${IsUnstructured} = yes ]] && ncks --fl_fmt=${FL_FMT} --history --append --variable bounds_lon,bounds_lat tmp_flxat.nc flxat.nc 
     222ncks --fl_fmt=${FL_FMT} --append --history --variable COTAUXXU,COTAUYYU,COTAUZZU,COTAUXXV,COTAUYYV,COTAUZZV,COTOTRAI,COTOTSNO,COTOTEVA,COICEVAP,COQSRMIX,COQNSMIX,COSHFICE,CONSFICE,CODFLXDT,COCALVIN,COLIQRUN,COWINDSP,COTAUMOD tmp_flxat.nc flxat.nc 
    223223 
    224224## 
     
    262262## =========================================================================== 
    263263mv flxat.nc flxat_${ATM}_maskFrom_${OCE}.nc 
    264 ncks -v COCALVIN flxat_${ATM}_maskFrom_${OCE}.nc icbrg_${ATM}_maskFrom_${OCE}.nc 
    265 ncks -v COCALVIN flxat_${ATM}_maskFrom_${OCE}.nc icshf_${ATM}_maskFrom_${OCE}.nc 
     264ncks --history --variable COCALVIN flxat_${ATM}_maskFrom_${OCE}.nc icbrg_${ATM}_maskFrom_${OCE}.nc 
     265ncks --history --variable COCALVIN flxat_${ATM}_maskFrom_${OCE}.nc icshf_${ATM}_maskFrom_${OCE}.nc 
    266266 
    267267## 
Note: See TracChangeset for help on using the changeset viewer.