Ignore:
Timestamp:
Jul 21, 2011, 5:24:11 PM (13 years ago)
Author:
aslmd
Message:

MESOSCALE: corrected a link bug in launch_gcm. added a test in makemeso to check if xy grid is compliant with number of processors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MESOSCALE/LMD_MM_MARS/makemeso

    r235 r239  
    524524  #----------------
    525525  case ${numproc} in
    526     1) physx=$(expr ${lon} - 1)
    527        physy=$(expr ${lat} - 1)
    528        physz=$(expr ${level} - 1) ;;
    529     2) physx=$(expr ${lon} - 1)
    530        physy=$(expr ${lat} - 1) ; physy=$(expr ${physy} \/ 2)
    531        physz=$(expr ${level} - 1) ;;
    532     4) physx=$(expr ${lon} - 1) ; physx=$(expr ${physx} \/ 2)
    533        physy=$(expr ${lat} - 1) ; physy=$(expr ${physy} \/ 2)
    534        physz=$(expr ${level} - 1) ;;
    535     6) physx=$(expr ${lon} - 1) ; physx=$(expr ${physx} \/ 2)
    536        physy=$(expr ${lat} - 1) ; physy=$(expr ${physy} \/ 3)
    537        physz=$(expr ${level} - 1) ;;
    538     8) physx=$(expr ${lon} - 1) ; physx=$(expr ${physx} \/ 2)
    539        physy=$(expr ${lat} - 1) ; physy=$(expr ${physy} \/ 4)
    540        physz=$(expr ${level} - 1) ;;
    541     12) physx=$(expr ${lon} - 1) ; physx=$(expr ${physx} \/ 3)
    542         physy=$(expr ${lat} - 1) ; physy=$(expr ${physy} \/ 4)
    543         physz=$(expr ${level} - 1) ;;
    544     16) physx=$(expr ${lon} - 1) ; physx=$(expr ${physx} \/ 4)
    545         physy=$(expr ${lat} - 1) ; physy=$(expr ${physy} \/ 4)
    546         physz=$(expr ${level} - 1) ;;
    547     20) physx=$(expr ${lon} - 1) ; physx=$(expr ${physx} \/ 4)
    548         physy=$(expr ${lat} - 1) ; physy=$(expr ${physy} \/ 5)
    549         physz=$(expr ${level} - 1) ;;
    550     24) physx=$(expr ${lon} - 1) ; physx=$(expr ${physx} \/ 4)
    551         physy=$(expr ${lat} - 1) ; physy=$(expr ${physy} \/ 6)
    552         physz=$(expr ${level} - 1) ;;
    553     32) physx=$(expr ${lon} - 1) ; physx=$(expr ${physx} \/ 4)
    554         physy=$(expr ${lat} - 1) ; physy=$(expr ${physy} \/ 8)
    555         physz=$(expr ${level} - 1) ;;
    556     64) physx=$(expr ${lon} - 1) ; physx=$(expr ${physx} \/ 8)
    557         physy=$(expr ${lat} - 1) ; physy=$(expr ${physy} \/ 8)
    558         physz=$(expr ${level} - 1) ;;
    559     128) physx=$(expr ${lon} - 1) ; physx=$(expr ${physx} \/ 8)
    560         physy=$(expr ${lat} - 1) ; physy=$(expr ${physy} \/ 16)
    561         physz=$(expr ${level} - 1) ;;
    562     *) echo not supported ; exit
     526      1) divx=1 ; divy=1  ;;
     527      2) divx=1 ; divy=2  ;;
     528      4) divx=2 ; divy=2  ;;
     529      6) divx=2 ; divy=3  ;;
     530      8) divx=2 ; divy=4  ;;
     531     12) divx=3 ; divy=4  ;;
     532     16) divx=4 ; divy=4  ;;
     533     20) divx=4 ; divy=5  ;;
     534     24) divx=4 ; divy=6  ;;
     535     32) divx=4 ; divy=8  ;;
     536     64) divx=8 ; divy=8  ;;
     537    128) divx=8 ; divy=16 ;;
     538      *) echo not yet supported ; exit ;;
    563539  esac
     540  restex=$(expr ${physx}%${divx})   
     541  restey=$(expr ${physy}%${divy})
     542  if [[ ${restex} != 0 || ${restey} != 0 ]]
     543  then
     544     echo nx-1 shall be divided by ${divx}
     545     echo ny-1 shall be divided by ${divy}
     546     exit
     547  fi
     548  physx=$(expr ${lon} - 1) ; physx=$(expr ${physx} \/ ${divx})
     549  physy=$(expr ${lat} - 1) ; physy=$(expr ${physy} \/ ${divy})
     550  physz=$(expr ${level} - 1)
    564551
    565552  # change this if you change num_soil_layers in WRF
Note: See TracChangeset for help on using the changeset viewer.