New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 4162 for branches/2013/dev_LOCEAN_2013/NEMOGCM/TOOLS – NEMO

Ignore:
Timestamp:
2013-11-07T11:19:49+01:00 (11 years ago)
Author:
cetlod
Message:

dev_LOCEAN_2013 : merge in trunk changes between r4028 and r4119, see ticket #1169

Location:
branches/2013/dev_LOCEAN_2013/NEMOGCM/TOOLS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_LOCEAN_2013/NEMOGCM/TOOLS/COMPILE/Fcheck_archfile.sh

    r4148 r4162  
    4040# :: 
    4141# 
    42 #  $ ./Fcheck_archfile.sh ARCHFILE COMPILER 
     42#  $ ./Fcheck_archfile.sh ARCHFILE CPPFILE COMPILER 
    4343# 
    4444# 
     
    9494   else 
    9595       if [ -f ${COMPIL_DIR}/$1 ]; then 
    96       # has the cpp keys file been changed since we copied the arch file in ${COMPIL_DIR}? 
    97       mycpp=$( ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" ) 
    98       if [ "$mycpp" != "$( cat ${COMPIL_DIR}/cpp.history )" ]; then 
    99           echo $mycpp > ${COMPIL_DIR}/cpp.history 
    100           cpeval ${myarch} ${COMPIL_DIR}/$1 
     96      if [ "$2" != "nocpp" ]  
     97      then 
     98          # has the cpp keys file been changed since we copied the arch file in ${COMPIL_DIR}? 
     99          mycpp=$( ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" ) 
     100          if [ "$mycpp" != "$( cat ${COMPIL_DIR}/cpp.history )" ]; then 
     101         echo $mycpp > ${COMPIL_DIR}/cpp.history 
     102         cpeval ${myarch} ${COMPIL_DIR}/$1 
     103          fi 
     104          # has the cpp keys file been updated since we copied the arch file in ${COMPIL_DIR}? 
     105          mycpp=$( find -L ${COMPIL_DIR} -cnewer ${COMPIL_DIR}/$1 -name $2 -print ) 
     106          [ ${#mycpp} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1 
    101107      fi 
    102       # has the cpp keys file been updated since we copied the arch file in ${COMPIL_DIR}? 
    103       mycpp=$( find -L ${COMPIL_DIR} -cnewer ${COMPIL_DIR}/$1 -name $2 -print ) 
    104       [ ${#mycpp} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1 
    105108      # has myarch file been updated since we copied it in ${COMPIL_DIR}? 
    106109      myarchdir=$( dirname ${myarch} ) 
     
    134137    if [ "$myarch" == "$( cat ${COMPIL_DIR}/arch.history )" ]; then  
    135138   if [ -f ${COMPIL_DIR}/$1 ]; then 
    136        # has the cpp keys file been changed since we copied the arch file in ${COMPIL_DIR}? 
    137        mycpp=$( ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" ) 
    138        if [ "$mycpp" != "$( cat ${COMPIL_DIR}/cpp.history )" ]; then 
    139       echo $mycpp > ${COMPIL_DIR}/cpp.history 
    140       cpeval ${myarch} ${COMPIL_DIR}/$1 
     139       if [ "$2" != "nocpp" ]  
     140       then 
     141      # has the cpp keys file been changed since we copied the arch file in ${COMPIL_DIR}? 
     142      mycpp=$( ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" ) 
     143      if [ "$mycpp" != "$( cat ${COMPIL_DIR}/cpp.history )" ]; then 
     144          echo $mycpp > ${COMPIL_DIR}/cpp.history 
     145          cpeval ${myarch} ${COMPIL_DIR}/$1 
     146      fi 
     147      # has the cpp keys file been updated since we copied the arch file in ${COMPIL_DIR}? 
     148      mycpp=$( find -L ${COMPIL_DIR} -cnewer ${COMPIL_DIR}/$1 -name $2 -print ) 
     149      [ ${#mycpp} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1 
    141150       fi 
    142        # has the cpp keys file been updated since we copied the arch file in ${COMPIL_DIR}? 
    143        mycpp=$( find -L ${COMPIL_DIR} -cnewer ${COMPIL_DIR}/$1 -name $2 -print ) 
    144        [ ${#mycpp} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1 
    145151       # has myarch file been updated since we copied it in ${COMPIL_DIR}? 
    146152       myarch=$( find -L ${MAIN_DIR}/ARCH -cnewer ${COMPIL_DIR}/$1 -name arch-${3}.fcm -print ) 
     
    150156   fi 
    151157    else 
    152    ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" > ${COMPIL_DIR}/cpp.history 
     158   if [ "$2" != "nocpp" ]  
     159   then 
     160       ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" > ${COMPIL_DIR}/cpp.history 
     161   fi 
    153162   echo ${myarch} > ${COMPIL_DIR}/arch.history 
    154163   cpeval ${myarch} ${COMPIL_DIR}/$1 
     
    157166 
    158167#- do we need xios library? 
    159 use_iom=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$2 | grep -c key_iomput ) 
     168if [ "$2" != "nocpp" ]  
     169then 
     170    use_iom=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$2 | grep -c key_iomput ) 
     171else 
     172    use_iom=0 
     173fi 
    160174have_lxios=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$1 | grep -c "\-lxios" ) 
    161175if [[ ( $use_iom -eq 0 ) && ( $have_lxios -ge 1 ) ]] 
     
    166180 
    167181#- do we need oasis libraries? 
    168 use_oasis=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$2 | grep -c key_oasis3 ) 
     182if [ "$2" != "nocpp" ]  
     183then 
     184    use_oasis=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$2 | grep -c key_oasis3 ) 
     185else 
     186    use_oasis=0 
     187fi 
    169188for liboa in psmile.MPI1 mct mpeu scrip mpp_io 
    170189do 
  • branches/2013/dev_LOCEAN_2013/NEMOGCM/TOOLS/MISCELLANEOUS/chk_iomput.sh

    r4153 r4162  
    5959#------------------------------------------------ 
    6060# 
    61 external=$( grep -c "<field_definition.* src=" $xmlfile ) 
     61external=$( grep -c "<field_definition  *\([^ ].* \)*src=" $xmlfile ) 
    6262if [ $external -eq 1 ] 
    6363then 
    64     xmlfield_def=$( grep "<field_definition.* src=" $xmlfile | sed -e 's/.*src="\([^"]*\)".*/\1/' ) 
     64    xmlfield_def=$( grep "<field_definition  *\([^ ].* \)*src=" $xmlfile | sed -e 's/.*src="\([^"]*\)".*/\1/' ) 
    6565    xmlfield_def=$( dirname $xmlfile )/$xmlfield_def    
    6666else 
    6767    xmlfield_def=$xmlfile 
    6868fi 
    69 [ $inxml -eq 1 ] && grep "< *field * id *=" $xmlfield_def 
     69[ $inxml -eq 1 ] && grep "< *field  *\([^ ].* \)*id *=" $xmlfield_def 
    7070[ $insrc -eq 1 ] && find $srcdir -name "*.[Ffh]90" -exec grep -iH "^[^\!]*call  *iom_put *(" {} \; 
    7171[ $(( $insrc + $inxml )) -ge 1 ] && exit 
     
    9191# list of variables defined in the xml file 
    9292# 
    93 varlistxml=$( grep "< *field.* id *=" $xmlfield_def  | sed -e "s/^.*< *field.* id *= *[\"\']\([^\"\']*\)[\"\'].*/\1/" | sort -d ) 
     93varlistxml=$( grep "< *field  *\([^ ].* \)*id *=" $xmlfield_def  | sed -e "s/^.*< *field .*id *= *[\"\']\([^\"\']*\)[\"\'].*/\1/" | sort -d ) 
    9494# 
    9595# list of variables to be outputed in the xml file 
    9696# 
    97 varlistout=$( grep "< *field.* field_ref *=" $xmlfile  | sed -e "s/^.*< *field.* field_ref *= *[\"\']\([^\"\']*\)[\"\'].*/\1/" | sort -d ) 
     97varlistout=$( grep "< *field  *\([^ ].* \)*field_ref *=" $xmlfile  | sed -e "s/^.*< *field .*field_ref *= *[\"\']\([^\"\']*\)[\"\'].*/\1/" | sort -d ) 
    9898# 
    9999echo "--------------------------------------------------" 
  • branches/2013/dev_LOCEAN_2013/NEMOGCM/TOOLS/maketools

    r3294 r4162  
    146146 
    147147#- When used for the first time, choose a compiler --- 
    148 . ${COMPIL_DIR}/Fcheck_archfile.sh arch_tools.fcm ${CMP_NAM} || exit 
     148. ${COMPIL_DIR}/Fcheck_archfile.sh arch_tools.fcm nocpp ${CMP_NAM} || exit 
    149149 
    150150#- Choose a default tool if needed --- 
Note: See TracChangeset for help on using the changeset viewer.