Changeset 4037 for TOOLS/MOSAIX/CreateWeightsMask.bash
- Timestamp:
- 09/27/18 10:46:10 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/MOSAIX/CreateWeightsMask.bash
r3966 r4037 4 4 #MSUB -e Out_WeightsMask # Error output 5 5 #MSUB -eo 6 #MSUB -n 4# Number of processors6 #MSUB -n 8 # Number of processors 7 7 #MSUB -T 1800 # Time limit (seconds) 8 8 #MSUB -q skylake … … 52 52 # Defines models 53 53 # ============== 54 OCE=ORCA2.354 #OCE=ORCA2.3 55 55 #OCE=eORCA1.2 56 #OCE=ORCA02557 58 #ATM=ICO3056 OCE=ORCA025 57 58 ATM=ICO30 59 59 #ATM=ICO40 60 60 #ATM=ICO450 61 ATM=LMD969561 #ATM=LMD9695 62 62 #ATM=LMD144X142 63 63 … … 67 67 ListOCEGRID="T U V" 68 68 ListOrder="1st" # 2nd" 69 ListNormalize="false true"69 ListNormalize="false" # true" 70 70 71 71 ## =========================================================================== … … 143 143 ( ORCA2.3* ) OcePerio=4 ;; 144 144 ( ORCA1* | eORCA1* ) OcePerio=6 ;; 145 ( ORCA025* ) OcePerio=6 ;; 145 146 esac 146 147 # … … 164 165 # -------------------------------------------------------------------------------------------------------- 165 166 cat <<EOF >add_c_grid.nco 166 nav_lon_grid_C = nav_lon_grid_T ; 167 nav_lat_grid_C = nav_lat_grid_T ; 168 bounds_lon_grid_C = bounds_lon_grid_T ; 169 bounds_lat_grid_C = bounds_lat_grid_T ; 170 mask_C = maskutil_T ; 171 area_grid_C = area_grid_T ; 167 defdim("x_grid_C", \$x_grid_T.size) ; 168 defdim("y_grid_C", \$y_grid_T.size) ; 169 defdim("nvertex_grid_C", 4) ; 170 nav_lon_grid_C[y_grid_C,x_grid_C] = nav_lon_grid_T(:,:) ; 171 nav_lat_grid_C[y_grid_C,x_grid_C] = nav_lat_grid_T(:,:) ; 172 bounds_lon_grid_C[y_grid_C,x_grid_C,nvertex_grid_C] = bounds_lon_grid_T(:,:,:) ; 173 bounds_lat_grid_C[y_grid_C,x_grid_C,nvertex_grid_C] = bounds_lat_grid_T(:,:,:) ; 174 mask_C[y_grid_C,x_grid_C] = maskutil_T(:,:) ; 175 area_grid_C[y_grid_C,x_grid_C] = area_grid_T(:,:) ; 172 176 EOF 173 177 174 178 ncap2 --overwrite --history --script-file add_c_grid.nco ${OCE}_coordinates_mask.nc tmp_${OCE}_coordinates_mask.nc 175 ncks --overwrite --variable nav_lon_grid_C,nav_lat_grid_C tmp_${OCE}_coordinates_mask.nc C_${OCE}_coordinates_mask.nc 176 ncks --append --variable bounds_lon_grid_C,bounds_lat_grid_C tmp_${OCE}_coordinates_mask.nc C_${OCE}_coordinates_mask.nc 177 #ncks --append --variable mask_C tmp_${OCE}_coordinates_mask.nc C_${OCE}_coordinates_mask.nc 178 ncks --append --variable area_grid_C tmp_${OCE}_coordinates_mask.nc C_${OCE}_coordinates_mask.nc 179 180 ncrename --dimension x_grid_T,x_grid_C C_${OCE}_coordinates_mask.nc 181 ncrename --dimension y_grid_T,y_grid_C C_${OCE}_coordinates_mask.nc 182 ncrename --dimension nvertex_grid_T,nvertex_grid_C C_${OCE}_coordinates_mask.nc 183 ncks --append C_${OCE}_coordinates_mask.nc ${OCE}_coordinates_mask.nc 179 ncatted --history --attribute bounds,nav_lon_grid_C,m,c,"bounds_lon_grid_C" tmp_${OCE}_coordinates_mask.nc 180 ncatted --history --attribute bounds,nav_lat_grid_C,m,c,"bounds_lat_grid_C" tmp_${OCE}_coordinates_mask.nc 181 ncks --history --overwrite --variable nav_lon_grid_C,nav_lat_grid_C tmp_${OCE}_coordinates_mask.nc C_${OCE}_coordinates_mask.nc 182 ncks --history --append --variable bounds_lon_grid_C,bounds_lat_grid_C tmp_${OCE}_coordinates_mask.nc C_${OCE}_coordinates_mask.nc 183 ncks --history --append --variable area_grid_C tmp_${OCE}_coordinates_mask.nc C_${OCE}_coordinates_mask.nc 184 185 ncks --history --append C_${OCE}_coordinates_mask.nc ${OCE}_coordinates_mask.nc 184 186 rm C_${OCE}_coordinates_mask.nc 185 187 186 ncks -- overwrite --fl_fmt=${FMT_OASIS} --history${OCE}_coordinates_mask.nc ${OCE}_coordinates_mask_${FMT_OASIS}.nc188 ncks --history --overwrite --fl_fmt=${FMT_OASIS} ${OCE}_coordinates_mask.nc ${OCE}_coordinates_mask_${FMT_OASIS}.nc 187 189 188 190 ls -al … … 432 434 ${ATM}_grid_maskFrom_${OCE}.nc 433 435 fi 434 ncks --alphabetize -- overwrite --mk_rec time_counter ${ATM}_grid_maskFrom_${OCE}.nc tmp_${ATM}_grid_maskFrom_${OCE}.nc ; mv tmp_${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}.nc436 ncks --alphabetize --history --overwrite --mk_rec time_counter ${ATM}_grid_maskFrom_${OCE}.nc tmp_${ATM}_grid_maskFrom_${OCE}.nc ; mv tmp_${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}.nc 435 437 ncks --alphabetize --history --overwrite --fl_fmt=${FMT_OASIS} ${ATM}_grid_maskFrom_${OCE}.nc ${ATM}_grid_maskFrom_${OCE}_${FMT_OASIS}.nc 436 438 … … 528 530 ## Add missing variables in rmp files 529 531 ## =========================================================================== 530 for rmpFile in rmp_ tlmd_to_[tuv]orc_*order_*.nc rmp_[tuv]orc_to_tlmd_*order_*.nc* ; do532 for rmpFile in rmp_?${atm}_to_[tuv]${oce}_*order_*.nc rmp_[tuv]${oce}_to_t${atm}_*order_*.nc* ; do 531 533 echo ${rmpFile} 532 534 a_to_o=false ; o_to_a=false … … 663 665 for File in dia_*.nc rmp_*.nc 664 666 do 667 ncatted --history --attribute history_of_appended_files,global,d,c,"" ${File} 665 668 NewFile=$(echo ${File} | sed -e "s/${atm}/${ATM}/" -e "s/${oce}/${OCE}/" ) 666 669 cp ${File} ${SUBMIT_DIR}/${NewFile}
Note: See TracChangeset
for help on using the changeset viewer.