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 9490 for branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/OBS/obs_oper.F90 – NEMO

Ignore:
Timestamp:
2018-04-23T10:44:07+02:00 (6 years ago)
Author:
gm
Message:

#2075 - dev_merge_2017: scale-aware setting of lateral viscous and diffusive coefficient

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/OBS/obs_oper.F90

    r9023 r9490  
    1010   !!   obs_surf_opt :    Compute the model counterpart of surface data 
    1111   !!---------------------------------------------------------------------- 
    12  
    13    !! * Modules used 
    14    USE par_kind, ONLY : &         ! Precision variables 
    15       & wp 
    16    USE in_out_manager             ! I/O manager 
    17    USE obs_inter_sup              ! Interpolation support 
    18    USE obs_inter_h2d, ONLY : &    ! Horizontal interpolation to the obs pt 
    19       & obs_int_h2d, & 
    20       & obs_int_h2d_init 
    21    USE obs_averg_h2d, ONLY : &    ! Horizontal averaging to the obs footprint 
    22       & obs_avg_h2d, & 
    23       & obs_avg_h2d_init, & 
    24       & obs_max_fpsize 
    25    USE obs_inter_z1d, ONLY : &    ! Vertical interpolation to the obs pt 
    26       & obs_int_z1d,    & 
    27       & obs_int_z1d_spl 
    28    USE obs_const,  ONLY :    &    ! Obs fill value 
    29       & obfillflt 
    30    USE dom_oce,       ONLY : & 
    31       & glamt, glamf, & 
    32       & gphit, gphif 
    33    USE lib_mpp,       ONLY : &    ! Warning and stopping routines 
    34       & ctl_warn, ctl_stop 
    35    USE sbcdcy,        ONLY : &    ! For calculation of where it is night-time 
    36       & sbc_dcy, nday_qsr 
    37    USE obs_grid,      ONLY : &  
    38       & obs_level_search      
     12   USE obs_inter_sup                                        ! Interpolation support 
     13   USE obs_inter_h2d, ONLY : obs_int_h2d, obs_int_h2d_init  ! Horizontal interpolation to the obs pt 
     14   USE obs_averg_h2d, ONLY : obs_avg_h2d, obs_avg_h2d_init, obs_max_fpsize    ! Horizontal averaging to the obs footprint 
     15   USE obs_inter_z1d, ONLY : obs_int_z1d, obs_int_z1d_spl   ! Vertical interpolation to the obs pt 
     16   USE obs_const    , ONLY : obfillflt                      ! Obs fill value 
     17   USE dom_oce,       ONLY :   glamt, glamf, gphit, gphif   ! lat/lon of ocean grid-points 
     18   USE lib_mpp,       ONLY :   ctl_warn, ctl_stop           ! Warning and stopping routines 
     19   USE sbcdcy,        ONLY :   sbc_dcy, nday_qsr            ! For calculation of where it is night-time 
     20   USE obs_grid,      ONLY :   obs_level_search      
     21   ! 
     22   USE par_kind     , ONLY :   wp   ! Precision variables 
     23   USE in_out_manager               ! I/O manager 
    3924 
    4025   IMPLICIT NONE 
    41  
    42    !! * Routine accessibility 
    4326   PRIVATE 
    4427 
    45    PUBLIC obs_prof_opt, &  ! Compute the model counterpart of profile obs 
    46       &   obs_surf_opt     ! Compute the model counterpart of surface obs 
    47  
    48    INTEGER, PARAMETER, PUBLIC :: & 
    49       & imaxavtypes = 20   ! Max number of daily avgd obs types 
     28   PUBLIC   obs_prof_opt   !: Compute the model counterpart of profile obs 
     29   PUBLIC   obs_surf_opt   !: Compute the model counterpart of surface obs 
     30 
     31   INTEGER, PARAMETER, PUBLIC ::   imaxavtypes = 20   !: Max number of daily avgd obs types 
    5032 
    5133   !!---------------------------------------------------------------------- 
    52    !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
     34   !! NEMO/OPA 4.0 , NEMO Consortium (2018) 
    5335   !! $Id$ 
    5436   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    5537   !!---------------------------------------------------------------------- 
    56  
    5738CONTAINS 
    58  
    5939 
    6040   SUBROUTINE obs_prof_opt( prodatqc, kt, kpi, kpj, kpk,          & 
     
    6444      &                     plam1, plam2, pphi1, pphi2,           & 
    6545      &                     k1dint, k2dint, kdailyavtypes ) 
    66  
    6746      !!----------------------------------------------------------------------- 
    68       !! 
    6947      !!                     ***  ROUTINE obs_pro_opt  *** 
    7048      !! 
     
    11492      !!      ! 17-02 (M. Martin) Include generalised vertical coordinate changes 
    11593      !!----------------------------------------------------------------------- 
    116  
    117       !! * Modules used 
    11894      USE obs_profiles_def ! Definition of storage space for profile obs. 
    11995 
    12096      IMPLICIT NONE 
    12197 
    122       !! * Arguments 
    123       TYPE(obs_prof), INTENT(INOUT) :: & 
    124          & prodatqc                  ! Subset of profile data passing QC 
    125       INTEGER, INTENT(IN) :: kt      ! Time step 
    126       INTEGER, INTENT(IN) :: kpi     ! Model grid parameters 
    127       INTEGER, INTENT(IN) :: kpj 
    128       INTEGER, INTENT(IN) :: kpk 
    129       INTEGER, INTENT(IN) :: kit000  ! Number of the first time step 
    130                                      !   (kit000-1 = restart time) 
    131       INTEGER, INTENT(IN) :: k1dint  ! Vertical interpolation type (see header) 
    132       INTEGER, INTENT(IN) :: k2dint  ! Horizontal interpolation type (see header) 
    133       INTEGER, INTENT(IN) :: kdaystp ! Number of time steps per day 
    134       REAL(KIND=wp), INTENT(IN), DIMENSION(kpi,kpj,kpk) :: & 
    135          & pvar1,    &               ! Model field 1 
    136          & pvar2,    &               ! Model field 2 
    137          & pmask1,   &               ! Land-sea mask 1 
    138          & pmask2                    ! Land-sea mask 2 
    139       REAL(KIND=wp), INTENT(IN), DIMENSION(kpi,kpj) :: & 
    140          & plam1,    &               ! Model longitudes for variable 1 
    141          & plam2,    &               ! Model longitudes for variable 2 
    142          & pphi1,    &               ! Model latitudes for variable 1 
    143          & pphi2                     ! Model latitudes for variable 2 
    144       REAL(KIND=wp), INTENT(IN), DIMENSION(kpi,kpj,kpk) :: &  
    145          & pgdept, &                 ! Model array of depth T levels  
    146          & pgdepw                    ! Model array of depth W levels  
    147       INTEGER, DIMENSION(imaxavtypes), OPTIONAL :: & 
    148          & kdailyavtypes             ! Types for daily averages 
     98      TYPE(obs_prof), INTENT(inout) ::   prodatqc        ! Subset of profile data passing QC 
     99      INTEGER       , INTENT(in   ) ::   kt              ! Time step 
     100      INTEGER       , INTENT(in   ) ::   kpi, kpj, kpk   ! Model grid parameters 
     101      INTEGER       , INTENT(in   ) ::   kit000          ! Number of the first time step (kit000-1 = restart time) 
     102      INTEGER       , INTENT(in   ) ::   k1dint          ! Vertical interpolation type (see header) 
     103      INTEGER       , INTENT(in   ) ::   k2dint          ! Horizontal interpolation type (see header) 
     104      INTEGER       , INTENT(in   ) ::   kdaystp         ! Number of time steps per day 
     105      REAL(KIND=wp) , INTENT(in   ), DIMENSION(kpi,kpj,kpk) ::   pvar1 , pvar2    ! Model field     1 and 2 
     106      REAL(KIND=wp) , INTENT(in   ), DIMENSION(kpi,kpj,kpk) ::   pmask1, pmask2   ! Land-sea mask   1 and 2 
     107      REAL(KIND=wp) , INTENT(in   ), DIMENSION(kpi,kpj)     ::   plam1 , plam2    ! Model longitude 1 and 2 
     108      REAL(KIND=wp) , INTENT(in   ), DIMENSION(kpi,kpj)     ::   pphi1 , pphi2    ! Model latitudes 1 and 2 
     109      REAL(KIND=wp) , INTENT(in   ), DIMENSION(kpi,kpj,kpk) ::   pgdept, pgdepw   ! depth of T and W levels  
     110      INTEGER, DIMENSION(imaxavtypes), OPTIONAL ::   kdailyavtypes             ! Types for daily averages 
    149111 
    150112      !! * Local declarations 
     
    706668      !!      ! 17-03 (M. Martin) Added horizontal averaging options 
    707669      !!----------------------------------------------------------------------- 
    708  
    709       !! * Modules used 
    710670      USE obs_surf_def  ! Definition of storage space for surface observations 
    711671 
    712672      IMPLICIT NONE 
    713673 
    714       !! * Arguments 
    715674      TYPE(obs_surf), INTENT(INOUT) :: & 
    716675         & surfdataqc                  ! Subset of surface data passing QC 
     
    866825         DO ji = 0, imaxifp 
    867826            imodi = surfdataqc%mi(jobs) - int(imaxifp/2) + ji - 1 
    868              
     827            ! 
    869828            !Deal with wrap around in longitude 
    870829            IF ( imodi < 1      ) imodi = imodi + jpiglo 
    871830            IF ( imodi > jpiglo ) imodi = imodi - jpiglo 
    872              
     831            ! 
    873832            DO jj = 0, imaxjfp 
    874833               imodj = surfdataqc%mj(jobs) - int(imaxjfp/2) + jj - 1 
     
    877836               IF ( imodj < 1      ) imodj = 1 
    878837               IF ( imodj > jpjglo ) imodj = jpjglo 
    879  
     838               ! 
    880839               igrdip1(ji+1,jj+1,iobs) = imodi 
    881840               igrdjp1(ji+1,jj+1,iobs) = imodj 
    882                 
     841               ! 
    883842               IF ( ji >= 1 .AND. jj >= 1 ) THEN 
    884843                  igrdi(ji,jj,iobs) = imodi 
    885844                  igrdj(ji,jj,iobs) = imodj 
    886845               ENDIF 
    887                 
     846               ! 
    888847            END DO 
    889848         END DO 
     
    1010969            & ) 
    1011970      ENDIF 
    1012  
     971      ! 
    1013972      surfdataqc%nsurfup = surfdataqc%nsurfup + isurf 
    1014  
     973      ! 
    1015974   END SUBROUTINE obs_surf_opt 
    1016975 
     976   !!====================================================================== 
    1017977END MODULE obs_oper 
Note: See TracChangeset for help on using the changeset viewer.