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 12182 for NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/fldread.F90 – NEMO

Ignore:
Timestamp:
2019-12-11T12:38:43+01:00 (4 years ago)
Author:
davestorkey
Message:

2019/dev_r11943_MERGE_2019: Merge in dev_ASINTER-01-05_merge.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/fldread.F90

    r11949 r12182  
    168168      IF( PRESENT(kit) )   ll_firstcall = ll_firstcall .and. kit == 1 
    169169 
    170       IF ( nn_components == jp_iam_sas ) THEN   ;   it_offset = nn_fsbc 
     170      IF( nn_components == jp_iam_sas ) THEN   ;   it_offset = nn_fsbc 
    171171      ELSE                                      ;   it_offset = 0 
    172172      ENDIF 
     
    391391         ENDIF 
    392392         ! 
    393          IF ( sdjf%cltype(1:4) == 'week' ) THEN 
     393         IF( sdjf%cltype(1:4) == 'week' ) THEN 
    394394            isec_week = isec_week + ksec_week( sdjf%cltype(6:8) )   ! second since the beginning of the week 
    395395            llprevmth = isec_week > nsec_month                      ! longer time since the beginning of the week than the month 
     
    466466      ENDIF 
    467467      ! 
    468       IF ( nn_components == jp_iam_sas ) THEN   ;   it_offset = nn_fsbc 
     468      IF( nn_components == jp_iam_sas ) THEN   ;   it_offset = nn_fsbc 
    469469      ELSE                                      ;   it_offset = 0 
    470470      ENDIF 
     
    659659            ENDIF 
    660660         CASE DEFAULT 
    661             IF (lk_c1d .AND. lmoor ) THEN 
     661            IF(lk_c1d .AND. lmoor ) THEN 
    662662               IF( sdjf%ln_tint ) THEN 
    663663                  CALL iom_get( sdjf%num, jpdom_unknown, sdjf%clvar, sdjf%fdta(2,2,:,2), sdjf%nrec_a(1) ) 
     
    10741074         imonth = kmonth 
    10751075         iday = kday 
    1076          IF ( sdjf%cltype(1:4) == 'week' ) THEN             ! find the day of the beginning of the week 
     1076         IF( sdjf%cltype(1:4) == 'week' ) THEN             ! find the day of the beginning of the week 
    10771077            isec_week = ksec_week( sdjf%cltype(6:8) )- (86400 * 8 )   
    10781078            llprevmth  = isec_week > nsec_month             ! longer time since beginning of the week than the month 
     
    10831083         ENDIF 
    10841084      ELSE                                                  ! use current day values 
    1085          IF ( sdjf%cltype(1:4) == 'week' ) THEN             ! find the day of the beginning of the week 
     1085         IF( sdjf%cltype(1:4) == 'week' ) THEN             ! find the day of the beginning of the week 
    10861086            isec_week  = ksec_week( sdjf%cltype(6:8) )      ! second since the beginning of the week 
    10871087            llprevmth  = isec_week > nsec_month             ! longer time since beginning of the week than the month 
     
    13211321 
    13221322      !! get dimensions 
    1323       IF ( SIZE(sd%fnow, 3) > 1 ) THEN 
     1323      !!GS: we consider 2D data as 3D data with vertical dim size = 1 
     1324      !IF( SIZE(sd%fnow, 3) > 1 ) THEN 
     1325      IF( SIZE(sd%fnow, 3) > 0 ) THEN 
    13241326         ALLOCATE( ddims(4) ) 
    13251327      ELSE 
     
    13341336 
    13351337      CALL iom_open ( sd%wgtname, inum )   ! interpolation weights 
    1336       IF ( inum > 0 ) THEN 
     1338      IF( inum > 0 ) THEN 
    13371339 
    13381340         !! determine whether we have an east-west cyclic grid 
     
    16431645          
    16441646         ref_wgts(kw)%fly_dta(:,:,:) = 0.0 
    1645          SELECT CASE( SIZE(ref_wgts(kw)%fly_dta(jpi1:jpi2,jpj1:jpj2,:),3) ) 
    1646          CASE(1) 
    1647               CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%fly_dta(jpi1:jpi2,jpj1:jpj2,1), nrec, rec1, recn) 
    1648          CASE DEFAULT 
     1647         !!GS: we consider 2D data as 3D data with vertical dim size = 1  
     1648         !SELECT CASE( SIZE(ref_wgts(kw)%fly_dta(jpi1:jpi2,jpj1:jpj2,:),3) ) 
     1649         !CASE(1) 
     1650         !     CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%fly_dta(jpi1:jpi2,jpj1:jpj2,1), nrec, rec1, recn) 
     1651         !CASE DEFAULT 
    16491652              CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%fly_dta(jpi1:jpi2,jpj1:jpj2,:), nrec, rec1, recn) 
    1650          END SELECT  
     1653         !END SELECT  
    16511654      ENDIF 
    16521655       
     
    16661669      END DO 
    16671670 
    1668       IF (ref_wgts(kw)%numwgt .EQ. 16) THEN 
     1671      IF(ref_wgts(kw)%numwgt .EQ. 16) THEN 
    16691672 
    16701673        !! fix up halo points that we couldnt read from file 
     
    16921695           IF( jpi1 == 2 ) THEN 
    16931696              rec1(1) = ref_wgts(kw)%ddims(1) - ref_wgts(kw)%overlap 
    1694               SELECT CASE( SIZE( ref_wgts(kw)%col(:,jpj1:jpj2,:),3) ) 
    1695               CASE(1) 
    1696                    CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col(:,jpj1:jpj2,1), nrec, rec1, recn) 
    1697               CASE DEFAULT 
     1697              !!GS: we consider 2D data as 3D data with vertical dim size = 1 
     1698              !SELECT CASE( SIZE( ref_wgts(kw)%col(:,jpj1:jpj2,:),3) ) 
     1699              !CASE(1) 
     1700              !     CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col(:,jpj1:jpj2,1), nrec, rec1, recn) 
     1701              !CASE DEFAULT 
    16981702                   CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col(:,jpj1:jpj2,:), nrec, rec1, recn) 
    1699               END SELECT       
     1703              !END SELECT       
    17001704              ref_wgts(kw)%fly_dta(jpi1-1,jpj1:jpj2,:) = ref_wgts(kw)%col(1,jpj1:jpj2,:) 
    17011705           ENDIF 
    17021706           IF( jpi2 + jpimin - 1 == ref_wgts(kw)%ddims(1)+1 ) THEN 
    17031707              rec1(1) = 1 + ref_wgts(kw)%overlap 
    1704               SELECT CASE( SIZE( ref_wgts(kw)%col(:,jpj1:jpj2,:),3) ) 
    1705               CASE(1) 
    1706                    CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col(:,jpj1:jpj2,1), nrec, rec1, recn) 
    1707               CASE DEFAULT 
     1708              !!GS: we consider 2D data as 3D data with vertical dim size = 1 
     1709              !SELECT CASE( SIZE( ref_wgts(kw)%col(:,jpj1:jpj2,:),3) ) 
     1710              !CASE(1) 
     1711              !     CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col(:,jpj1:jpj2,1), nrec, rec1, recn) 
     1712              !CASE DEFAULT 
    17081713                   CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col(:,jpj1:jpj2,:), nrec, rec1, recn) 
    1709               END SELECT 
     1714              !END SELECT 
    17101715              ref_wgts(kw)%fly_dta(jpi2+1,jpj1:jpj2,:) = ref_wgts(kw)%col(1,jpj1:jpj2,:) 
    17111716           ENDIF 
     
    17491754         END DO 
    17501755         ! 
    1751       END IF 
     1756      ENDIF 
    17521757      ! 
    17531758   END SUBROUTINE fld_interp 
Note: See TracChangeset for help on using the changeset viewer.