Ignore:
Timestamp:
02/22/11 10:36:38 (13 years ago)
Author:
cetlod
Message:

Improvment of interactive scripts for IPSLCM5A_C configuration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/IPSLCM/IPSLCM5A/Chistorical/COMP/lmdz_analyse_stomate_out.awk

    r1237 r1316  
    2525#========================== 
    2626BEGIN { 
    27 # print "traitement de " ARGV[1] 
     27 # print "traitement de " ARGV[1] 
    2828 
    2929  nbarg=ARGC 
     
    5454  counterLU=0 
    5555 
     56  fluxNBP_found=0 
     57  counterNBP=0 
     58 
    5659  CO2file[1]="" 
    5760  LUfile[1]="" 
     61  NBPfile[1]="" 
    5862} 
    5963 
     
    7983    CO2file[counterCO2]=felts[2] 
    8084  } 
    81   else if (match($0, ".*GLOBAL net cflux_prod_total_sum.*")) { 
     85  else if (match($0, ".*GLOBAL net_cflux_prod_monthly.*")) { 
    8286    myprint("fluxLU_found = 1") 
    8387    fluxLU_found=1 
     
    8791    myprint("nb  :" nb) 
    8892    for (elt in felts) { 
     93        myprint(elt "- elt  :" felts[elt]) 
     94    } 
     95    myprint("elts_co2  :" felts[2]) 
     96 
     97    LUfile[counterLU]=felts[2] 
     98  } 
     99 
     100  else if (match($0, ".*GLOBAL net_biosp_prod_monthly.*")) { 
     101    myprint("fluxNBP_found = 1") 
     102    fluxNBP_found=1 
     103    counterNBP=counterNBP+1 
     104 
     105    nb=split($0,felts, "=") 
     106    myprint("nb  :" nb) 
     107    for (elt in felts) { 
    89108        myprint(elt "- elt  :" felts[elt]) 
    90109    } 
    91     myprint("elts_lu  :" felts[2]) 
     110    myprint("elts_nbp  :" felts[2]) 
    92111 
    93     LUfile[counterLU]=felts[2] 
     112    NBPfile[counterNBP]=felts[2] 
    94113  } 
    95114} 
     
    106125            myprint("value  :" CO2file[i]) 
    107126        } 
    108          
    109         if ( fluxLU_found == 1 ) { 
    110             myprint("LU value for " file) 
    111             myprint("counterLU  :" counterLU) 
    112             for (i=1; i<=counterLU; i++) {   
    113                 print LUfile[i] 
    114                 myprint("value  :" LUfile[i]) 
     127 
     128        if ( fluxLU_found == 1 ) { 
     129            myprint("LU value for " file) 
     130            myprint("counterLU  :" counterLU) 
     131            for (i=1; i<=counterLU; i++) { 
     132                print LUfile[i] 
     133                myprint("value  :" LUfile[i]) 
     134            } 
     135 
     136            if ( fluxNBP_found == 1 ) { 
     137               myprint("NBP value for " file) 
     138               myprint("counterNBP  :" counterNBP) 
     139               for (i=1; i<=counterNBP; i++) {   
     140                    print NBPfile[i] 
     141                    myprint("value  :" NBPfile[i]) 
     142               } 
     143             
     144               exit_value=0 
     145               exit 0 
    115146            } 
    116              
     147            else { 
     148                 myprint("ERROR : NO NBP value for " file) 
     149                 print "0003" 
     150                 exit 1 
     151            } 
     152 
    117153            exit_value=0 
    118154            exit 0 
    119         } 
    120         else { 
    121             myprint("ERROR : NO LU value for " file) 
    122             print "0002" 
    123             exit 1 
    124         } 
    125  
    126         exit_value=0 
    127         exit 0 
     155        } 
     156        else { 
     157            myprint("ERROR : NO LU value for " file) 
     158            print "0002" 
     159            print "0003" 
     160            exit 1 
     161        } 
    128162    } 
    129163    else { 
    130         myprint("ERROR : NO CO2 value for " file) 
    131         print "0001" 
    132         print "0002" 
    133         exit 1 
    134     } 
    135      
     164         myprint("ERROR : NO CO2 value for " file) 
     165         print "0001" 
     166         print "0002" 
     167         print "0003" 
     168         exit 1 
     169       } 
    136170  } 
    137171  else { 
Note: See TracChangeset for help on using the changeset viewer.