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

Changeset 7837


Ignore:
Timestamp:
2017-03-27T10:50:24+02:00 (7 years ago)
Author:
mattmartin
Message:

First version of generic obs oper which works at NEMO3.6 with other GO6 branches.

Location:
branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM
Files:
18 edited

Legend:

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

    r7773 r7837  
    592592   rn_sponge_tra = 2880.   !  coefficient for tracer   sponge layer [m2/s] 
    593593   rn_sponge_dyn = 2880.   !  coefficient for dynamics sponge layer [m2/s] 
    594    ln_chk_bathy  = .FALSE. ! 
    595594/ 
    596595!----------------------------------------------------------------------- 
     
    11871186!!            ***  Observation & Assimilation namelists *** 
    11881187!!====================================================================== 
    1189 !!   namobs       observation and model comparison 
     1188!!   namobs       observation and model comparison                      ('key_diaobs') 
    11901189!!   nam_asminc   assimilation increments                               ('key_asminc') 
    11911190!!====================================================================== 
    11921191! 
    11931192!----------------------------------------------------------------------- 
    1194 &namobs       !  observation usage switch 
    1195 !----------------------------------------------------------------------- 
    1196    ln_diaobs  = .false.             ! Logical switch for the observation operator 
    1197    ln_t3d     = .false.             ! Logical switch for T profile observations 
    1198    ln_s3d     = .false.             ! Logical switch for S profile observations 
    1199    ln_sla     = .false.             ! Logical switch for SLA observations 
    1200    ln_sst     = .false.             ! Logical switch for SST observations 
    1201    ln_sic     = .false.             ! Logical switch for Sea Ice observations 
    1202    ln_vel3d   = .false.             ! Logical switch for velocity observations 
    1203    ln_altbias = .false.             ! Logical switch for altimeter bias correction 
    1204    ln_nea     = .false.             ! Logical switch for rejection of observations near land 
    1205    ln_grid_global = .true.          ! Logical switch for global distribution of observations 
    1206    ln_grid_search_lookup = .false.  ! Logical switch for obs grid search w/lookup table 
    1207    ln_ignmis  = .true.              ! Logical switch for ignoring missing files 
    1208    ln_s_at_t  = .false.             ! Logical switch for computing model S at T obs if not there 
    1209    ln_sstnight = .false.            ! Logical switch for calculating night-time average for SST obs 
     1193&namobs       !  observation usage switch                               ('key_diaobs') 
     1194!----------------------------------------------------------------------- 
     1195   ln_t3d     = .false.    ! Logical switch for T profile observations 
     1196   ln_s3d     = .false.    ! Logical switch for S profile observations 
     1197   ln_ena     = .false.    ! Logical switch for ENACT insitu data set 
     1198   ln_cor     = .false.    ! Logical switch for Coriolis insitu data set 
     1199   ln_profb   = .false.    ! Logical switch for feedback insitu data set 
     1200   ln_sla     = .false.    ! Logical switch for SLA observations 
     1201   ln_sladt   = .false.    ! Logical switch for AVISO SLA data 
     1202   ln_slafb   = .false.    ! Logical switch for feedback SLA data 
     1203   ln_ssh     = .false.    ! Logical switch for SSH observations 
     1204   ln_sst     = .false.    ! Logical switch for SST observations 
     1205   ln_reysst  = .false.    ! Logical switch for Reynolds observations 
     1206   ln_ghrsst  = .false.    ! Logical switch for GHRSST observations 
     1207   ln_sstfb   = .false.    ! Logical switch for feedback SST data 
     1208   ln_sss     = .false.    ! Logical switch for SSS observations 
     1209   ln_seaice  = .false.    ! Logical switch for Sea Ice observations 
     1210   ln_vel3d   = .false.    ! Logical switch for velocity observations 
     1211   ln_velavcur= .false     ! Logical switch for velocity daily av. cur. 
     1212   ln_velhrcur= .false     ! Logical switch for velocity high freq. cur. 
     1213   ln_velavadcp = .false.  ! Logical switch for velocity daily av. ADCP 
     1214   ln_velhradcp = .false.  ! Logical switch for velocity high freq. ADCP 
     1215   ln_velfb   = .false.    ! Logical switch for feedback velocity data 
     1216   ln_grid_global = .false. ! Global distribtion of observations 
     1217   ln_grid_search_lookup = .false. !  Logical switch for obs grid search w/lookup table 
     1218   grid_search_file = 'grid_search'  !  Grid search lookup file header 
    12101219! All of the *files* variables below are arrays. Use namelist_cfg to add more files 
    1211    cn_profbfiles = 'profiles_01.nc'    ! Profile feedback input observation file names 
    1212    cn_slafbfiles = 'sla_01.nc'         ! SLA feedback input observation file names 
    1213    cn_sstfbfiles = 'sst_01.nc'         ! SST feedback input observation file names 
    1214    cn_sicfbfiles = 'sic_01.nc'         ! SIC feedback input observation file names 
    1215    cn_velfbfiles = 'vel_01.nc'         ! Velocity feedback input observation file names 
    1216    cn_altbiasfile = 'altbias.nc'       ! Altimeter bias input file name 
    1217    cn_gridsearchfile = 'gridsearch.nc' ! Grid search file name 
    1218    rn_gridsearchres = 0.5              ! Grid search resolution 
    1219    rn_dobsini = 00010101.000000        ! Initial date in window YYYYMMDD.HHMMSS 
    1220    rn_dobsend = 00010102.000000        ! Final date in window YYYYMMDD.HHMMSS 
    1221    nn_1dint = 0                        ! Type of vertical interpolation method 
    1222    nn_2dint = 0                        ! Type of horizontal interpolation method 
    1223    nn_msshc = 0                        ! MSSH correction scheme 
    1224    rn_mdtcorr = 1.61                   ! MDT  correction 
    1225    rn_mdtcutoff = 65.0                 ! MDT cutoff for computed correction 
    1226    nn_profdavtypes = -1                ! Profile daily average types - array 
     1220   enactfiles = 'enact.nc' !  ENACT input observation file names (specify full array in namelist_cfg) 
     1221   coriofiles = 'corio.nc' !  Coriolis input observation file name 
     1222   profbfiles = 'profiles_01.nc' ! Profile feedback input observation file name 
     1223   ln_profb_enatim = .false !        Enact feedback input time setting switch 
     1224   slafilesact = 'sla_act.nc' !  Active SLA input observation file names 
     1225   slafilespas = 'sla_pass.nc' ! Passive SLA input observation file names 
     1226   slafbfiles = 'sla_01.nc' ! slafbfiles: Feedback SLA input observation file names 
     1227   sstfiles = 'ghrsst.nc'   ! GHRSST input observation file names 
     1228   sstfbfiles = 'sst_01.nc' ! Feedback SST input observation file names 
     1229   seaicefiles = 'seaice_01.nc' ! Sea Ice input observation file names 
     1230   velavcurfiles = 'velavcurfile.nc'  ! Vel. cur. daily av. input file name 
     1231   velhrcurfiles = 'velhrcurfile.nc'  ! Vel. cur. high freq. input file name 
     1232   velavadcpfiles = 'velavadcpfile.nc' ! Vel. ADCP daily av. input file name 
     1233   velhradcpfiles = 'velhradcpfile.nc' ! Vel. ADCP high freq. input file name 
     1234   velfbfiles = 'velfbfile.nc' ! Vel. feedback input observation file name 
     1235   dobsini = 20000101.000000  !  Initial date in window YYYYMMDD.HHMMSS 
     1236   dobsend = 20010101.000000  !  Final date in window YYYYMMDD.HHMMSS 
     1237   n1dint = 0  !               Type of vertical interpolation method 
     1238   n2dint = 0  !               Type of horizontal interpolation method 
     1239   ln_nea = .false.   !        Rejection of observations near land switch 
     1240   nmsshc     = 0     !        MSSH correction scheme 
     1241   mdtcorr = 1.61     !        MDT  correction 
     1242   mdtcutoff = 65.0   !        MDT cutoff for computed correction 
     1243   ln_altbias = .false.    ! Logical switch for alt bias 
     1244   ln_ignmis  = .true.     ! Logical switch for ignoring missing files 
     1245   endailyavtypes = 820    ! ENACT daily average types - array (use namelist_cfg to set more values) 
     1246   ln_grid_global = .true. 
     1247   ln_grid_search_lookup = .false. 
     1248   ln_sstbias = .false. 
     1249   sstbias_files = 'sstbias.nc' 
    12271250/ 
    12281251!----------------------------------------------------------------------- 
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90

    r7773 r7837  
    658658 
    659659      DO jk = 1, jpkm1 
    660         CALL eos_fzp( tsn(:,:,jk,jp_sal), fzptnz(:,:,jk), fsdept(:,:,jk) ) 
     660         fzptnz(:,:,jk) = eos_fzp( tsn(:,:,jk,jp_sal), fsdept(:,:,jk) ) 
    661661      END DO 
    662662 
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90

    r7773 r7837  
    4444 
    4545   !! * Module variables 
    46    LOGICAL, PUBLIC :: ln_diaobs   !: Logical switch for the obs operator 
     46   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 
    4749   LOGICAL :: ln_sstnight         !: Logical switch for night mean SST obs 
    4850 
     
    119121         & cn_slafbfiles,    &   ! Sea level anomaly input filenames 
    120122         & cn_sicfbfiles,    &   ! Seaice concentration input filenames 
    121          & cn_velfbfiles     &   ! Velocity profile input filenames 
     123         & cn_velfbfiles,    &   ! Velocity profile input filenames 
    122124         & cn_sssfbfiles,    &   ! Sea surface salinity input filenames 
    123125         & cn_logchlfbfiles, &   ! Log(Chl) input filenames 
     
    173175         &            ln_grid_global, ln_grid_search_lookup,          & 
    174176         &            ln_ignmis, ln_s_at_t, ln_bound_reject,          & 
    175  
    176 ln_sstnight,              & 
     177         &            ln_sstnight,                                    & 
    177178         &            cn_profbfiles, cn_slafbfiles,                   & 
    178179         &            cn_sstfbfiles, cn_sicfbfiles,                   & 
     
    224225      IF(lwm) WRITE ( numond, namobs ) 
    225226 
    226       IF ( .NOT. ln_diaobs ) THEN 
     227      lk_diaobs = .FALSE. 
     228#if defined key_diaobs 
     229      IF ( ln_diaobs ) lk_diaobs = .TRUE. 
     230#endif 
     231 
     232      IF ( .NOT. lk_diaobs ) THEN 
    227233         IF(lwp) WRITE(numout,cform_war) 
    228          IF(lwp) WRITE(numout,*)' ln_diaobs is set to false so not calling dia_obs' 
     234         IF(lwp) WRITE(numout,*)' ln_diaobs is set to false or key_diaobs is not set, so not calling dia_obs' 
    229235         RETURN 
    230236      ENDIF 
     237 
    231238 
    232239      !----------------------------------------------------------------------- 
     
    242249         IF(lwp) WRITE(numout,cform_war) 
    243250         IF(lwp) WRITE(numout,*) ' ln_diaobs is set to true, but all obs operator logical flags', & 
    244             &                    ' ln_t3d, ln_s3d, ln_sla, ln_sst, ln_sic, ln_vel3d', & 
    245251            &                    ' are set to .FALSE. so turning off calls to dia_obs' 
    246252         nwarn = nwarn + 1 
    247          ln_diaobs = .FALSE. 
     253         lk_diaobs = .FALSE. 
    248254         RETURN 
    249255      ENDIF 
     
    258264         IF (ln_t3d .OR. ln_s3d) THEN 
    259265            jtype = jtype + 1 
    260             clproffiles(jtype,:) = cn_profbfiles(:) 
    261             cobstypesprof(jtype) = 'prof  ' 
    262             ifilesprof(jtype) = 0 
    263             DO jfile = 1, jpmaxnfiles 
    264                IF ( trim(clproffiles(jtype,jfile)) /= '' ) & 
    265                   ifilesprof(jtype) = ifilesprof(jtype) + 1 
    266             END DO 
     266            CALL obs_settypefiles( nproftypes, jpmaxnfiles, jtype, 'prof  ', & 
     267               &                   cn_profbfiles, ifilesprof, cobstypesprof, clproffiles ) 
    267268         ENDIF 
    268269         IF (ln_vel3d) THEN 
    269270            jtype = jtype + 1 
    270             clproffiles(jtype,:) = cn_velfbfiles(:) 
    271             cobstypesprof(jtype) = 'vel   ' 
    272             ifilesprof(jtype) = 0 
    273             DO jfile = 1, jpmaxnfiles 
    274                IF ( trim(clproffiles(jtype,jfile)) /= '' ) & 
    275                   ifilesprof(jtype) = ifilesprof(jtype) + 1 
    276             END DO 
     271            CALL obs_settypefiles( nproftypes, jpmaxnfiles, jtype, 'vel   ', & 
     272               &                   cn_velfbfiles, ifilesprof, cobstypesprof, clproffiles ) 
    277273         ENDIF 
    278274 
     
    288284         IF (ln_sla) THEN 
    289285            jtype = jtype + 1 
    290             clsurffiles(jtype,:) = cn_slafbfiles(:) 
    291             cobstypessurf(jtype) = 'sla   ' 
    292             ifilessurf(jtype) = 0 
    293             DO jfile = 1, jpmaxnfiles 
    294                IF ( trim(clsurffiles(jtype,jfile)) /= '' ) & 
    295                   ifilessurf(jtype) = ifilessurf(jtype) + 1 
    296             END DO 
     286            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'sla   ', & 
     287               &                   cn_slafbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    297288         ENDIF 
    298289         IF (ln_sst) THEN 
    299290            jtype = jtype + 1 
    300             clsurffiles(jtype,:) = cn_sstfbfiles(:) 
    301             cobstypessurf(jtype) = 'sst   ' 
    302             ifilessurf(jtype) = 0 
    303             DO jfile = 1, jpmaxnfiles 
    304                IF ( trim(clsurffiles(jtype,jfile)) /= '' ) & 
    305                   ifilessurf(jtype) = ifilessurf(jtype) + 1 
    306             END DO 
    307          ENDIF 
    308 #if defined key_lim2 || defined key_lim3 
     291            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'sst   ', & 
     292               &                   cn_sstfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
     293         ENDIF 
     294#if defined key_lim2 || defined key_lim3 || defined key_cice 
    309295         IF (ln_sic) THEN 
    310296            jtype = jtype + 1 
    311             clsurffiles(jtype,:) = cn_sicfbfiles(:) 
    312             cobstypessurf(jtype) = 'sic   ' 
    313             ifilessurf(jtype) = 0 
    314             DO jfile = 1, jpmaxnfiles 
    315                IF ( trim(clsurffiles(jtype,jfile)) /= '' ) & 
    316                   ifilessurf(jtype) = ifilessurf(jtype) + 1 
    317             END DO 
     297            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'sic   ', & 
     298               &                   cn_sicfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    318299         ENDIF 
    319300#endif 
    320301         IF (ln_sss) THEN 
    321302            jtype = jtype + 1 
    322             clsurffiles(jtype,:) = cn_sssfbfiles(:) 
    323             cobstypessurf(jtype) = 'sss   ' 
    324             ifilessurf(jtype) = 0 
    325             DO jfile = 1, jpmaxnfiles 
    326                IF ( trim(clsurffiles(jtype,jfile)) /= '' ) & 
    327                   ifilessurf(jtype) = ifilessurf(jtype) + 1 
    328             END DO 
     303            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'sss   ', & 
     304               &                   cn_sssfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    329305         ENDIF 
    330306 
    331307         IF (ln_logchl) THEN 
    332308            jtype = jtype + 1 
    333             clsurffiles(jtype,:) = cn_logchlfbfiles(:) 
    334             cobstypessurf(jtype) = 'logchl' 
    335             ifilessurf(jtype) = 0 
    336             DO jfile = 1, jpmaxnfiles 
    337                IF ( trim(clsurffiles(jtype,jfile)) /= '' ) & 
    338                   ifilessurf(jtype) = ifilessurf(jtype) + 1 
    339             END DO 
     309            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'logchl', & 
     310               &                   cn_logchlfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    340311         ENDIF 
    341312 
    342313         IF (ln_spm) THEN 
    343314            jtype = jtype + 1 
    344             clsurffiles(jtype,:) = cn_spmfbfiles(:) 
    345             cobstypessurf(jtype) = 'spm   ' 
    346             ifilessurf(jtype) = 0 
    347             DO jfile = 1, jpmaxnfiles 
    348                IF ( trim(clsurffiles(jtype,jfile)) /= '' ) & 
    349                   ifilessurf(jtype) = ifilessurf(jtype) + 1 
    350             END DO 
     315            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'spm   ', & 
     316               &                   cn_spmfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    351317         ENDIF 
    352318 
    353319         IF (ln_fco2) THEN 
    354320            jtype = jtype + 1 
    355             clsurffiles(jtype,:) = cn_fco2fbfiles(:) 
    356             cobstypessurf(jtype) = 'fco2  ' 
    357             ifilessurf(jtype) = 0 
    358             DO jfile = 1, jpmaxnfiles 
    359                IF ( trim(clsurffiles(jtype,jfile)) /= '' ) & 
    360                   ifilessurf(jtype) = ifilessurf(jtype) + 1 
    361             END DO 
     321            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'fco2  ', & 
     322               &                   cn_fco2fbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    362323         ENDIF 
    363324 
    364325         IF (ln_pco2) THEN 
    365326            jtype = jtype + 1 
    366             clsurffiles(jtype,:) = cn_pco2fbfiles(:) 
    367             cobstypessurf(jtype) = 'pco2  ' 
    368             ifilessurf(jtype) = 0 
    369             DO jfile = 1, jpmaxnfiles 
    370                IF ( trim(clsurffiles(jtype,jfile)) /= '' ) & 
    371                   ifilessurf(jtype) = ifilessurf(jtype) + 1 
    372             END DO 
     327            CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'pco2  ', & 
     328               &                   cn_pco2fbfiles, ifilessurf, cobstypessurf, clsurffiles ) 
    373329         ENDIF 
    374330 
     
    553509               DO jfile = 1, jpmaxnfiles 
    554510                  IF ( TRIM(cn_sstbiasfiles(jfile)) /= '' ) & 
    555                   jnumsstbias = jnumsstbias + 1 
     511                     &  jnumsstbias = jnumsstbias + 1 
    556512               END DO 
    557513               IF ( jnumsstbias == 0 ) THEN 
    558                   CALL ctl_stop("ln_sstbias set,"// &  
    559                      &          "  but no bias files to read in")     
     514                  CALL ctl_stop("ln_sstbias set but no bias files to read in")     
    560515               ENDIF 
    561516 
    562517               CALL obs_app_sstbias( surfdataqc(jtype), nn_2dint, &  
    563518                  &                  jnumsstbias, cn_sstbiasfiles(1:jnumsstbias) )  
     519 
     520            ENDIF 
    564521 
    565522         END DO 
     
    616573         & frld 
    617574#endif 
     575#if defined key_cice 
     576      USE sbc_oce, ONLY : fr_i     ! ice fraction 
     577#endif 
    618578#if defined key_hadocc 
    619       USE trc, ONLY :  &                ! HadOCC chlorophyll, fCO2 and pCO2 
     579      USE trc, ONLY :  &           ! HadOCC chlorophyll, fCO2 and pCO2 
    620580         & HADOCC_CHL, & 
    621581         & HADOCC_FCO2, & 
     
    623583         & HADOCC_FILL_FLT 
    624584#elif defined key_medusa && defined key_foam_medusa 
    625       USE trc, ONLY :  &                ! MEDUSA chlorophyll, fCO2 and pCO2 
     585      USE trc, ONLY :  &           ! MEDUSA chlorophyll, fCO2 and pCO2 
    626586         & MEDUSA_CHL, & 
    627587         & MEDUSA_FCO2, & 
     
    633593#endif 
    634594#if defined key_spm 
    635       USE par_spm, ONLY: &              ! ERSEM/SPM sediments 
     595      USE par_spm, ONLY: &         ! ERSEM/SPM sediments 
    636596         & jp_spm 
    637597      USE trc, ONLY :  & 
     
    648608      INTEGER :: jvar              ! Variable number 
    649609      INTEGER :: ji, jj            ! Loop counters 
     610      REAL(wp) :: tiny                  ! small number 
    650611      REAL(wp), POINTER, DIMENSION(:,:,:) :: & 
    651612         & zprofvar1, &            ! Model values for 1st variable in a prof ob 
     
    662623         & zgphi1,    &            ! Model latitudes for prof variable 1 
    663624         & zgphi2                  ! Model latitudes for prof variable 2 
    664 #if ! defined key_lim2 && ! defined key_lim3 
    665       REAL(wp), POINTER, DIMENSION(:,:) :: frld 
    666 #endif 
    667625      LOGICAL :: llnightav        ! Logical for calculating night-time average 
     626 
    668627 
    669628      !Allocate local work arrays 
     
    678637      CALL wrk_alloc( jpi, jpj, zgphi1 ) 
    679638      CALL wrk_alloc( jpi, jpj, zgphi2 ) 
    680 #if ! defined key_lim2 && ! defined key_lim3 
    681       CALL wrk_alloc(jpi,jpj,frld)  
    682 #endif 
    683639 
    684640      IF(lwp) THEN 
     
    691647      idaystp = NINT( rday / rdt ) 
    692648 
    693       !----------------------------------------------------------------------- 
    694       ! No LIM => frld == 0.0_wp 
    695       !----------------------------------------------------------------------- 
    696 #if ! defined key_lim2 && ! defined key_lim3 
    697       frld(:,:) = 0.0_wp 
    698 #endif 
    699649      !----------------------------------------------------------------------- 
    700650      ! Call the profile and surface observation operators 
     
    724674               zgphi1(:,:) = gphiu(:,:) 
    725675               zgphi2(:,:) = gphiv(:,:) 
     676            CASE DEFAULT 
     677               CALL ctl_stop( 'Unknown profile observation type '//TRIM(cobstypesprof(jtype))//' in dia_obs' ) 
    726678            END SELECT 
    727679 
     
    729681               &               nit000, idaystp,                         & 
    730682               &               zprofvar1, zprofvar2,                    & 
    731                &               gdept_1d, zprofmask1, zprofmask2,        & 
     683               &               fsdept(:,:,:), fsdepw(:,:,:),            &  
     684               &               zprofmask1, zprofmask2,                  & 
    732685               &               zglam1, zglam2, zgphi1, zgphi2,          & 
    733686               &               nn_1dint, nn_2dint,                      & 
     
    754707            CASE('sss') 
    755708               zsurfvar(:,:) = tsn(:,:,1,jp_sal) 
    756 #if defined key_lim2 || defined key_lim3 
    757709            CASE('sic') 
    758710               IF ( kstp == 0 ) THEN 
     
    767719                  CYCLE 
    768720               ELSE 
     721#if defined key_cice 
     722                  zsurfvar(:,:) = fr_i(:,:) 
     723#elif defined key_lim2 || defined key_lim3 
    769724                  zsurfvar(:,:) = 1._wp - frld(:,:) 
     725#else 
     726               CALL ctl_stop( ' Trying to run sea-ice observation operator', & 
     727                  &           ' but no sea-ice model appears to have been defined' ) 
     728#endif 
    770729               ENDIF 
    771 #endif 
     730 
    772731            CASE('logchl') 
    773732#if defined key_hadocc 
     
    879838#endif 
    880839 
     840            CASE DEFAULT 
     841 
     842               CALL ctl_stop( 'Unknown surface observation type '//TRIM(cobstypessurf(jtype))//' in dia_obs' ) 
     843 
    881844            END SELECT 
    882845 
     
    899862      CALL wrk_dealloc( jpi, jpj, zgphi1 ) 
    900863      CALL wrk_dealloc( jpi, jpj, zgphi2 ) 
    901 #if ! defined key_lim2 && ! defined key_lim3 
    902       CALL wrk_dealloc(jpi,jpj,frld) 
    903 #endif 
    904864 
    905865   END SUBROUTINE dia_obs 
     
    11841144    END SUBROUTINE fin_date 
    11851145 
     1146    SUBROUTINE obs_settypefiles( ntypes, jpmaxnfiles, jtype, ctypein, & 
     1147       &                         cfilestype, ifiles, cobstypes, cfiles ) 
     1148 
     1149    INTEGER, INTENT(IN) :: ntypes      ! Total number of obs types 
     1150    INTEGER, INTENT(IN) :: jpmaxnfiles ! Maximum number of files allowed for each type 
     1151    INTEGER, INTENT(IN) :: jtype       ! Index of the current type of obs 
     1152    INTEGER, DIMENSION(ntypes), INTENT(INOUT) :: & 
     1153       &                   ifiles      ! Out appended number of files for this type 
     1154 
     1155    CHARACTER(len=6), INTENT(IN) :: ctypein  
     1156    CHARACTER(len=128), DIMENSION(jpmaxnfiles), INTENT(IN) :: & 
     1157       &                   cfilestype  ! In list of files for this obs type 
     1158    CHARACTER(len=6), DIMENSION(ntypes), INTENT(INOUT) :: & 
     1159       &                   cobstypes   ! Out appended list of obs types 
     1160    CHARACTER(len=128), DIMENSION(ntypes, jpmaxnfiles), INTENT(INOUT) :: & 
     1161       &                   cfiles      ! Out appended list of files for all types 
     1162 
     1163    !Local variables 
     1164    INTEGER :: jfile 
     1165 
     1166    cfiles(jtype,:) = cfilestype(:) 
     1167    cobstypes(jtype) = ctypein 
     1168    ifiles(jtype) = 0 
     1169    DO jfile = 1, jpmaxnfiles 
     1170       IF ( trim(cfiles(jtype,jfile)) /= '' ) & 
     1171                 ifiles(jtype) = ifiles(jtype) + 1 
     1172    END DO 
     1173 
     1174    IF ( ifiles(jtype) == 0 ) THEN 
     1175         CALL ctl_stop( 'Logical for observation type '//TRIM(ctypein)//   & 
     1176            &           ' set to true but no files available to read' ) 
     1177    ENDIF 
     1178 
     1179    END SUBROUTINE obs_settypefiles 
     1180 
    11861181END MODULE diaobs 
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/OBS/obs_oper.F90

    r7773 r7837  
    3131   USE sbcdcy,        ONLY : &    ! For calculation of where it is night-time 
    3232      & sbc_dcy, nday_qsr 
     33   USE obs_grid,      ONLY : &  
     34      & obs_level_search      
    3335 
    3436   IMPLICIT NONE 
     
    5355CONTAINS 
    5456 
     57 
    5558   SUBROUTINE obs_prof_opt( prodatqc, kt, kpi, kpj, kpk,          & 
    5659      &                     kit000, kdaystp,                      & 
    57       &                     pvar1, pvar2, pgdept, pgdepw, 
    58       &                     pmask1, pmask2, & 
     60      &                     pvar1, pvar2, pgdept, pgdepw,         & 
     61      &                     pmask1, pmask2,                       &   
    5962      &                     plam1, plam2, pphi1, pphi2,           & 
    6063      &                     k1dint, k2dint, kdailyavtypes ) 
     
    154157      INTEGER ::   iend 
    155158      INTEGER ::   iobs 
     159      INTEGER ::   iin, ijn, ikn, ik   ! looping indices over interpolation nodes  
     160      INTEGER ::   inum_obs 
    156161      INTEGER, DIMENSION(imaxavtypes) :: & 
    157162         & idailyavtypes 
     
    161166         & igrdj1, & 
    162167         & igrdj2 
     168      INTEGER, ALLOCATABLE, DIMENSION(:) :: iv_indic 
     169 
    163170      REAL(KIND=wp) :: zlam 
    164171      REAL(KIND=wp) :: zphi 
     
    188195         & zgphi2 
    189196      REAL(KIND=wp), DIMENSION(1) :: zmsk_1, zmsk_2    
    190       REAL(KIND=wp), DIMENSION(:,:,:), ALLOCATABLE :: interp_corner        
     197      REAL(KIND=wp), DIMENSION(:,:,:), ALLOCATABLE :: interp_corner 
    191198 
    192199      LOGICAL :: ld_dailyav 
     
    627634           
    628635         ENDIF  
     636 
     637      ENDDO 
    629638 
    630639      ! Deallocate the data for interpolation 
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/OBS/obs_prep.F90

    r7773 r7837  
    4646   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    4747   !!---------------------------------------------------------------------- 
     48 
     49!! * Substitutions  
     50#  include "domzgr_substitute.h90"   
    4851 
    4952CONTAINS 
     
    12361239      CALL obs_int_comm_2d( 2, 2, kprofno, kpi, kpj, igrdi, igrdj, plam, zglam ) 
    12371240      CALL obs_int_comm_2d( 2, 2, kprofno, kpi, kpj, igrdi, igrdj, pphi, zgphi ) 
     1241      ! Need to know the bathy depth for each observation for sco 
     1242      CALL obs_int_comm_3d( 2, 2, kprofno, kpi, kpj, kpk, igrdi, igrdj, fsdepw(:,:,:), & 
     1243         &                  zgdepw ) 
    12381244 
    12391245      DO jobs = 1, kprofno 
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/OBS/obs_profiles_def.F90

    r7773 r7837  
    104104      ! Bookkeeping arrays with sizes equal to number of variables 
    105105 
    106       CHARACTER(len=6), POINTER, DIMENSION(:) :: & 
     106      CHARACTER(len=8), POINTER, DIMENSION(:) :: & 
    107107         & cvars          !: Variable names 
    108108 
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_prof.F90

    r7773 r7837  
    8787      CHARACTER(LEN=15), PARAMETER :: cpname='obs_rea_prof' 
    8888      CHARACTER(len=8) :: clrefdate 
    89       CHARACTER(len=6), DIMENSION(:), ALLOCATABLE :: clvars 
     89      CHARACTER(len=8), DIMENSION(:), ALLOCATABLE :: clvars 
    9090      INTEGER :: jvar 
    9191      INTEGER :: ji 
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_surf.F90

    r7740 r7837  
    7777      CHARACTER(LEN=11), PARAMETER :: cpname='obs_rea_surf' 
    7878      CHARACTER(len=8) :: clrefdate 
    79       CHARACTER(len=6), DIMENSION(:), ALLOCATABLE :: clvars 
     79      CHARACTER(len=8), DIMENSION(:), ALLOCATABLE :: clvars 
    8080      INTEGER :: ji 
    8181      INTEGER :: jj 
     
    172172 
    173173            !------------------------------------------------------------------ 
    174             !  Read the profile file into inpfiles 
     174            !  Read the surface file into inpfiles 
    175175            !------------------------------------------------------------------ 
    176176            CALL init_obfbdata( inpfiles(jj) ) 
     
    196196               END DO 
    197197            ENDIF 
    198  
    199             IF (lwp) WRITE(numout,*)'Observation file contains ',inpfiles(jj)%nobs,' observations' 
    200198 
    201199            !------------------------------------------------------------------ 
     
    347345 
    348346      iobs = 0 
    349  
    350347      surfdata%cvars(:)  = clvars(:) 
    351348 
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/OBS/obs_sstbias.F90

    r7773 r7837  
    4949      !! History :  
    5050      !!      ! :  2014-08 (J. While) Bias correction code for SST obs, 
    51       !!      !                      based on obs_rea_altbias 
     51      !!      !                       based on obs_rea_altbias 
    5252      !!---------------------------------------------------------------------- 
    5353      !! * Modules used 
     
    6969      INTEGER :: jpisstbias   ! Number of grid point in latitude for the bias 
    7070      INTEGER :: jpjsstbias   ! Number of grid point in longitude for the bias 
    71       INTEGER :: iico         ! Grid point indices 
    72       INTEGER :: ijco 
    7371      INTEGER :: jt 
    7472      INTEGER :: i_nx_id      ! Index to read the NetCDF file 
     
    129127         CALL iom_open( cl_bias_files(jtype), numsstbias, ldstop=.FALSE. ) 
    130128 
    131          IF (numsstbias .GT. 0) THEN 
     129         IF (numsstbias > 0) THEN 
    132130      
    133131            !Read the bias type from the file 
     
    137135            iret=NF90_OPEN(TRIM(cl_bias_files(jtype)), NF90_NOWRITE, incfile) 
    138136            iret=NF90_GET_ATT( incfile, NF90_GLOBAL, "SST_source", & 
    139                               ifile_source ) 
     137                               ifile_source ) 
    140138            ibiastypes(jtype) = ifile_source                  
    141139            iret=NF90_CLOSE(incfile)        
     
    151149            ! Close the file 
    152150            CALL iom_close(numsstbias) 
    153       
     151            IF ( lwp ) WRITE(numout,*) 'Read in bias for type: ',ibiastypes(jtype) 
    154152         ELSE 
    155153            CALL ctl_stop('obs_read_sstbias: File '// &  
     
    178176      END DO 
    179177 
    180       CALL obs_int_comm_2d( 2, 2, sstdata%nsurf, & 
     178      CALL obs_int_comm_2d( 2, 2, sstdata%nsurf, jpi, jpj, & 
    181179         &                  igrdi, igrdj, glamt, zglam ) 
    182       CALL obs_int_comm_2d( 2, 2, sstdata%nsurf, & 
     180      CALL obs_int_comm_2d( 2, 2, sstdata%nsurf, jpi, jpj, & 
    183181         &                  igrdi, igrdj, gphit, zgphi ) 
    184       CALL obs_int_comm_2d( 2, 2, sstdata%nsurf, & 
     182      CALL obs_int_comm_2d( 2, 2, sstdata%nsurf, jpi, jpj, & 
    185183         &                  igrdi, igrdj, tmask(:,:,1), zmask ) 
    186184 
    187185      DO jtype = 1, knumtypes 
    188186          
    189          !Find the number observations of type 
    190          !and alllocate tempory arrays 
     187         !Find the number observations of this type 
     188         !and allocate tempory arrays 
    191189         inumtype = COUNT( sstdata%ntyp(:) == ibiastypes(jtype) ) 
    192190 
     
    199197            & zbias( 2,2,inumtype ) ) 
    200198 
     199         IF ( lwp ) WRITE(numout,*) 'Number of obs of type: ',ibiastypes(jtype),' is: ',inumtype 
     200          
    201201         jt=1 
    202202         DO jobs = 1, sstdata%nsurf  
     
    207207               zglam_tmp(:,:,jt) = zglam(:,:,jobs) 
    208208               zgphi_tmp(:,:,jt) = zgphi(:,:,jobs) 
    209                zgphi_tmp(:,:,jt) = zgphi(:,:,jobs) 
    210209               zmask_tmp(:,:,jt) = zmask(:,:,jobs) 
    211210 
     
    215214         END DO 
    216215                          
    217          CALL obs_int_comm_2d( 2, 2, inumtype, & 
     216         CALL obs_int_comm_2d( 2, 2, inumtype, jpi, jpj,       & 
    218217               &           igrdi_tmp(:,:,:), igrdj_tmp(:,:,:), & 
    219218               &           z_sstbias(:,:,jtype), zbias(:,:,:) ) 
     
    225224               zlam = sstdata%rlam(jobs) 
    226225               zphi = sstdata%rphi(jobs) 
    227                iico = sstdata%mi(jobs) 
    228                ijco = sstdata%mj(jobs)          
    229  
    230                CALL obs_int_h2d_init( 1, 1, k2dint, zlam, zphi,         & 
    231                   &                   zglam_tmp(:,:,jt), & 
    232                   &                   zgphi_tmp(:,:,jt), & 
     226 
     227               CALL obs_int_h2d_init( 1, 1, k2dint, zlam, zphi,             & 
     228                  &                   zglam_tmp(:,:,jt), zgphi_tmp(:,:,jt), & 
    233229                  &                   zmask_tmp(:,:,jt), zweig, zobsmask ) 
    234230 
     
    236232 
    237233               ! adjust sst with bias field 
    238                sstdata%robs(jobs,1) = & 
    239                   &    sstdata%robs(jobs,1) - zext(1) 
     234               sstdata%robs(jobs,1) = sstdata%robs(jobs,1) - zext(1) 
    240235 
    241236               jt=jt+1 
     
    243238            ENDIF 
    244239         END DO  
    245                 
     240 
     241         IF ( lwp ) THEN 
     242            WRITE(numout,*) 'Applied bias to obs of type: ',ibiastypes(jtype) 
     243            WRITE(numout,*) 'Max/min of bias: ', maxval(zbias(:,:,:)), minval(zbias(:,:,:)) 
     244         ENDIF 
     245 
    246246         !Deallocate arrays 
    247247         DEALLOCATE( & 
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/OBS/obs_surf_def.F90

    r7776 r7837  
    6969         & ntyp           !: Type of surface observation product 
    7070 
    71       CHARACTER(len=6), POINTER, DIMENSION(:) :: & 
     71      CHARACTER(len=8), POINTER, DIMENSION(:) :: & 
    7272         & cvars          !: Variable names 
    7373 
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/OBS/obs_write.F90

    r7776 r7837  
    395395         END DO 
    396396 
    397       CASE('ICECON') 
     397      CASE('ICECONC') 
    398398 
    399399         CALL alloc_obfbdata( fbdata, 1, surfdata%nsurf, 1, & 
     
    532532            fbdata%caddunit(1+ja,1) = padd%cdunit(ja,1) 
    533533         END DO 
     534 
     535      CASE DEFAULT 
     536 
     537         CALL ctl_stop( 'Unknown observation type '//TRIM(surfdata%cvars(1))//' in obs_wri_surf' ) 
    534538 
    535539      END SELECT 
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_if.F90

    r7773 r7837  
    103103                                 ! ( d rho / dt ) / ( d rho / ds )      ( s = 34, t = -1.8 ) 
    104104          
    105          CALL eos_fzp( sss_m(:,:), fr_i(:,:) )       ! sea surface freezing temperature [Celcius] 
    106          fr_i(:,:) = fr_i(:,:) * tmask(:,:,1) 
     105         fr_i(:,:) = eos_fzp( sss_m ) * tmask(:,:,1)      ! sea surface freezing temperature [Celcius] 
    107106 
    108107         IF( ln_cpl )   a_i(:,:,1) = fr_i(:,:)          
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90

    r7773 r7837  
    150150 
    151151         ! ... masked sea surface freezing temperature [Kelvin] (set to rt0 over land) 
    152          CALL eos_fzp( sss_m(:,:), tfu(:,:) ) 
    153          tfu(:,:) = tfu(:,:) + rt0 
     152         tfu(:,:) = eos_fzp( sss_m ) +  rt0  
    154153 
    155154         zsist (:,:,1) = sist (:,:) + rt0 * ( 1. - tmask(:,:,1) ) 
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90

    r7776 r7837  
    5454   REAL(wp)   , PUBLIC, ALLOCATABLE, SAVE, DIMENSION (:,:)     ::  ttbl, stbl, utbl, vtbl !:top boundary layer variable at T point 
    5555   INTEGER,    PUBLIC, ALLOCATABLE, SAVE, DIMENSION (:,:)     ::  misfkt, misfkb         !:Level of ice shelf base 
     56 
    5657 
    5758   REAL(wp), PUBLIC, SAVE ::   rcpi   = 2000.0_wp     ! phycst ? 
     
    369370             ! Calculate freezing temperature 
    370371                zpress = grav*rau0*fsdept(ji,jj,ik)*1.e-04  
    371                 CALL eos_fzp(tsb(ji,jj,ik,jp_sal), zt_frz, zpress)  
     372                zt_frz = eos_fzp(tsb(ji,jj,ik,jp_sal), zpress)  
    372373                zt_sum = zt_sum + (tsn(ji,jj,ik,jp_tem)-zt_frz) * fse3t(ji,jj,ik) * tmask(ji,jj,ik)  ! sum temp 
    373374             ENDDO 
     
    451452      zti(:,:)=tinsitu( ttbl, stbl, zpress ) 
    452453! Calculate freezing temperature 
    453       CALL eos_fzp( sss_m(:,:), zfrz(:,:), zpress ) 
     454      zfrz(:,:)=eos_fzp( sss_m(:,:), zpress ) 
    454455 
    455456       
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90

    r7773 r7837  
    173173         END DO  
    174174      END DO  
    175       CALL eos_fzp( tsn(:,:,1,jp_sal), zfzp(:,:), zpres(:,:) ) 
     175      zfzp(:,:) = eos_fzp( tsn(:,:,1,jp_sal), zpres(:,:) ) 
    176176      DO jk = 1, jpk 
    177177         DO jj = 1, jpj 
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90

    r7773 r7837  
    174174      !!---------------------------------------------------------------------- 
    175175      ! 
    176 #if defined key_agrif  
    177       ! interpolation parent grid => child grid for avm_k ( ex : at west border: update column 1 and 2) 
    178       IF( .NOT.Agrif_Root() )   CALL Agrif_Tke 
    179 #endif 
    180       ! 
    181176      IF( kt /= nit000 ) THEN   ! restore before value to compute tke 
    182177         avt (:,:,:) = avt_k (:,:,:)  
     
    234229      INTEGER , POINTER, DIMENSION(:,:  ) :: imlc 
    235230      REAL(wp), POINTER, DIMENSION(:,:  ) :: zhlc 
    236       REAL(wp), POINTER, DIMENSION(:,:,:) :: zpelc, zdiag, zd_up, zd_lw, z3du, z3dv 
    237       REAL(wp)                            ::   zri  !   local Richardson number 
     231      REAL(wp), POINTER, DIMENSION(:,:,:) :: zpelc, zdiag, zd_up, zd_lw 
    238232      !!-------------------------------------------------------------------- 
    239233      ! 
     
    242236      CALL wrk_alloc( jpi,jpj, imlc )    ! integer 
    243237      CALL wrk_alloc( jpi,jpj, zhlc )  
    244       CALL wrk_alloc( jpi,jpj,jpk, zpelc, zdiag, zd_up, zd_lw, z3du, z3dv )  
     238      CALL wrk_alloc( jpi,jpj,jpk, zpelc, zdiag, zd_up, zd_lw )  
    245239      ! 
    246240      zbbrau = rn_ebb / rau0       ! Local constant initialisation 
     
    367361               zzd_lw = zcof * ( avm  (ji,jj,jk  ) + avm  (ji,jj,jk-1) )   &  ! lower diagonal 
    368362                  &          / ( fse3t(ji,jj,jk-1) * fse3w(ji,jj,jk  ) ) 
    369                !                                   ! shear prod. at w-point weightened by mask 
    370                zesh2  =  ( z3du(ji-1,jj,jk) + z3du(ji,jj,jk) ) / MAX( 1._wp , umask(ji-1,jj,jk) + umask(ji,jj,jk) )   & 
    371                   &    + ( z3dv(ji,jj-1,jk) + z3dv(ji,jj,jk) ) / MAX( 1._wp , vmask(ji,jj-1,jk) + vmask(ji,jj,jk) )     
    372                ! 
     363                  !                                                           ! shear prod. at w-point weightened by mask 
     364               zesh2  =  ( avmu(ji-1,jj,jk) + avmu(ji,jj,jk) ) / MAX( 1._wp , umask(ji-1,jj,jk) + umask(ji,jj,jk) )   & 
     365                  &    + ( avmv(ji,jj-1,jk) + avmv(ji,jj,jk) ) / MAX( 1._wp , vmask(ji,jj-1,jk) + vmask(ji,jj,jk) )     
     366                  ! 
    373367               zd_up(ji,jj,jk) = zzd_up            ! Matrix (zdiag, zd_up, zd_lw) 
    374368               zd_lw(ji,jj,jk) = zzd_lw 
     
    468462      CALL wrk_dealloc( jpi,jpj, imlc )    ! integer 
    469463      CALL wrk_dealloc( jpi,jpj, zhlc )  
    470       CALL wrk_dealloc( jpi,jpj,jpk, zpelc, zdiag, zd_up, zd_lw, z3du, z3dv )  
     464      CALL wrk_dealloc( jpi,jpj,jpk, zpelc, zdiag, zd_up, zd_lw )  
    471465      ! 
    472466      IF( nn_timing == 1 )  CALL timing_stop('tke_tke') 
     
    512506      INTEGER  ::   ji, jj, jk   ! dummy loop indices 
    513507      REAL(wp) ::   zrn2, zraug, zcoef, zav     ! local scalars 
    514       REAL(wp) ::   zdku, zri, zsqen     !   -      - 
     508      REAL(wp) ::   zdku, zpdlr, zri, zsqen     !   -      - 
    515509      REAL(wp) ::   zdkv, zemxl, zemlm, zemlp   !   -      - 
    516510      REAL(wp), POINTER, DIMENSION(:,:,:) :: zmpdl, zmxlm, zmxld 
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90

    r7773 r7837  
    176176#endif 
    177177 
    178       IF( ln_diaobs   )   CALL dia_obs_wri 
     178      IF( lk_diaobs   )   CALL dia_obs_wri 
    179179      ! 
    180180      IF( ln_icebergs )   CALL icb_end( nitend ) 
     
    467467                            CALL dia_hsb_init   ! heat content, salt content and volume budgets 
    468468                            CALL     trd_init   ! Mixed-layer/Vorticity/Integral constraints trends 
     469      IF( lk_diaobs     ) THEN                  ! Observation & model comparison 
    469470                            CALL dia_obs_init            ! Initialize observational data 
    470       IF( ln_diaobs     )   CALL dia_obs( nit000 - 1 )   ! Observation operator for restart 
    471  
     471                            CALL dia_obs( nit000 - 1 )   ! Observation operator for restart 
     472      ENDIF 
    472473      !                                         ! Assimilation increments 
    473474      IF( lk_asminc     )   CALL asm_inc_init   ! Initialize assimilation increments 
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/step.F90

    r7773 r7837  
    354354#endif 
    355355      IF( ln_diahsb        )   CALL dia_hsb( kstp )         ! - ML - global conservation diagnostics 
    356       IF( ln_diaobs  )         CALL dia_obs( kstp )         ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 
     356      IF( lk_diaobs  )         CALL dia_obs( kstp )         ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 
    357357 
    358358      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
Note: See TracChangeset for help on using the changeset viewer.