Changeset 12558
- Timestamp:
- 2020-03-15T20:51:02+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/r12083_India_uncoupled/src/OCE/SBC/fldread.F90
r12476 r12558 843 843 INTEGER :: ipi ! length of boundary data on local process 844 844 INTEGER :: ipkb ! number of vertical levels in boundary data file 845 INTEGER :: ipkmax ! number of vertical levels in boundary data file where no mask 845 846 INTEGER :: jb, ji, jj, jk, jkb ! loop counters 846 847 REAL(wp) :: zcoef … … 864 865 jj = idx_bdy(kbdy)%nbj(jb,kgrd) 865 866 zh = SUM(pdta_read_dz(jb,1,:) ) 867 ! 868 ! --- max jk where input data /= FillValue --- ! 869 ipkmax = 1 870 DO jkb = 2, ipkb 871 IF( pdta_read(jb,1,jkb) /= pfv ) ipkmax = MAX( ipkmax, jkb ) 872 END DO 866 873 ! 867 874 ! Warnings to flag differences in the input and model topgraphy - is this useful/necessary? … … 926 933 IF( zdepth(jk) < pdta_read_z(jb,1, 1) ) THEN ! above the first level of external data 927 934 pdta(jb,1,jk) = pdta_read(jb,1,1) 928 ELSEIF( zdepth(jk) > MAXVAL(pdta_read_z(jb,1,:),1) ) THEN ! below the last level of external data929 pdta(jb,1,jk) = pdta_read(jb,1, MAXLOC(pdta_read_z(jb,1,:),1))935 ELSEIF( zdepth(jk) > pdta_read_z(jb,1,ipkmax) ) THEN ! below the last level of external data 936 pdta(jb,1,jk) = pdta_read(jb,1,ipkmax) 930 937 ELSE ! inbetween: vertical interpolation between jkb & jkb+1 931 DO jkb = 1, ipk b-1! when gdept_n(jkb) < zdepth(jk) < gdept_n(jkb+1)938 DO jkb = 1, ipkmax-1 ! when gdept_n(jkb) < zdepth(jk) < gdept_n(jkb+1) 932 939 IF( ( ( zdepth(jk) - pdta_read_z(jb,1,jkb) ) * ( zdepth(jk) - pdta_read_z(jb,1,jkb+1) ) <= 0._wp ) & 933 940 & .AND. ( pdta_read_z(jb,1,jkb+1) /= zfv_alt) ) THEN ! linear interpolation between 2 levels
Note: See TracChangeset
for help on using the changeset viewer.