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 2073 – NEMO

Changeset 2073


Ignore:
Timestamp:
2010-09-08T16:58:59+02:00 (14 years ago)
Author:
djlea
Message:

Code tidy

Location:
branches/dev_1784_ASM/NEMO/OPA_SRC
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/dev_1784_ASM/NEMO/OPA_SRC/ASM/asminc.F90

    r2062 r2073  
    109109#endif 
    110110 
    111    LOGICAL, PUBLIC :: &  
    112       & ln_bkgwri = .FALSE., & !: No output of the background state fields 
    113       & ln_trjwri = .FALSE., & !: No output of the state trajectory fields 
    114       & ln_asmiau = .FALSE., & !: No applying forcing with an assimilation increment 
    115       & ln_asmdin = .FALSE., & !: No direct initialization 
    116       & ln_trainc = .FALSE., & !: No tracer (T and S) assimilation increments 
    117       & ln_dyninc = .FALSE., & !: No dynamics (u and v) assimilation increments 
    118       & ln_sshinc = .FALSE., & !: No sea surface height assimilation increment 
    119       & ln_salfix = .FALSE.    !: Apply minimum salinity check 
    120  
    121    REAL, PUBLIC :: & 
    122       & salfixmin              !: Ensure that the salinity is larger than  
     111   LOGICAL, PUBLIC :: ln_bkgwri = .FALSE. !: No output of the background state fields 
     112   LOGICAL, PUBLIC :: ln_trjwri = .FALSE. !: No output of the state trajectory fields 
     113   LOGICAL, PUBLIC :: ln_asmiau = .FALSE. !: No applying forcing with an assimilation increment 
     114   LOGICAL, PUBLIC :: ln_asmdin = .FALSE. !: No direct initialization 
     115   LOGICAL, PUBLIC :: ln_trainc = .FALSE. !: No tracer (T and S) assimilation increments 
     116   LOGICAL, PUBLIC :: ln_dyninc = .FALSE. !: No dynamics (u and v) assimilation increments 
     117   LOGICAL, PUBLIC :: ln_sshinc = .FALSE. !: No sea surface height assimilation increment 
     118   LOGICAL, PUBLIC :: ln_salfix = .FALSE. !: Apply minimum salinity check 
     119 
     120   REAL, PUBLIC :: salfixmin   !: Ensure that the salinity is larger than  
    123121   !                           !: this  value if (ln_salfix) 
    124122#if defined key_asminc 
     
    126124      & ssh_iau           !: IAU-weighted sea surface height increment 
    127125#endif 
    128    INTEGER, PUBLIC :: & 
    129       & nitbkg,    &   !: Time step of the background state used in the Jb term 
    130                        !: (relative to the cycle interval [0,nitend-nit000-1]) 
    131       & nitdin,    &   !: Time step of the background state for direct initialization 
    132                        !: (relative to the cycle interval [0,nitend-nit000-1]) 
    133       & nitiaustr, &   !: Time step of the start of the IAU interval  
    134                        !: (relative to the cycle interval [0,nitend-nit000-1]) 
    135                        !:  
    136       & nitiaufin, &   !: Time step of the end of the IAU interval  
    137                        !: (relative to the cycle interval [0,nitend-nit000-1]) 
    138       & niaufn         !: Type of IAU weighing function 
    139                        !:   0 = Constant weighting 
    140                        !:   1 = Linear hat-like, centred in middle of IAU interval  
     126 
     127   INTEGER, PUBLIC :: nitbkg     !: Time step of the background state used in the Jb term 
     128                                 !: (relative to the cycle interval [0,nitend-nit000-1]) 
     129   INTEGER, PUBLIC :: nitdin     !: Time step of the background state for direct initialization 
     130                                 !: (relative to the cycle interval [0,nitend-nit000-1]) 
     131   INTEGER, PUBLIC :: nitiaustr  !: Time step of the start of the IAU interval  
     132                                 !: (relative to the cycle interval [0,nitend-nit000-1]) 
     133   INTEGER, PUBLIC :: nitiaufin  !: Time step of the end of the IAU interval  
     134                                 !: (relative to the cycle interval [0,nitend-nit000-1]) 
     135   INTEGER, PUBLIC :: niaufn     !: Type of IAU weighing function 
     136                                 !:   0 = Constant weighting 
     137                                 !:   1 = Linear hat-like, centred in middle of IAU interval  
    141138 
    142139CONTAINS 
     
    167164 
    168165      !! * Local declarations 
    169       INTEGER :: & 
    170          & jt 
    171       INTEGER :: & 
    172          & imid,           & 
    173          & inum,           & 
    174          & iiauper,        & ! Number of time steps in the IAU period 
    175          & icycper,        & ! Number of time steps in the cycle 
    176          & iitend_date,    & ! Date YYYYMMDD of final time step 
    177          & iitbkg_date,    & ! Date YYYYMMDD of background time step for Jb term 
    178          & iitdin_date,    & ! Date YYYYMMDD of background time step for DI 
    179          & iitiaustr_date, & ! Date YYYYMMDD of IAU interval start time step 
    180          & iitiaufin_date    ! Date YYYYMMDD of IAU interval final time step 
    181       REAL(wp) :: & 
    182          & znorm,       & ! Normalization factor for IAU weights 
    183          & ztotwgt,     & ! Value of time-integrated IAU weights  
    184                           ! (should be equal to one) 
    185          & z_inc_dateb, & ! Start date of interval on which increment is valid 
    186          & z_inc_datef, & ! End date of interval on which increment is valid 
    187          & zdate_bkg      ! Date in background state file for DI 
    188       REAL(wp) :: & 
    189          & zdate_inc      ! Time axis in increments file 
     166      INTEGER :: jt 
     167 
     168      INTEGER :: imid 
     169      INTEGER :: inum 
     170      INTEGER :: iiauper         ! Number of time steps in the IAU period 
     171      INTEGER :: icycper         ! Number of time steps in the cycle 
     172      INTEGER :: iitend_date     ! Date YYYYMMDD of final time step 
     173      INTEGER :: iitbkg_date     ! Date YYYYMMDD of background time step for Jb term 
     174      INTEGER :: iitdin_date     ! Date YYYYMMDD of background time step for DI 
     175      INTEGER :: iitiaustr_date  ! Date YYYYMMDD of IAU interval start time step 
     176      INTEGER :: iitiaufin_date  ! Date YYYYMMDD of IAU interval final time step 
     177 
     178      REAL(wp) :: znorm        ! Normalization factor for IAU weights 
     179      REAL(wp) :: ztotwgt      ! Value of time-integrated IAU weights  
     180                               ! (should be equal to one) 
     181      REAL(wp) :: z_inc_dateb  ! Start date of interval on which increment is valid 
     182      REAL(wp) :: z_inc_datef  ! End date of interval on which increment is valid 
     183      REAL(wp) :: zdate_bkg    ! Date in background state file for DI 
     184      REAL(wp) :: zdate_inc    ! Time axis in increments file 
    190185 
    191186      !----------------------------------------------------------------------- 
     
    584579 
    585580      !! * Arguments 
    586       INTEGER, INTENT(IN) :: & 
    587          & kit000, &  ! Initial time step 
    588          & kt,     &  ! Current time step referenced to kit000 
    589          & kdate0     ! Initial date 
    590       INTEGER, INTENT(OUT) :: & 
    591          & kdate      ! Current date reference to kdate0 
     581 
     582      INTEGER, INTENT(IN) :: kit000  ! Initial time step 
     583      INTEGER, INTENT(IN) :: kt      ! Current time step referenced to kit000 
     584      INTEGER, INTENT(IN) :: kdate0  ! Initial date 
     585      INTEGER, INTENT(OUT) :: kdate  ! Current date reference to kdate0 
    592586 
    593587      !! * Local declarations 
    594       INTEGER :: & 
    595          & iyea0,   & ! Initial year 
    596          & imon0,   & ! Initial month 
    597          & iday0,   & ! Initial day 
    598          & iyea,    & ! Current year 
    599          & imon,    & ! Current month 
    600          & iday,    & ! Current day 
    601          & idaystp, & ! Number of days between initial and current date 
    602          & idaycnt    ! Day counter 
     588 
     589      INTEGER :: iyea0    ! Initial year 
     590      INTEGER :: imon0    ! Initial month 
     591      INTEGER :: iday0    ! Initial day 
     592      INTEGER :: iyea    ! Current year 
     593      INTEGER :: imon    ! Current month 
     594      INTEGER :: iday    ! Current day 
     595      INTEGER :: idaystp ! Number of days between initial and current date 
     596      INTEGER :: idaycnt  ! Day counter 
    603597 
    604598      INTEGER, DIMENSION(12) ::   imonth_len    !: length in days of the months of the current year 
     
    701695 
    702696      !! * Arguments 
    703       INTEGER, INTENT(IN) :: & 
    704          & kt               ! Current time step 
     697      INTEGER, INTENT(IN) :: kt               ! Current time step 
    705698 
    706699      !! * Local declarations 
    707       INTEGER :: & 
    708          & ji,jj,jk 
    709       INTEGER :: & 
    710          & it 
    711       REAL(wp) :: & 
    712          & zincwgt  ! IAU weight for current time step 
     700      INTEGER :: ji,jj,jk 
     701      INTEGER :: it 
     702      REAL(wp) :: zincwgt  ! IAU weight for current time step 
    713703 
    714704      IF ( ln_asmiau ) THEN 
     
    743733                        sa(ji,jj,jk) = MAX( sa(ji,jj,jk), salfixmin ) 
    744734                     END DO 
    745                   ENDDO 
     735                  END DO 
    746736               END DO 
    747737            ENDIF 
     
    776766                        sn(ji,jj,jk) = MAX( sn(ji,jj,jk), salfixmin ) 
    777767                     END DO 
    778                   ENDDO 
     768                  END DO 
    779769               END DO 
    780770            ENDIF 
     
    818808 
    819809      !! * Arguments 
    820       INTEGER, INTENT(IN) :: & 
    821          & kt   ! Current time step 
     810      INTEGER, INTENT(IN) :: kt   ! Current time step 
    822811 
    823812      !! * Local declarations 
    824       INTEGER :: & 
    825          & jk 
    826       INTEGER :: & 
    827          & it 
    828       REAL(wp) :: & 
    829          & zincwgt  ! IAU weight for current time step 
     813      INTEGER :: jk 
     814      INTEGER :: it 
     815      REAL(wp) :: zincwgt  ! IAU weight for current time step 
    830816 
    831817      IF ( ln_asmiau ) THEN 
     
    912898 
    913899      !! * Arguments 
    914       INTEGER, INTENT(IN) :: & 
    915          & kt   ! Current time step 
     900      INTEGER, INTENT(IN) :: kt   ! Current time step 
    916901 
    917902      !! * Local declarations 
    918       INTEGER :: & 
    919          & it 
    920       REAL(wp) :: & 
    921          & zincwgt  ! IAU weight for current time step 
     903      INTEGER :: it 
     904      REAL(wp) :: zincwgt  ! IAU weight for current time step 
    922905 
    923906      IF ( ln_asmiau ) THEN 
  • branches/dev_1784_ASM/NEMO/OPA_SRC/ASM/asmpar.F90

    r2002 r2073  
    2424                                                   !: state 
    2525 
    26    INTEGER, PUBLIC :: &           
    27       & nitbkg_r,    &    !: Background time step referenced to nit000 
    28       & nitdin_r,    &    !: Direct Initialization time step referenced to nit000 
    29       & nitiaustr_r, &    !: IAU starting time step referenced to nit000 
    30       & nitiaufin_r, &    !: IAU final time step referenced to nit000 
    31       & nittrjfrq         !: Frequency of trajectory output for 4D-VAR 
     26   INTEGER, PUBLIC :: nitbkg_r      !: Background time step referenced to nit000 
     27   INTEGER, PUBLIC :: nitdin_r      !: Direct Initialization time step referenced to nit000 
     28   INTEGER, PUBLIC :: nitiaustr_r   !: IAU starting time step referenced to nit000 
     29   INTEGER, PUBLIC :: nitiaufin_r   !: IAU final time step referenced to nit000 
     30   INTEGER, PUBLIC :: nittrjfrq     !: Frequency of trajectory output for 4D-VAR 
    3231 
    3332END MODULE asmpar 
  • branches/dev_1784_ASM/NEMO/OPA_SRC/ASM/asmtrj.F90

    r2002 r2073  
    7777 
    7878      !! * Arguments 
    79       INTEGER, INTENT( IN ) :: & 
    80          & kt               ! Current time-step 
     79      INTEGER, INTENT( IN ) :: kt               ! Current time-step 
    8180 
    8281      !! * Local declarations 
    83       CHARACTER (LEN=50) :: & 
    84          & cl_asmbkg, & 
    85          & cl_asmdin 
    86       LOGICAL :: & 
    87          & llok             ! Check if file exists 
    88       INTEGER :: & 
    89          & inum             ! File unit number 
    90       REAL(wp) :: & 
    91          & zdate            ! Date 
     82      CHARACTER (LEN=50) :: cl_asmbkg 
     83      CHARACTER (LEN=50) :: cl_asmdin 
     84      LOGICAL :: llok          ! Check if file exists 
     85      INTEGER :: inum          ! File unit number 
     86      REAL(wp) :: zdate        ! Date 
    9287 
    9388      !-------------------------------------------------------------------- 
     
    198193 
    199194      !! * Arguments 
    200       INTEGER, INTENT( IN ) :: & 
    201          & kt                    ! Current time-step 
     195      INTEGER, INTENT( IN ) :: kt             ! Current time-step 
    202196 
    203197      !! * Local declarations 
    204       INTEGER :: & 
    205          & inum                  ! File unit number 
    206       INTEGER :: & 
    207          & it 
    208       CHARACTER (LEN=50) :: & 
    209          & cl_asmtrj 
    210       REAL(wp) :: & 
    211          & zdate            ! Date 
     198      INTEGER :: inum                  ! File unit number 
     199      INTEGER :: it 
     200      CHARACTER (LEN=50) :: cl_asmtrj 
     201      REAL(wp) :: zdate            ! Date 
    212202 
    213203      !------------------------------------------------------------------------ 
  • branches/dev_1784_ASM/NEMO/OPA_SRC/lib_mpp.F90

    r1718 r2073  
    7171   PUBLIC   mpprecv, mppsend, mppscatter, mppgather 
    7272   PUBLIC   mppobc, mpp_ini_ice, mpp_ini_znl 
    73 #if defined key_oasis3 || defined key_oasis4 
    74    PUBLIC   mppsize, mpprank 
    75 #endif 
     73   PUBLIC   mppsize, mpprank, mpi_comm_opa 
    7674 
    7775   !! * Interfaces 
Note: See TracChangeset for help on using the changeset viewer.