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 7773 for branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90 – NEMO

Ignore:
Timestamp:
2017-03-09T13:52:43+01:00 (7 years ago)
Author:
mattmartin
Message:

Committing updates after doing the following:

  • merging the branch dev_r4650_general_vert_coord_obsoper@7763 into this branch
  • updating it so that the following OBS changes were implemented correctly on top of the simplification changes:
    • generalised vertical coordinate for profile obs. This was done so that is now the default option.
    • sst bias correction implemented with the new simplified obs code.
    • included the biogeochemical obs types int he new simplified obs code.
    • included the changes to exclude obs in the boundary for limited area models
    • included other changes for the efficiency of the obs operator to remove global arrays.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90

    r5682 r7773  
    170170              DO jj = 1, jpj 
    171171                  jk = 2 
    172                   DO WHILE ( jk .LE. mbkt(ji,jj) .AND. fsdepw(ji,jj,jk) < rzisf_tbl(ji,jj) ) ;  jk = jk + 1 ;  END DO 
     172                  DO WHILE ( jk .LE. mbkt(ji,jj) .AND. gdepw_0(ji,jj,jk) < rzisf_tbl(ji,jj) ) ;  jk = jk + 1 ;  END DO 
    173173                  misfkt(ji,jj) = jk-1 
    174174               END DO 
     
    188188         END IF 
    189189          
     190         ! save initial top boundary layer thickness          
    190191         rhisf_tbl_0(:,:) = rhisf_tbl(:,:) 
     192 
     193      END IF 
     194 
     195      !                                            ! ---------------------------------------- ! 
     196      IF( kt /= nit000 ) THEN                      !          Swap of forcing fields          ! 
     197         !                                         ! ---------------------------------------- ! 
     198         fwfisf_b  (:,:  ) = fwfisf  (:,:  )               ! Swap the ocean forcing fields except at nit000 
     199         risf_tsc_b(:,:,:) = risf_tsc(:,:,:)               ! where before fields are set at the end of the routine 
     200         ! 
     201      ENDIF 
     202 
     203      IF( MOD( kt-1, nn_fsbc) == 0 ) THEN 
    191204 
    192205         ! compute bottom level of isf tbl and thickness of tbl below the ice shelf 
     
    199212 
    200213               ! determine the deepest level influenced by the boundary layer 
    201                ! test on tmask useless ????? 
    202214               DO jk = ikt, mbkt(ji,jj) 
    203215                  IF ( (SUM(fse3t_n(ji,jj,ikt:jk-1)) .LT. rhisf_tbl(ji,jj)) .AND. (tmask(ji,jj,jk) == 1) ) ikb = jk 
     
    211223            END DO 
    212224         END DO 
    213           
    214       END IF 
    215  
    216       !                                            ! ---------------------------------------- ! 
    217       IF( kt /= nit000 ) THEN                      !          Swap of forcing fields          ! 
    218          !                                         ! ---------------------------------------- ! 
    219          fwfisf_b  (:,:  ) = fwfisf  (:,:  )               ! Swap the ocean forcing fields except at nit000 
    220          risf_tsc_b(:,:,:) = risf_tsc(:,:,:)               ! where before fields are set at the end of the routine 
    221          ! 
    222       ENDIF 
    223  
    224       IF( MOD( kt-1, nn_fsbc) == 0 ) THEN 
    225  
    226225 
    227226         ! compute salf and heat flux 
     
    472471 
    473472                     nit = nit + 1 
    474                      IF (nit .GE. 100) THEN 
    475                         !WRITE(numout,*) "sbcisf : too many iteration ... ", zhtflx, zhtflx_b,zgammat, rn_gammat0, rn_tfri2, nn_gammablk, ji,jj 
    476                         !WRITE(numout,*) "sbcisf : too many iteration ... ", (zhtflx - zhtflx_b)/zhtflx 
    477                         CALL ctl_stop( 'STOP', 'sbc_isf_hol99 : too many iteration ...' ) 
    478                      END IF 
     473                     IF (nit .GE. 100) CALL ctl_stop( 'STOP', 'sbc_isf_hol99 : too many iteration ...' ) 
     474 
    479475! save gammat and compute zhtflx_b 
    480476                     zgammat2d(ji,jj)=zgammat 
     
    794790               ! test on tmask useless ????? 
    795791               DO jk = ikt, mbkt(ji,jj) 
    796 !                  IF ( (SUM(fse3t(ji,jj,ikt:jk-1)) .LT. rhisf_tbl(ji,jj)) .AND. (tmask(ji,jj,jk) == 1) ) ikb = jk 
     792                  IF ( (SUM(fse3t(ji,jj,ikt:jk-1)) .LT. rhisf_tbl(ji,jj)) .AND. (tmask(ji,jj,jk) == 1) ) ikb = jk 
    797793               END DO 
    798794               rhisf_tbl(ji,jj) = MIN(rhisf_tbl(ji,jj), SUM(fse3t(ji,jj,ikt:ikb)))  ! limit the tbl to water thickness. 
Note: See TracChangeset for help on using the changeset viewer.