Changeset 4146


Ignore:
Timestamp:
11/22/18 11:21:17 (5 years ago)
Author:
omamce
Message:

O.M. : small corrections on diagnostics only

Location:
TOOLS/MOSAIX
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/MOSAIX/CalvingWeights.py

    r4097 r4146  
    271271 
    272272src_grid_size    = f_calving.createDimension ('src_grid_size'   , src_grid_size ) 
    273 src_grid_corners = f_calving.createDimension ('src_grid_corners',        6  ) 
     273src_grid_corners = f_calving.createDimension ('src_grid_corners', src_clo.shape[0]  ) 
    274274src_grid_rank    = f_calving.createDimension ('src_grid_rank'   ,        2  ) 
    275275 
    276276dst_grid_size    = f_calving.createDimension ('dst_grid_size'   , dst_grid_size ) 
    277 dst_grid_corners = f_calving.createDimension ('dst_grid_corners',        4 ) 
     277dst_grid_corners = f_calving.createDimension ('dst_grid_corners', dst_clo.shape[0] ) 
    278278dst_grid_rank    = f_calving.createDimension ('dst_grid_rank'   ,        2  ) 
    279279 
     
    336336v_dst_lat_addressed = f_calving.createVariable ( 'dst_lat_addressed', 'f8', ('num_links',) ) 
    337337v_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" 
     338v_dst_lat_addressed.long_name="Latitude"  ; v_dst_lat_addressed.standard_name="latitude"  ; v_dst_lat_addressed.units="degrees_north" 
    339339v_dst_lon_addressed [:] = dst_lon.ravel()[dst_address-1].ravel() 
    340340v_dst_lat_addressed [:] = dst_lat.ravel()[dst_address-1].ravel() 
  • TOOLS/MOSAIX/CreateWeightsMask.bash

    r4097 r4146  
    5757#OCE=ORCA025 
    5858 
    59 ATM=ICO30 
     59#ATM=ICO30 
    6060#ATM=ICO40 
    6161#ATM=ICO450 
    62 #ATM=LMD9695 
     62ATM=LMD9695 
    6363#ATM=LMD144X142 
    6464 
     
    6868ListOCEGRID="T" # U V 
    6969ListOrder="1st" # 2nd 
    70 ListNormalize="false" # true 
    71 ListQuantity="false" # true 
     70ListNormalize="false true" 
     71ListQuantity="false true" 
    7272 
    7373## =========================================================================== 
     
    114114mkdir -p ${TMPDIR}/${OCE}x${ATM} || exit 1 
    115115cd       ${TMPDIR}/${OCE}x${ATM} || exit 1 
    116 rm -f * 
     116rm -fr * 
    117117 
    118118# 
     
    632632EOF 
    633633 
    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} 
    635636    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} 
    637639                 
    638640    if [[ ${atm} = ico ]] ; then 
     
    662664dst_grid_frac  (:) = OceFrac(0,:) ; 
    663665EOF 
     666        cp add_varatm.nco add_varatm_$(basename ${rmpFile} .nc)_o_to_a.nco 
    664667        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} 
    666669            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 
    667670            mv rmp_tmp.nc ${rmpFile} 
     
    669672                     
    670673        sed --in-place "s/dst_/src_/g" add_varatm.nco 
     674        cp add_varatm.nco add_varatm_$(basename ${rmpFile} .nc)_a_to_o.nco 
    671675        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} 
    673677            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 
    674678            mv rmp_tmp.nc ${rmpFile} 
     
    704708dst_grid_frac (:)  = OceFrac(0,:,:) ; 
    705709EOF 
     710        cp add_varatm.nco add_varatm_$(basename ${rmpFile} .nc)_o_to_a.nco 
    706711        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} 
    708713            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 
    709714            mv rmp_tmp.nc ${rmpFile} 
     
    711716         
    712717        sed --in-place "s/dst/src/g" add_varatm.nco 
     718        cp add_varatm.nco add_varatm_$(basename ${rmpFile} .nc)_a_to_o.nco 
    713719        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} 
    715721            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 
    716722            mv rmp_tmp.nc ${rmpFile} 
Note: See TracChangeset for help on using the changeset viewer.