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

Changeset 8695


Ignore:
Timestamp:
2017-11-10T16:31:19+01:00 (6 years ago)
Author:
dford
Message:

Try and tidy up setting of interpolation options.

Location:
branches/UKMO/dev_r5518_obs_oper_update_bgc3d/NEMOGCM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_obs_oper_update_bgc3d/NEMOGCM/CONFIG/SHARED/namelist_ref

    r7992 r8695  
    12131213   ln_s_at_t  = .false.             ! Logical switch for computing model S at T obs if not there 
    12141214   ln_sstnight = .false.            ! Logical switch for calculating night-time average for SST obs 
    1215    ln_sla_fp_indegs = .true.        ! Logical: T=> averaging footpring is in degrees, F=> in metres 
     1215   ln_default_fp_indegs = .true.    ! Logical: T=> averaging footprint is in degrees, F=> in metres 
     1216   ln_sla_fp_indegs = .true.        ! Logical: T=> averaging footprint is in degrees, F=> in metres 
    12161217   ln_sst_fp_indegs = .true. 
    12171218   ln_sss_fp_indegs = .true. 
     
    12281229   cn_gridsearchfile = 'gridsearch.nc' ! Grid search file name 
    12291230   rn_gridsearchres = 0.5              ! Grid search resolution 
     1231   rn_default_avglamscl = 0.           ! Default E/W diameter of observation footprint (metres/degrees) 
     1232   rn_default_avgphiscl = 0.           ! Default N/S diameter of observation footprint (metres/degrees) 
    12301233   rn_sla_avglamscl = 0.               ! E/W diameter of SLA observation footprint (metres/degrees) 
    12311234   rn_sla_avgphiscl = 0.               ! N/S diameter of SLA observation footprint (metres/degrees) 
    1232    rn_sst_avglamscl = 0. 
    1233    rn_sst_avgphiscl = 0. 
    1234    rn_sss_avglamscl = 0. 
    1235    rn_sss_avgphiscl = 0. 
    1236    rn_sic_avglamscl = 0. 
    1237    rn_sic_avgphiscl = 0. 
     1235   rn_sst_avglamscl = 0.               ! E/W diameter of SST observation footprint (metres/degrees) 
     1236   rn_sst_avgphiscl = 0.               ! N/S diameter of SST observation footprint (metres/degrees) 
     1237   rn_sss_avglamscl = 0.               ! E/W diameter of SSS observation footprint (metres/degrees) 
     1238   rn_sss_avgphiscl = 0.               ! N/S diameter of SSS observation footprint (metres/degrees) 
     1239   rn_sic_avglamscl = 0.               ! E/W diameter of SIC observation footprint (metres/degrees) 
     1240   rn_sic_avgphiscl = 0.               ! N/S diameter of SIC observation footprint (metres/degrees) 
    12381241   nn_1dint = 0                        ! Type of vertical interpolation method 
    1239    nn_2dint = 0                        ! Default horizontal interpolation method 
    1240    nn_2dint_sla = 0                    ! Horizontal interpolation method for SLA 
    1241    nn_2dint_sst = 0                    ! Horizontal interpolation method for SST 
    1242    nn_2dint_sss = 0                    ! Horizontal interpolation method for SSS 
    1243    nn_2dint_sic = 0                    ! Horizontal interpolation method for SIC 
     1242   nn_2dint_default = 0                ! Default horizontal interpolation method 
     1243   nn_2dint_sla = -1                   ! Horizontal interpolation method for SLA 
     1244   nn_2dint_sst = -1                   ! Horizontal interpolation method for SST 
     1245   nn_2dint_sss = -1                   ! Horizontal interpolation method for SSS 
     1246   nn_2dint_sic = -1                   ! Horizontal interpolation method for SIC 
    12441247   nn_msshc = 0                        ! MSSH correction scheme 
    12451248   rn_mdtcorr = 1.61                   ! MDT  correction 
  • branches/UKMO/dev_r5518_obs_oper_update_bgc3d/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90

    r8687 r8695  
    4545   !! * Module variables 
    4646   LOGICAL, PUBLIC :: & 
    47       &       lk_diaobs = .TRUE.  !: Include this for backwards compatibility at NEMO 3.6. 
    48    LOGICAL :: ln_diaobs           !: Logical switch for the obs operator 
    49    LOGICAL :: ln_sstnight         !: Logical switch for night mean SST obs 
    50    LOGICAL :: ln_sla_fp_indegs    !: T=> SLA obs footprint size specified in degrees, F=> in metres 
    51    LOGICAL :: ln_sst_fp_indegs    !: T=> SST obs footprint size specified in degrees, F=> in metres 
    52    LOGICAL :: ln_sss_fp_indegs    !: T=> SSS obs footprint size specified in degrees, F=> in metres 
    53    LOGICAL :: ln_sic_fp_indegs    !: T=> sea-ice obs footprint size specified in degrees, F=> in metres 
    54  
    55    REAL(wp) :: rn_sla_avglamscl !: E/W diameter of SLA observation footprint (metres) 
    56    REAL(wp) :: rn_sla_avgphiscl !: N/S diameter of SLA observation footprint (metres) 
    57    REAL(wp) :: rn_sst_avglamscl !: E/W diameter of SST observation footprint (metres) 
    58    REAL(wp) :: rn_sst_avgphiscl !: N/S diameter of SST observation footprint (metres) 
    59    REAL(wp) :: rn_sss_avglamscl !: E/W diameter of SSS observation footprint (metres) 
    60    REAL(wp) :: rn_sss_avgphiscl !: N/S diameter of SSS observation footprint (metres) 
    61    REAL(wp) :: rn_sic_avglamscl !: E/W diameter of sea-ice observation footprint (metres) 
    62    REAL(wp) :: rn_sic_avgphiscl !: N/S diameter of sea-ice observation footprint (metres) 
    63  
    64    INTEGER :: nn_1dint       !: Vertical interpolation method 
    65    INTEGER :: nn_2dint       !: Default horizontal interpolation method 
    66    INTEGER :: nn_2dint_sla   !: SLA horizontal interpolation method  
    67    INTEGER :: nn_2dint_sst   !: SST horizontal interpolation method  
    68    INTEGER :: nn_2dint_sss   !: SSS horizontal interpolation method  
    69    INTEGER :: nn_2dint_sic   !: Seaice horizontal interpolation method  
     47      &       lk_diaobs = .TRUE.   !: Include this for backwards compatibility at NEMO 3.6. 
     48   LOGICAL :: ln_diaobs            !: Logical switch for the obs operator 
     49   LOGICAL :: ln_sstnight          !: Logical switch for night mean SST obs 
     50   LOGICAL :: ln_default_fp_indegs !: T=> Default obs footprint size specified in degrees, F=> in metres 
     51   LOGICAL :: ln_sla_fp_indegs     !: T=>     SLA obs footprint size specified in degrees, F=> in metres 
     52   LOGICAL :: ln_sst_fp_indegs     !: T=>     SST obs footprint size specified in degrees, F=> in metres 
     53   LOGICAL :: ln_sss_fp_indegs     !: T=>     SSS obs footprint size specified in degrees, F=> in metres 
     54   LOGICAL :: ln_sic_fp_indegs     !: T=> sea-ice obs footprint size specified in degrees, F=> in metres 
     55 
     56   REAL(wp) :: rn_default_avglamscl !: Default E/W diameter of observation footprint 
     57   REAL(wp) :: rn_default_avgphiscl !: Default N/S diameter of observation footprint 
     58   REAL(wp) :: rn_sla_avglamscl     !: E/W diameter of SLA observation footprint 
     59   REAL(wp) :: rn_sla_avgphiscl     !: N/S diameter of SLA observation footprint 
     60   REAL(wp) :: rn_sst_avglamscl     !: E/W diameter of SST observation footprint 
     61   REAL(wp) :: rn_sst_avgphiscl     !: N/S diameter of SST observation footprint 
     62   REAL(wp) :: rn_sss_avglamscl     !: E/W diameter of SSS observation footprint 
     63   REAL(wp) :: rn_sss_avgphiscl     !: N/S diameter of SSS observation footprint 
     64   REAL(wp) :: rn_sic_avglamscl     !: E/W diameter of sea-ice observation footprint 
     65   REAL(wp) :: rn_sic_avgphiscl     !: N/S diameter of sea-ice observation footprint 
     66 
     67   INTEGER :: nn_1dint         !: Vertical interpolation method 
     68   INTEGER :: nn_2dint_default !: Default horizontal interpolation method 
     69   INTEGER :: nn_2dint_sla     !: SLA horizontal interpolation method (-1 = default) 
     70   INTEGER :: nn_2dint_sst     !: SST horizontal interpolation method (-1 = default) 
     71   INTEGER :: nn_2dint_sss     !: SSS horizontal interpolation method (-1 = default) 
     72   INTEGER :: nn_2dint_sic     !: Seaice horizontal interpolation method (-1 = default) 
    7073  
    7174   INTEGER, DIMENSION(imaxavtypes) :: & 
     
    141144      INTEGER :: jfile           ! Counter for files 
    142145      INTEGER :: jnumsstbias     ! Number of SST bias files to read and apply 
     146      INTEGER :: n2dint_type     ! Local version of nn_2dint* 
    143147 
    144148      CHARACTER(len=128), DIMENSION(jpmaxnfiles) :: & 
     
    194198      REAL(dp) :: rn_dobsend     ! Obs window end date   YYYYMMDD.HHMMSS 
    195199 
     200      REAL(wp) :: rtype_avglamscl ! Local version of rn_*_avglamscl 
     201      REAL(wp) :: rtype_avgphiscl ! Local version of rn_*_avgphiscl 
     202 
    196203      CHARACTER(len=128), DIMENSION(:,:), ALLOCATABLE :: & 
    197204         & clproffiles, &        ! Profile filenames 
     
    200207      LOGICAL :: llvar1          ! Logical for profile variable 1 
    201208      LOGICAL :: llvar2          ! Logical for profile variable 1 
     209      LOGICAL :: ltype_fpindegs  ! Local version of ln_*_fp_indegs 
     210      LOGICAL :: ltype_night     ! Local version of ln_sstnight (false for other variables) 
    202211 
    203212      REAL(wp), POINTER, DIMENSION(:,:) :: & 
     
    222231         &            ln_grid_global, ln_grid_search_lookup,          & 
    223232         &            ln_ignmis, ln_s_at_t, ln_bound_reject,          & 
    224          &            ln_sstnight,                                    & 
     233         &            ln_sstnight, ln_default_fp_indegs,              & 
    225234         &            ln_sla_fp_indegs, ln_sst_fp_indegs,             & 
    226235         &            ln_sss_fp_indegs, ln_sic_fp_indegs,             & 
     
    240249         &            cn_gridsearchfile, rn_gridsearchres,            & 
    241250         &            rn_dobsini, rn_dobsend,                         & 
     251         &            rn_default_avglamscl, rn_default_avgphiscl,     & 
    242252         &            rn_sla_avglamscl, rn_sla_avgphiscl,             & 
    243253         &            rn_sst_avglamscl, rn_sst_avgphiscl,             & 
    244254         &            rn_sss_avglamscl, rn_sss_avgphiscl,             & 
    245255         &            rn_sic_avglamscl, rn_sic_avgphiscl,             & 
    246          &            nn_1dint, nn_2dint,                             & 
     256         &            nn_1dint, nn_2dint_default,                     & 
    247257         &            nn_2dint_sla, nn_2dint_sst,                     & 
    248258         &            nn_2dint_sss, nn_2dint_sic,                     & 
     
    336346         WRITE(numout,*) '             Final date in window YYYYMMDD.HHMMSS                 rn_dobsend = ', rn_dobsend 
    337347         WRITE(numout,*) '             Type of vertical interpolation method                  nn_1dint = ', nn_1dint 
    338          WRITE(numout,*) '             Type of horizontal interpolation method                nn_2dint = ', nn_2dint 
     348         WRITE(numout,*) '             Default horizontal interpolation method        nn_2dint_default = ', nn_2dint_default 
     349         WRITE(numout,*) '             Type of horizontal interpolation method for SLA    nn_2dint_sla = ', nn_2dint_sla 
     350         WRITE(numout,*) '             Type of horizontal interpolation method for SST    nn_2dint_sst = ', nn_2dint_sst 
     351         WRITE(numout,*) '             Type of horizontal interpolation method for SSS    nn_2dint_sss = ', nn_2dint_sss 
     352         WRITE(numout,*) '             Type of horizontal interpolation method for SIC    nn_2dint_sic = ', nn_2dint_sic 
     353         WRITE(numout,*) '             Default E/W diameter of obs footprint      rn_default_avglamscl = ', rn_default_avglamscl 
     354         WRITE(numout,*) '             Default N/S diameter of obs footprint      rn_default_avgphiscl = ', rn_default_avgphiscl 
     355         WRITE(numout,*) '             Default obs footprint in deg [T] or m [F]  ln_default_fp_indegs = ', ln_default_fp_indegs 
     356         WRITE(numout,*) '             SLA E/W diameter of obs footprint              rn_sla_avglamscl = ', rn_sla_avglamscl 
     357         WRITE(numout,*) '             SLA N/S diameter of obs footprint              rn_sla_avgphiscl = ', rn_sla_avgphiscl 
     358         WRITE(numout,*) '             SLA obs footprint in deg [T] or m [F]          ln_sla_fp_indegs = ', ln_sla_fp_indegs 
     359         WRITE(numout,*) '             SST E/W diameter of obs footprint              rn_sst_avglamscl = ', rn_sst_avglamscl 
     360         WRITE(numout,*) '             SST N/S diameter of obs footprint              rn_sst_avgphiscl = ', rn_sst_avgphiscl 
     361         WRITE(numout,*) '             SST obs footprint in deg [T] or m [F]          ln_sst_fp_indegs = ', ln_sst_fp_indegs 
     362         WRITE(numout,*) '             SIC E/W diameter of obs footprint              rn_sic_avglamscl = ', rn_sic_avglamscl 
     363         WRITE(numout,*) '             SIC N/S diameter of obs footprint              rn_sic_avgphiscl = ', rn_sic_avgphiscl 
     364         WRITE(numout,*) '             SIC obs footprint in deg [T] or m [F]          ln_sic_fp_indegs = ', ln_sic_fp_indegs 
    339365         WRITE(numout,*) '             Rejection of observations near land switch               ln_nea = ', ln_nea 
    340366         WRITE(numout,*) '             Rejection of obs near open bdys                 ln_bound_reject = ', ln_bound_reject 
     
    408434            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'sla', & 
    409435               &                   cn_slafbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    410             CALL obs_setinterpopts( nsurftypes, jtype, 'sla',         & 
    411                &                  nn_2dint, nn_2dint_sla,             & 
    412                &                  rn_sla_avglamscl, rn_sla_avgphiscl, & 
    413                &                  ln_sla_fp_indegs, .FALSE.,          & 
    414                &                  n2dintsurf, ravglamscl, ravgphiscl, & 
    415                &                  lfpindegs, llnightav ) 
    416436         ENDIF 
    417437         IF (ln_sst) THEN 
     
    419439            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'sst', & 
    420440               &                   cn_sstfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    421             CALL obs_setinterpopts( nsurftypes, jtype, 'sst',         & 
    422                &                  nn_2dint, nn_2dint_sst,             & 
    423                &                  rn_sst_avglamscl, rn_sst_avgphiscl, & 
    424                &                  ln_sst_fp_indegs, ln_sstnight,      & 
    425                &                  n2dintsurf, ravglamscl, ravgphiscl, & 
    426                &                  lfpindegs, llnightav ) 
    427441         ENDIF 
    428442#if defined key_lim2 || defined key_lim3 || defined key_cice 
     
    431445            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'sic', & 
    432446               &                   cn_sicfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    433             CALL obs_setinterpopts( nsurftypes, jtype, 'sic',         & 
    434                &                  nn_2dint, nn_2dint_sic,             & 
    435                &                  rn_sic_avglamscl, rn_sic_avgphiscl, & 
    436                &                  ln_sic_fp_indegs, .FALSE.,          & 
    437                &                  n2dintsurf, ravglamscl, ravgphiscl, & 
    438                &                  lfpindegs, llnightav ) 
    439447         ENDIF 
    440448#endif 
     
    443451            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'sss', & 
    444452               &                   cn_sssfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    445             CALL obs_setinterpopts( nsurftypes, jtype, 'sss',         & 
    446                &                  nn_2dint, nn_2dint_sss,             & 
    447                &                  rn_sss_avglamscl, rn_sss_avgphiscl, & 
    448                &                  ln_sss_fp_indegs, .FALSE.,          & 
    449                &                  n2dintsurf, ravglamscl, ravgphiscl, & 
    450                &                  lfpindegs, llnightav ) 
    451453         ENDIF 
    452454 
     
    454456            jtype = jtype + 1 
    455457            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_logchl_total', & 
    456                &                   cn_logchlfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    457             CALL obs_setinterpopts( nsurftypes, jtype, 'surf_logchl_total',   & 
    458                &                    nn_2dint, -1, 0., 0., .TRUE., .FALSE.,    & 
    459                &                    n2dintsurf, ravglamscl, ravgphiscl,       & 
    460                &                    lfpindegs, llnightav ) 
     458               &                   cn_surf_logchl_totalfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    461459         ENDIF 
    462460 
     
    464462            jtype = jtype + 1 
    465463            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_logchl_diat', & 
    466                &                   cn_logchlfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    467             CALL obs_setinterpopts( nsurftypes, jtype, 'surf_logchl_diat',    & 
    468                &                    nn_2dint, -1, 0., 0., .TRUE., .FALSE.,    & 
    469                &                    n2dintsurf, ravglamscl, ravgphiscl,       & 
    470                &                    lfpindegs, llnightav ) 
     464               &                   cn_surf_logchl_diatfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    471465         ENDIF 
    472466 
     
    474468            jtype = jtype + 1 
    475469            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_logchl_nondiat', & 
    476                &                   cn_logchlfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    477             CALL obs_setinterpopts( nsurftypes, jtype, 'surf_logchl_nondiat', & 
    478                &                    nn_2dint, -1, 0., 0., .TRUE., .FALSE.,    & 
    479                &                    n2dintsurf, ravglamscl, ravgphiscl,       & 
    480                &                    lfpindegs, llnightav ) 
     470               &                   cn_surf_logchl_nondiatfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    481471         ENDIF 
    482472 
     
    484474            jtype = jtype + 1 
    485475            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_logchl_dino', & 
    486                &                   cn_logchlfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    487             CALL obs_setinterpopts( nsurftypes, jtype, 'surf_logchl_dino',    & 
    488                &                    nn_2dint, -1, 0., 0., .TRUE., .FALSE.,    & 
    489                &                    n2dintsurf, ravglamscl, ravgphiscl,       & 
    490                &                    lfpindegs, llnightav ) 
     476               &                   cn_surf_logchl_dinofbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    491477         ENDIF 
    492478 
     
    494480            jtype = jtype + 1 
    495481            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_logchl_micro', & 
    496                &                   cn_logchlfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    497             CALL obs_setinterpopts( nsurftypes, jtype, 'surf_logchl_micro',   & 
    498                &                    nn_2dint, -1, 0., 0., .TRUE., .FALSE.,    & 
    499                &                    n2dintsurf, ravglamscl, ravgphiscl,       & 
    500                &                    lfpindegs, llnightav ) 
     482               &                   cn_surf_logchl_microfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    501483         ENDIF 
    502484 
     
    504486            jtype = jtype + 1 
    505487            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_logchl_nano', & 
    506                &                   cn_logchlfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    507             CALL obs_setinterpopts( nsurftypes, jtype, 'surf_logchl_nano',    & 
    508                &                    nn_2dint, -1, 0., 0., .TRUE., .FALSE.,    & 
    509                &                    n2dintsurf, ravglamscl, ravgphiscl,       & 
    510                &                    lfpindegs, llnightav ) 
     488               &                   cn_surf_logchl_nanofbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    511489         ENDIF 
    512490 
     
    514492            jtype = jtype + 1 
    515493            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_logchl_pico', & 
    516                &                   cn_logchlfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    517             CALL obs_setinterpopts( nsurftypes, jtype, 'surf_logchl_pico',    & 
    518                &                    nn_2dint, -1, 0., 0., .TRUE., .FALSE.,    & 
    519                &                    n2dintsurf, ravglamscl, ravgphiscl,       & 
    520                &                    lfpindegs, llnightav ) 
     494               &                   cn_surf_logchl_picofbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    521495         ENDIF 
    522496 
     
    524498            jtype = jtype + 1 
    525499            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_chl_total', & 
    526                &                   cn_logchlfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    527             CALL obs_setinterpopts( nsurftypes, jtype, 'surf_chl_total',      & 
    528                &                    nn_2dint, -1, 0., 0., .TRUE., .FALSE.,    & 
    529                &                    n2dintsurf, ravglamscl, ravgphiscl,       & 
    530                &                    lfpindegs, llnightav ) 
     500               &                   cn_surf_chl_totalfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    531501         ENDIF 
    532502 
     
    534504            jtype = jtype + 1 
    535505            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_spm', & 
    536                &                   cn_spmfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    537             CALL obs_setinterpopts( nsurftypes, jtype, 'surf_spm',         & 
    538                &                    nn_2dint, -1, 0., 0., .TRUE., .FALSE., & 
    539                &                    n2dintsurf, ravglamscl, ravgphiscl,    & 
    540                &                    lfpindegs, llnightav ) 
     506               &                   cn_surf_spmfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    541507         ENDIF 
    542508 
     
    544510            jtype = jtype + 1 
    545511            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_fco2', & 
    546                &                   cn_fco2fbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    547             CALL obs_setinterpopts( nsurftypes, jtype, 'surf_fco2',        & 
    548                &                    nn_2dint, -1, 0., 0., .TRUE., .FALSE., & 
    549                &                    n2dintsurf, ravglamscl, ravgphiscl,    & 
    550                &                    lfpindegs, llnightav ) 
     512               &                   cn_surf_fco2fbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    551513         ENDIF 
    552514 
     
    554516            jtype = jtype + 1 
    555517            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_pco2', & 
    556                &                   cn_pco2fbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    557             CALL obs_setinterpopts( nsurftypes, jtype, 'surf_pco2',        & 
    558                &                    nn_2dint, -1, 0., 0., .TRUE., .FALSE., & 
    559                &                    n2dintsurf, ravglamscl, ravgphiscl,    & 
     518               &                   cn_surf_pco2fbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
     519         ENDIF 
     520 
     521         DO jtype = 1, nsurftypes 
     522 
     523            IF ( TRIM(n2dintsurf(jtype)) == 'sla' ) THEN 
     524               IF ( nn_2dint_sla == -1 ) THEN 
     525                  n2dint_type  = nn_2dint_default 
     526               ELSE 
     527                  n2dint_type  = nn_2dint_sla 
     528               ENDIF 
     529               rtype_avglamscl = rn_sla_avglamscl 
     530               rtype_avgphiscl = rn_sla_avgphiscl 
     531               ltype_fpindegs  = ln_sla_fpindegs 
     532               ltype_night     = .FALSE. 
     533            ELSE IF ( TRIM(n2dintsurf(jtype)) == 'sst' ) THEN 
     534               IF ( nn_2dint_sst == -1 ) THEN 
     535                  n2dint_type  = nn_2dint_default 
     536               ELSE 
     537                  n2dint_type  = nn_2dint_sst 
     538               ENDIF 
     539               rtype_avglamscl = rn_sst_avglamscl 
     540               rtype_avgphiscl = rn_sst_avgphiscl 
     541               ltype_fpindegs  = ln_sst_fpindegs 
     542               ltype_night     = ln_sstnight 
     543            ELSE IF ( TRIM(n2dintsurf(jtype)) == 'sic' ) THEN 
     544               IF ( nn_2dint_sic == -1 ) THEN 
     545                  n2dint_type  = nn_2dint_default 
     546               ELSE 
     547                  n2dint_type  = nn_2dint_sic 
     548               ENDIF 
     549               rtype_avglamscl = rn_sic_avglamscl 
     550               rtype_avgphiscl = rn_sic_avgphiscl 
     551               ltype_fpindegs  = ln_sic_fpindegs 
     552               ltype_night     = .FALSE. 
     553            ELSE IF ( TRIM(n2dintsurf(jtype)) == 'sss' ) THEN 
     554               IF ( nn_2dint_sss == -1 ) THEN 
     555                  n2dint_type  = nn_2dint_default 
     556               ELSE 
     557                  n2dint_type  = nn_2dint_sss 
     558               ENDIF 
     559               rtype_avglamscl = rn_sss_avglamscl 
     560               rtype_avgphiscl = rn_sss_avgphiscl 
     561               ltype_fpindegs  = ln_sss_fpindegs 
     562               ltype_night     = .FALSE. 
     563            ELSE 
     564               n2dint_type     = nn_2dint_default 
     565               rtype_avglamscl = rn_default_avglamscl 
     566               rtype_avgphiscl = rn_default_avgphiscl 
     567               ltype_fpindegs  = ln_default_fpindegs 
     568               ltype_night     = .FALSE. 
     569            ENDIF 
     570             
     571            CALL obs_setinterpopts( nsurftypes, jtype, TRIM(n2dintsurf(jtype)), & 
     572               &                    nn_2dint_default, n2dint_type,              & 
     573               &                    rtype_avglamscl, rtype_avgphiscl,           & 
     574               &                    ltype_fpindegs, ltype_night,                & 
     575               &                    n2dintsurf, ravglamscl, ravgphiscl,         & 
    560576               &                    lfpindegs, llnightav ) 
    561          ENDIF 
     577 
     578         END DO 
    562579 
    563580      ENDIF 
     
    580597      ENDIF 
    581598 
    582       IF ( ( nn_2dint < 0 ) .OR. ( nn_2dint > 6 ) ) THEN 
    583          CALL ctl_stop(' Choice of horizontal (2D) interpolation method', & 
     599      IF ( ( nn_2dint_default < 0 ) .OR. ( nn_2dint_default > 6 ) ) THEN 
     600         CALL ctl_stop(' Choice of default horizontal (2D) interpolation method', & 
    584601            &                    ' is not available') 
    585602      ENDIF 
     
    863880               &               zprofmask1, zprofmask2,                  & 
    864881               &               zglam1, zglam2, zgphi1, zgphi2,          & 
    865                &               nn_1dint, nn_2dint,                      & 
     882               &               nn_1dint, nn_2dint_default,              & 
    866883               &               kdailyavtypes = nn_profdavtypes ) 
    867884 
     
    12401257                  & ) 
    12411258 
    1242                CALL obs_rotvel( profdataqc(jtype), nn_2dint, zu, zv ) 
     1259               CALL obs_rotvel( profdataqc(jtype), nn_2dint_default, zu, zv ) 
    12431260 
    12441261               DO jo = 1, profdataqc(jtype)%nprof 
     
    14761493       &                         cfilestype, ifiles, cobstypes, cfiles ) 
    14771494 
    1478     INTEGER, INTENT(IN) :: ntypes      ! Total number of obs types 
    1479     INTEGER, INTENT(IN) :: jpmaxnfiles ! Maximum number of files allowed for each type 
    1480     INTEGER, INTENT(IN) :: jtype       ! Index of the current type of obs 
    1481     INTEGER, DIMENSION(ntypes), INTENT(INOUT) :: & 
    1482        &                   ifiles      ! Out appended number of files for this type 
    1483  
    1484     CHARACTER(len=25), INTENT(IN) :: ctypein  
    1485     CHARACTER(len=128), DIMENSION(jpmaxnfiles), INTENT(IN) :: & 
    1486        &                   cfilestype  ! In list of files for this obs type 
    1487     CHARACTER(len=25), DIMENSION(ntypes), INTENT(INOUT) :: & 
    1488        &                   cobstypes   ! Out appended list of obs types 
    1489     CHARACTER(len=128), DIMENSION(ntypes, jpmaxnfiles), INTENT(INOUT) :: & 
    1490        &                   cfiles      ! Out appended list of files for all types 
    1491  
    1492     !Local variables 
    1493     INTEGER :: jfile 
    1494  
    1495     cfiles(jtype,:) = cfilestype(:) 
    1496     cobstypes(jtype) = ctypein 
    1497     ifiles(jtype) = 0 
    1498     DO jfile = 1, jpmaxnfiles 
    1499        IF ( trim(cfiles(jtype,jfile)) /= '' ) & 
    1500                  ifiles(jtype) = ifiles(jtype) + 1 
    1501     END DO 
    1502  
    1503     IF ( ifiles(jtype) == 0 ) THEN 
    1504          CALL ctl_stop( 'Logical for observation type '//TRIM(ctypein)//   & 
    1505             &           ' set to true but no files available to read' ) 
    1506     ENDIF 
    1507  
    1508     IF(lwp) THEN     
    1509        WRITE(numout,*) '             '//cobstypes(jtype)//' input observation file names:' 
    1510        DO jfile = 1, ifiles(jtype) 
    1511           WRITE(numout,*) '                '//TRIM(cfiles(jtype,jfile)) 
     1495       INTEGER, INTENT(IN) :: ntypes      ! Total number of obs types 
     1496       INTEGER, INTENT(IN) :: jpmaxnfiles ! Maximum number of files allowed for each type 
     1497       INTEGER, INTENT(IN) :: jtype       ! Index of the current type of obs 
     1498       INTEGER, DIMENSION(ntypes), INTENT(INOUT) :: & 
     1499          &                   ifiles      ! Out appended number of files for this type 
     1500 
     1501       CHARACTER(len=25), INTENT(IN) :: ctypein  
     1502       CHARACTER(len=128), DIMENSION(jpmaxnfiles), INTENT(IN) :: & 
     1503          &                   cfilestype  ! In list of files for this obs type 
     1504       CHARACTER(len=25), DIMENSION(ntypes), INTENT(INOUT) :: & 
     1505          &                   cobstypes   ! Out appended list of obs types 
     1506       CHARACTER(len=128), DIMENSION(ntypes, jpmaxnfiles), INTENT(INOUT) :: & 
     1507          &                   cfiles      ! Out appended list of files for all types 
     1508 
     1509       !Local variables 
     1510       INTEGER :: jfile 
     1511 
     1512       cfiles(jtype,:) = cfilestype(:) 
     1513       cobstypes(jtype) = ctypein 
     1514       ifiles(jtype) = 0 
     1515       DO jfile = 1, jpmaxnfiles 
     1516          IF ( trim(cfiles(jtype,jfile)) /= '' ) & 
     1517                    ifiles(jtype) = ifiles(jtype) + 1 
    15121518       END DO 
    1513     ENDIF 
     1519 
     1520       IF ( ifiles(jtype) == 0 ) THEN 
     1521            CALL ctl_stop( 'Logical for observation type '//TRIM(ctypein)//   & 
     1522               &           ' set to true but no files available to read' ) 
     1523       ENDIF 
     1524 
     1525       IF(lwp) THEN     
     1526          WRITE(numout,*) '             '//cobstypes(jtype)//' input observation file names:' 
     1527          DO jfile = 1, ifiles(jtype) 
     1528             WRITE(numout,*) '                '//TRIM(cfiles(jtype,jfile)) 
     1529          END DO 
     1530       ENDIF 
    15141531 
    15151532    END SUBROUTINE obs_settypefiles 
     
    15221539               &                  lfpindegs, lavnight ) 
    15231540 
    1524     INTEGER, INTENT(IN)  :: ntypes             ! Total number of obs types 
    1525     INTEGER, INTENT(IN)  :: jtype              ! Index of the current type of obs 
    1526     INTEGER, INTENT(IN)  :: n2dint_default     ! Default option for interpolation type 
    1527     INTEGER, INTENT(IN)  :: n2dint_type        ! Option for interpolation type 
    1528     REAL(wp), INTENT(IN) :: & 
    1529        &                    ravglamscl_type, & !E/W diameter of obs footprint for this type 
    1530        &                    ravgphiscl_type    !N/S diameter of obs footprint for this type 
    1531     LOGICAL, INTENT(IN)  :: lfp_indegs_type    !T=> footprint in degrees, F=> in metres 
    1532     LOGICAL, INTENT(IN)  :: lavnight_type      !T=> obs represent night time average 
    1533     CHARACTER(len=25), INTENT(IN) :: ctypein  
    1534  
    1535     INTEGER, DIMENSION(ntypes), INTENT(INOUT) :: & 
    1536        &                    n2dint  
    1537     REAL(wp), DIMENSION(ntypes), INTENT(INOUT) :: & 
    1538        &                    ravglamscl, ravgphiscl 
    1539     LOGICAL, DIMENSION(ntypes), INTENT(INOUT) :: & 
    1540        &                    lfpindegs, lavnight 
    1541  
    1542     lavnight(jtype) = lavnight_type 
    1543  
    1544     IF ( (n2dint_type >= 1) .AND. (n2dint_type <= 6) ) THEN 
    1545        n2dint(jtype) = n2dint_type 
    1546     ELSE 
    1547        n2dint(jtype) = n2dint_default 
    1548     ENDIF 
    1549  
    1550     ! For averaging observation footprints set options for size of footprint  
    1551     IF ( (n2dint(jtype) > 4) .AND. (n2dint(jtype) <= 6) ) THEN 
    1552        IF ( ravglamscl_type > 0._wp ) THEN 
    1553           ravglamscl(jtype) = ravglamscl_type 
     1541       INTEGER, INTENT(IN)  :: ntypes             ! Total number of obs types 
     1542       INTEGER, INTENT(IN)  :: jtype              ! Index of the current type of obs 
     1543       INTEGER, INTENT(IN)  :: n2dint_default     ! Default option for interpolation type 
     1544       INTEGER, INTENT(IN)  :: n2dint_type        ! Option for interpolation type 
     1545       REAL(wp), INTENT(IN) :: & 
     1546          &                    ravglamscl_type, & !E/W diameter of obs footprint for this type 
     1547          &                    ravgphiscl_type    !N/S diameter of obs footprint for this type 
     1548       LOGICAL, INTENT(IN)  :: lfp_indegs_type    !T=> footprint in degrees, F=> in metres 
     1549       LOGICAL, INTENT(IN)  :: lavnight_type      !T=> obs represent night time average 
     1550       CHARACTER(len=25), INTENT(IN) :: ctypein  
     1551 
     1552       INTEGER, DIMENSION(ntypes), INTENT(INOUT) :: & 
     1553          &                    n2dint  
     1554       REAL(wp), DIMENSION(ntypes), INTENT(INOUT) :: & 
     1555          &                    ravglamscl, ravgphiscl 
     1556       LOGICAL, DIMENSION(ntypes), INTENT(INOUT) :: & 
     1557          &                    lfpindegs, lavnight 
     1558 
     1559       lavnight(jtype) = lavnight_type 
     1560 
     1561       IF ( (n2dint_type >= 1) .AND. (n2dint_type <= 6) ) THEN 
     1562          n2dint(jtype) = n2dint_type 
     1563       ELSE IF ( n2dint_type == -1 ) THEN 
     1564          n2dint(jtype) = n2dint_default 
    15541565       ELSE 
    1555           CALL ctl_stop( 'Incorrect value set for averaging footprint '// & 
    1556                          'scale (ravglamscl) for observation type '//TRIM(ctypein) )       
     1566          CALL ctl_stop(' Choice of '//TRIM(ctypein)//' horizontal (2D) interpolation method', & 
     1567            &                    ' is not available') 
    15571568       ENDIF 
    15581569 
    1559        IF ( ravgphiscl_type > 0._wp ) THEN 
    1560           ravgphiscl(jtype) = ravgphiscl_type 
    1561        ELSE 
    1562           CALL ctl_stop( 'Incorrect value set for averaging footprint '// & 
    1563                          'scale (ravgphiscl) for observation type '//TRIM(ctypein) )       
     1570       ! For averaging observation footprints set options for size of footprint  
     1571       IF ( (n2dint(jtype) > 4) .AND. (n2dint(jtype) <= 6) ) THEN 
     1572          IF ( ravglamscl_type > 0._wp ) THEN 
     1573             ravglamscl(jtype) = ravglamscl_type 
     1574          ELSE 
     1575             CALL ctl_stop( 'Incorrect value set for averaging footprint '// & 
     1576                            'scale (ravglamscl) for observation type '//TRIM(ctypein) )       
     1577          ENDIF 
     1578 
     1579          IF ( ravgphiscl_type > 0._wp ) THEN 
     1580             ravgphiscl(jtype) = ravgphiscl_type 
     1581          ELSE 
     1582             CALL ctl_stop( 'Incorrect value set for averaging footprint '// & 
     1583                            'scale (ravgphiscl) for observation type '//TRIM(ctypein) )       
     1584          ENDIF 
     1585 
     1586          lfpindegs(jtype) = lfp_indegs_type  
     1587 
    15641588       ENDIF 
    15651589 
    1566        lfpindegs(jtype) = lfp_indegs_type  
    1567  
    1568     ENDIF 
    1569  
    1570     ! Write out info  
    1571     IF(lwp) THEN 
    1572        IF ( n2dint(jtype) <= 4 ) THEN 
    1573           WRITE(numout,*) '             '//TRIM(ctypein)// & 
    1574              &            ' model counterparts will be interpolated horizontally' 
    1575        ELSE IF ( n2dint(jtype) <= 6 ) THEN 
    1576           WRITE(numout,*) '             '//TRIM(ctypein)// & 
    1577              &            ' model counterparts will be averaged horizontally' 
    1578           WRITE(numout,*) '             '//'    with E/W scale: ',ravglamscl(jtype) 
    1579           WRITE(numout,*) '             '//'    with N/S scale: ',ravgphiscl(jtype) 
    1580           IF ( lfpindegs(jtype) ) THEN 
    1581               WRITE(numout,*) '             '//'    (in degrees)' 
    1582           ELSE 
    1583               WRITE(numout,*) '             '//'    (in metres)' 
     1590       ! Write out info  
     1591       IF(lwp) THEN 
     1592          IF ( n2dint(jtype) <= 4 ) THEN 
     1593             WRITE(numout,*) '             '//TRIM(ctypein)// & 
     1594                &            ' model counterparts will be interpolated horizontally' 
     1595          ELSE IF ( n2dint(jtype) <= 6 ) THEN 
     1596             WRITE(numout,*) '             '//TRIM(ctypein)// & 
     1597                &            ' model counterparts will be averaged horizontally' 
     1598             WRITE(numout,*) '             '//'    with E/W scale: ',ravglamscl(jtype) 
     1599             WRITE(numout,*) '             '//'    with N/S scale: ',ravgphiscl(jtype) 
     1600             IF ( lfpindegs(jtype) ) THEN 
     1601                 WRITE(numout,*) '             '//'    (in degrees)' 
     1602             ELSE 
     1603                 WRITE(numout,*) '             '//'    (in metres)' 
     1604             ENDIF 
    15841605          ENDIF 
    15851606       ENDIF 
    1586     ENDIF 
    15871607 
    15881608    END SUBROUTINE obs_setinterpopts 
Note: See TracChangeset for help on using the changeset viewer.