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 5208 for branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/TOOLS – NEMO

Ignore:
Timestamp:
2015-04-13T15:08:59+02:00 (9 years ago)
Author:
davestorkey
Message:

Merge in changes from trunk up to 5021.

Location:
branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/TOOLS
Files:
11 edited
11 copied

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/TOOLS/COMPILE/Fadd_keys.sh

    r2603 r5208  
    3333# 
    3434# 
    35 # Script to add a set off key when compiling a configuration. 
    36 # The list off key to be added has to be enclosed with " ".  
     35# Script to add a set of key when compiling a configuration. 
     36# The list of key to be added has to be enclosed with " ".  
    3737# A 'sed' is performed to modify the CONFIG_NAME/cpp.fcm file to     
    3838# add the new key(s).  
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/TOOLS/COMPILE/Fcheck_config.sh

    r3294 r5208  
    3939# - Nothing set, use the previous in use  
    4040# 
    41 # We use TOOLS/CONFIG_DIR/cfg.txt to check if the onfiguration exists. 
     41# We use TOOLS/CONFIG_DIR/cfg.txt to check if the configuration exists. 
    4242# 
    4343# EXAMPLES 
     
    7676   echo "Use makenemo -n MYCONFIG" 
    7777   echo "or  makenemo -h for help" 
    78    echo "Using defaut configuration : ${NEW_CONF}" 
     78   echo "Using default configuration : ${NEW_CONF}" 
    7979fi 
    8080if [ "$1" == cfg.txt ]; then 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/TOOLS/COMPILE/Fclean_var.sh

    r3294 r5208  
    1111# 
    1212# ---------------------------- 
    13 # Clean environement variables 
     13# Clean environment variables 
    1414# ---------------------------- 
    1515# 
     
    2626# 
    2727# 
    28 # Clean environement variables 
     28# Clean environment variables 
    2929# 
    3030# EXAMPLES 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/TOOLS/COMPILE/Fcopy_dir.sh

    r3294 r5208  
    2626# 
    2727# 
    28 # When a refenrence configuration is set,  
     28# When a reference configuration is set,  
    2929# Copy NEMO sub-directories needed (OPA_SRC, TOP_SRC ...) 
    3030# 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/TOOLS/COMPILE/Fdel_keys.sh

    r2584 r5208  
    3434# 
    3535# Add cpp keys when compiling a configuration, key list has to be enclosed with " ". 
    36 # We perform a 'sed' on the CONFIG_NAME/CPP.fcm file, contianing the list of keys.  
     36# We perform a 'sed' on the CONFIG_NAME/CPP.fcm file, containing the list of keys.  
    3737# 
    3838# EXAMPLES 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/TOOLS/COMPILE/Fmake_WORK.sh

    r3680 r5208  
    3535# Make the WORK directory: 
    3636# 
    37 # - Create lin in NEW_CONF/WORK 
     37# - Create line in NEW_CONF/WORK 
    3838# - Use specified sub-directories previously 
    3939# - OPA has to be done first !!! 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/TOOLS/COMPILE/bld.cfg

    r3695 r5208  
    2424 
    2525 
     26bld::tool::cpp       %CPP 
     27bld::tool::fpp       %CPP 
    2628bld::tool::fc        %FC  
    2729bld::tool::fflags    %FCFLAGS %USER_INC 
     
    5153bld::excl_dep        inc::mpe_logf.h 
    5254bld::excl_dep        use::mpi 
    53 bld::excl_dep        use::mod_prism_proto 
    54 bld::excl_dep        use::mod_prism_def_partition_proto 
    55 bld::excl_dep        use::mod_prism_get_comm 
    56 bld::excl_dep        use::mod_prism_get_proto 
    57 bld::excl_dep        use::mod_prism_put_proto 
    58 bld::excl_dep        use::mod_comprism_proto 
     55bld::excl_dep        use::mod_oasis 
    5956bld::excl_dep        use::mkl_dfti 
    6057# Don't generate interface files 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/TOOLS/COMPILE/bld_preproagr.cfg

    r3850 r5208  
    3434bld::pp::nemo     1 
    3535bld::pp::nemo/agrif2model     0 
    36 bld::tool::fpp       cpp 
     36bld::tool::cpp       %CPP 
     37bld::tool::fpp       %CPP 
    3738bld::tool::fppflags::nemo  %FPPFLAGS 
    3839 
     
    4647bld::excl_dep        inc::mpe_logf.h 
    4748bld::excl_dep        use::mpi 
    48 bld::excl_dep        use::mod_prism_proto 
    49 bld::excl_dep        use::mod_prism_def_partition_proto 
    50 bld::excl_dep        use::mod_prism_get_comm 
    51 bld::excl_dep        use::mod_prism_get_proto 
    52 bld::excl_dep        use::mod_prism_put_proto 
    53 bld::excl_dep        use::mod_comprism_proto 
     49bld::excl_dep        use::mod_oasis 
    5450bld::excl_dep        use::mkl_dfti 
    5551bld::excl_dep       use::nc4interface 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/TOOLS/COMPILE/bld_tools.cfg

    r2281 r5208  
    1616dir::root            $NEMO_TDIR/$NEW_CONF/BLD 
    1717 
     18bld::tool::cpp       %CPP 
     19bld::tool::fpp       %CPP 
    1820bld::tool::fc        %FC  
    1921bld::tool::fflags    %FCFLAGS %USER_INC 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/TOOLS/COMPILE/bldxag.cfg

    r3695 r5208  
    2323 
    2424 
     25bld::tool::cpp       %CPP 
     26bld::tool::fpp       %CPP 
    2527bld::tool::fc        %FC  
    2628bld::tool::fflags    %FCFLAGS %USER_INC 
     
    4749bld::excl_dep        inc::mpe_logf.h 
    4850bld::excl_dep        use::mpi 
    49 bld::excl_dep        use::mod_prism_proto 
    50 bld::excl_dep        use::mod_prism_def_partition_proto 
    51 bld::excl_dep        use::mod_prism_get_comm 
    52 bld::excl_dep        use::mod_prism_get_proto 
    53 bld::excl_dep        use::mod_prism_put_proto 
    54 bld::excl_dep        use::mod_comprism_proto 
     51bld::excl_dep        use::mod_oasis 
    5552bld::excl_dep        use::mkl_dfti 
    5653# Don't generate interface files 
  • branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/TOOLS/OBSTOOLS/src/date_utils.F90

    r3000 r5208  
    3434 
    3535   END SUBROUTINE add_date 
     36 
     37 
     38   SUBROUTINE add_days_to_date(initial_date,days,final_date) 
     39 
     40      ! Add a number of days to initial_date and return it in final_date 
     41 
     42      IMPLICIT NONE 
     43 
     44 
     45      !! Arguments 
     46      INTEGER,INTENT(in) :: initial_date ! Initial date (YYYYMMDD) 
     47      INTEGER,INTENT(in) :: days         ! Number of days to add 
     48      INTEGER,INTENT(out) :: final_date  ! Final date (YYYYMMDD) 
     49 
     50      !! Local variables 
     51 
     52      INTEGER :: isec,imin,ihours,iyear,imon,iday ! temporary results 
     53      REAL(dp):: juld 
     54 
     55      ! Account for lack of hours in date format (initial_date*100) 
     56      CALL split_date(initial_date*100,iyear,imon,iday,ihours) 
     57 
     58      CALL greg2jul(0,0,ihours,iday,imon,iyear,juld) 
     59 
     60      juld=juld+REAL(days) 
     61 
     62      CALL jul2greg(isec,imin,ihours,iday,imon,iyear,juld) 
     63 
     64      final_date=(iyear*1000000+imon*10000+iday*100+ihours)/100 
     65 
     66   END SUBROUTINE add_days_to_date 
     67 
    3668 
    3769   SUBROUTINE split_date(iyyyymmddhh,iyyyy,imm,idd,ihh) 
     
    379411   END FUNCTION diffdate 
    380412 
     413   INTEGER FUNCTION difftime(itime1,itime2) 
     414 
     415      ! Compute difference in minutes between times 
     416      ! Assumes HHMM or HMM or MM or M format for dates 
     417      ! 
     418      ! ORDER MATTERS - itime1 is ealier time 
     419      ! Result is an integer number of minutes 
     420 
     421      IMPLICIT NONE 
     422      INTEGER, INTENT(IN) :: itime1,itime2    ! Times to be diffed. 
     423      INTEGER :: imin1, imin2, ihr1, ihr2 
     424 
     425      ihr1 = (itime1/100) 
     426      ihr2 = (itime2/100) 
     427       
     428      imin1 = (itime1 - ihr1*100) + (60 * ihr1) 
     429      imin2 = (itime2 - ihr2*100) + (60 * ihr2) 
     430       
     431      ! Assume that itime2 is later, so wrap around midnight if necessary. 
     432      IF (imin2 < imin1) THEN 
     433         imin2 = imin2 + 24*60 
     434      END IF 
     435       
     436      difftime = imin2 - imin1 
     437       
     438   END FUNCTION difftime 
     439 
     440 
     441   INTEGER FUNCTION add_mins_to_time(itime1, imin_add) 
     442 
     443      ! Add number of minutes onto given time 
     444      ! Assumes time in HHMM or HMM or MM or M format 
     445      ! 
     446      ! Result is in HHMM format 
     447 
     448      IMPLICIT NONE 
     449      INTEGER, INTENT(IN) :: itime1,imin_add 
     450      INTEGER :: imin1, ihr1, imin2, ihr2 
     451 
     452      ihr1 = (itime1/100) 
     453       
     454      ! itime1 in minutes from previous midnight 
     455      imin1 = (itime1 - ihr1*100) + (60 * ihr1) 
     456       
     457      imin1 = imin1 + imin_add 
     458       
     459      ! Add 1day if time went nagative 
     460      IF (imin1 < 0) THEN 
     461         imin1 = imin1 + 24*60 
     462      END IF 
     463       
     464      ! Turn number of minutes back into HHMM 
     465      ihr2 = imin1/60 
     466      imin2 = imin1 - ihr2*60 
     467 
     468      DO 
     469         IF (ihr2<0) THEN 
     470            ihr2 = ihr2 + 24 
     471         ELSE IF (ihr2>=24) THEN 
     472            ihr2 = ihr2 - 24 
     473         END IF 
     474         IF ((ihr2>=0).OR.(ihr2<24)) EXIT 
     475      END DO 
     476 
     477      add_mins_to_time = ihr2*100 + imin2 
     478    
     479   END FUNCTION add_mins_to_time 
     480 
    381481 
    382482END MODULE date_utils 
Note: See TracChangeset for help on using the changeset viewer.