Changeset 694 for trunk


Ignore:
Timestamp:
06/29/12 16:21:12 (12 years ago)
Author:
sdipsl
Message:
  • add a switch to reconstruct station files from LMDZ
  • do not re-order stations according to the CFMIP ordering (way too expansive in I/O). Will do that in memory during the cmor process
Location:
trunk/libIGCM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh

    r672 r694  
    11001100                echo "export R_SAVE=${R_SAVE}                           " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
    11011101                echo "export R_BUFR=${R_BUFR}                           " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
     1102                echo "export R_OUT_KSH=${R_OUT_KSH}                     " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
     1103                echo "export R_BUF_KSH=${R_BUF_KSH}                     " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
    11021104                echo "export config_UserChoices_JobName=${config_UserChoices_JobName} " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
    11031105              fi 
     
    11051107            # Prepare the shell dedicated to offline rebuild 
    11061108            if [ $DRYRUN -le 1 ]; then 
    1107               echo "IGCM_sys_rebuild ${file_in} ${generic_file_name}_*.nc" >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
    1108               echo "IGCM_debug_Verif_Exit_Post                           " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
     1109              if [ ${file_in} = histstn.nc ] ; then 
     1110                echo "IGCM_sys_rebuild_station ${file_in} ${generic_file_name}_*.nc" >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
     1111              else 
     1112                echo "IGCM_sys_rebuild ${file_in} ${generic_file_name}_*.nc" >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
     1113              fi 
     1114              echo "IGCM_debug_Verif_Exit_Post" >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
    11091115            fi 
    11101116            # 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_mercure.ksh

    r693 r694  
    15101510  IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x histstn_xt.nc ${file_out} 
    15111511 
     1512  # Station re-ordering is too expansive to be run within libICGM 
     1513  # This is due to (ncpdq - nrcat - ncpdq) I/O sequence. 
     1514  # This re-ordering must be done "in memory" by the cmorization process 
     1515  # Anyway this is the best sequence using (ncpdq - nrcat - ncpdq) 
     1516  # BEGIN reordering 
     1517 
     1518  # Only LMDZ text output contains the exact ordering of the station. 
     1519  # We isolate this in the code below: 
     1520  #  0  38  -157.5000000000000  70.98591549295774 
     1521  #  0  54  27.49999999999999   67.18309859154928 
     1522  #  0  56  -62.50000000000001  82.39436619718309 
     1523  #  0  79  12.49999999999999   78.59154929577466 
     1524  #  0  116 -165.0000000000000  76.05633802816901 
     1525  #  0  117 130.0000000000000   70.98591549295774 
     1526  #  0  118 110.0000000000000   87.46478873239437 
     1527  #  1  40  4.999999999999995   51.97183098591550 
     1528#  typeset iStation iProc list_opt file_in file_out prefix_invert 
     1529#  typeset -Z4 j4 
     1530#  typeset -Z3 j3 
     1531 
     1532#  unset list_opt 
     1533#  set +A list_opt $@ 
     1534 
     1535  # Filename after rebuild 
     1536#  file_out=${list_opt[0]} 
     1537  # Prefix of output files 
     1538#  prefix_invert=$( basename ${file_out} .nc ) 
     1539  # Number of procs 
     1540#  num_proc=$( grep -i mpi_size ${PREFIX}_${Exe_Output} | wc -l ) 
     1541 
     1542#  iProc=0 
     1543#  while [ ${iProc} -lt ${num_proc} ] ; do 
     1544    # Array containing Station as a number 
     1545#    unset proc_stn 
     1546#    set +A proc_stn $( grep "iophy_mpi rank ip lon lat  $iProc" ${PREFIX}_${Exe_Output} | sed -e "s/iophy_mpi rank ip lon lat //g" | awk ' {print $2}' ) 
     1547    # Number of stations produced by processor proc 
     1548#    stationLast=${#proc_stn[*]} 
     1549    # Proc number on 4 digits 
     1550#    j4=${iProc} 
     1551    # Init 
     1552#    iStation=0 
     1553#    while [ ${iStation} -lt ${stationLast} ] ; do 
     1554      # Station number on 3 digits 
     1555#      j3=${proc_stn[${iStation}]} 
     1556      # Extract station 
     1557      # Invert Axis : t,x -> x,t  
     1558      #               t,pres,x -> x,t,pres 
     1559      # So that we can concatenate along x 
     1560#      IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs -d x,$iStation,$iStation ${prefix_invert}_${j4}.nc ${prefix_invert}_stn_${j3}.nc 
     1561#      (( iStation = iStation + 1 )) 
     1562#    done 
     1563#    (( iProc = iProc + 1 )) 
     1564#  done 
     1565 
     1566  # Concatenate all station along x 
     1567#  IGCM_sys_ncrcat ${prefix_invert}_stn_???.nc ${prefix_invert}_xt.nc 
     1568 
     1569  # Re-invert file 
     1570#  IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x ${prefix_invert}_xt.nc ${file_out} 
     1571 
     1572  # END reordering 
     1573 
    15121574  IGCM_debug_PopStack "IGCM_sys_rebuild_station" 
    15131575} 
Note: See TracChangeset for help on using the changeset viewer.