Changeset 4146
- Timestamp:
- 11/22/18 11:21:17 (5 years ago)
- Location:
- TOOLS/MOSAIX
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/MOSAIX/CalvingWeights.py
r4097 r4146 271 271 272 272 src_grid_size = f_calving.createDimension ('src_grid_size' , src_grid_size ) 273 src_grid_corners = f_calving.createDimension ('src_grid_corners', 6)273 src_grid_corners = f_calving.createDimension ('src_grid_corners', src_clo.shape[0] ) 274 274 src_grid_rank = f_calving.createDimension ('src_grid_rank' , 2 ) 275 275 276 276 dst_grid_size = f_calving.createDimension ('dst_grid_size' , dst_grid_size ) 277 dst_grid_corners = f_calving.createDimension ('dst_grid_corners', 4)277 dst_grid_corners = f_calving.createDimension ('dst_grid_corners', dst_clo.shape[0] ) 278 278 dst_grid_rank = f_calving.createDimension ('dst_grid_rank' , 2 ) 279 279 … … 336 336 v_dst_lat_addressed = f_calving.createVariable ( 'dst_lat_addressed', 'f8', ('num_links',) ) 337 337 v_dst_lon_addressed.long_name="Longitude" ; v_dst_lon_addressed.standard_name="longitude" ; v_dst_lon_addressed.units="degrees_east" 338 v_dst_lat_addressed.long_name="Latitude" ; v_dst_lat_addressed.standard_name="latitude" ; v_dst_lat_addressed.units="degrees_ east"338 v_dst_lat_addressed.long_name="Latitude" ; v_dst_lat_addressed.standard_name="latitude" ; v_dst_lat_addressed.units="degrees_north" 339 339 v_dst_lon_addressed [:] = dst_lon.ravel()[dst_address-1].ravel() 340 340 v_dst_lat_addressed [:] = dst_lat.ravel()[dst_address-1].ravel() -
TOOLS/MOSAIX/CreateWeightsMask.bash
r4097 r4146 57 57 #OCE=ORCA025 58 58 59 ATM=ICO3059 #ATM=ICO30 60 60 #ATM=ICO40 61 61 #ATM=ICO450 62 #ATM=LMD969562 ATM=LMD9695 63 63 #ATM=LMD144X142 64 64 … … 68 68 ListOCEGRID="T" # U V 69 69 ListOrder="1st" # 2nd 70 ListNormalize="false " # true71 ListQuantity="false " # true70 ListNormalize="false true" 71 ListQuantity="false true" 72 72 73 73 ## =========================================================================== … … 114 114 mkdir -p ${TMPDIR}/${OCE}x${ATM} || exit 1 115 115 cd ${TMPDIR}/${OCE}x${ATM} || exit 1 116 rm -f *116 rm -fr * 117 117 118 118 # … … 632 632 EOF 633 633 634 [[ ${o_to_a} = true ]] && ncap2 --history --append --script-file add_varoce.nco ${OCE}_coordinates_mask_${FMT_OASIS}.nc ${rmpFile} 634 cp add_varoce.nco add_varoce_$(basename ${rmpFile} .nc)_o_to_a.nco 635 [[ ${o_to_a} = true ]] && ncap2 --history --append --script-file add_varoce_$(basename ${rmpFile} .nc)_o_to_a.nco ${OCE}_coordinates_mask_${FMT_OASIS}.nc ${rmpFile} 635 636 sed --in-place "s/src_/dst_/g" add_varoce.nco 636 [[ ${a_to_o} = true ]] && ncap2 --history --append --script-file add_varoce.nco ${OCE}_coordinates_mask_${FMT_OASIS}.nc ${rmpFile} 637 cp add_varoce.nco add_varoce_$(basename ${rmpFile} .nc)_a_to_o.nco 638 [[ ${a_to_o} = true ]] && ncap2 --history --append --script-file add_varoce_$(basename ${rmpFile} .nc)_a_to_o.nco ${OCE}_coordinates_mask_${FMT_OASIS}.nc ${rmpFile} 637 639 638 640 if [[ ${atm} = ico ]] ; then … … 662 664 dst_grid_frac (:) = OceFrac(0,:) ; 663 665 EOF 666 cp add_varatm.nco add_varatm_$(basename ${rmpFile} .nc)_o_to_a.nco 664 667 if [[ ${o_to_a} = true ]] ; then 665 ncap2 --history --append --script-file add_varatm .nco ${ATM}_grid_maskFrom_${OCE}_${FMT_OASIS}.nc ${rmpFile}668 ncap2 --history --append --script-file add_varatm_$(basename ${rmpFile} .nc)_o_to_a.nco ${ATM}_grid_maskFrom_${OCE}_${FMT_OASIS}.nc ${rmpFile} 666 669 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 667 670 mv rmp_tmp.nc ${rmpFile} … … 669 672 670 673 sed --in-place "s/dst_/src_/g" add_varatm.nco 674 cp add_varatm.nco add_varatm_$(basename ${rmpFile} .nc)_a_to_o.nco 671 675 if [[ ${a_to_o} = true ]] ; then 672 ncap2 --history --append --script-file add_varatm .nco ${ATM}_grid_maskFrom_${OCE}_${FMT_OASIS}.nc ${rmpFile}676 ncap2 --history --append --script-file add_varatm_$(basename ${rmpFile} .nc)_a_to_o.nco ${ATM}_grid_maskFrom_${OCE}_${FMT_OASIS}.nc ${rmpFile} 673 677 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 674 678 mv rmp_tmp.nc ${rmpFile} … … 704 708 dst_grid_frac (:) = OceFrac(0,:,:) ; 705 709 EOF 710 cp add_varatm.nco add_varatm_$(basename ${rmpFile} .nc)_o_to_a.nco 706 711 if [[ ${o_to_a} = true ]] ; then 707 ncap2 --history --append --script-file add_varatm .nco ${ATM}_grid_maskFrom_${OCE}_${FMT_OASIS}.nc ${rmpFile}712 ncap2 --history --append --script-file add_varatm_$(basename ${rmpFile} .nc)_o_to_a.nco ${ATM}_grid_maskFrom_${OCE}_${FMT_OASIS}.nc ${rmpFile} 708 713 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 709 714 mv rmp_tmp.nc ${rmpFile} … … 711 716 712 717 sed --in-place "s/dst/src/g" add_varatm.nco 718 cp add_varatm.nco add_varatm_$(basename ${rmpFile} .nc)_a_to_o.nco 713 719 if [[ ${a_to_o} = true ]] ; then 714 ncap2 --history --append --script-file add_varatm .nco ${ATM}_grid_maskFrom_${OCE}_${FMT_OASIS}.nc ${rmpFile}720 ncap2 --history --append --script-file add_varatm_$(basename ${rmpFile} .nc)_a_to_o.nco ${ATM}_grid_maskFrom_${OCE}_${FMT_OASIS}.nc ${rmpFile} 715 721 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 716 722 mv rmp_tmp.nc ${rmpFile}
Note: See TracChangeset
for help on using the changeset viewer.