Skip to content

Commit 42bf0c5

Browse files
committed
Remove superfluous code block to read LWdown
1 parent a7a1c9a commit 42bf0c5

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

Diff for: src/offline/cable_input.F90

-20
Original file line numberDiff line numberDiff line change
@@ -1272,32 +1272,12 @@ SUBROUTINE open_met_file(dels,koffset,kend,spinup, TFRZ)
12721272
' in '//TRIM(filename%met)//' (SUBROUTINE open_met_data)')
12731273
END IF
12741274
ELSE
1275-
! block below inserted by rk4417 - phase2
1276-
ok = NF90_INQ_VARID(ncid_met,'dlwrf',id%LWdown) ! MMY ! For Princeton
1277-
IF(ok == NF90_NOERR) THEN ! If inquiry is okay ! MMY
1278-
exists%LWdown = .TRUE. ! LWdown is present in met file ! MMY
1279-
! Get LWdown units and check okay:
1280-
ok = NF90_GET_ATT(ncid_met,id%LWdown,'units',metunits%LWdown) ! MMY
1281-
IF(ok /= NF90_NOERR) CALL nc_abort & ! MMY
1282-
(ok,'Error finding LWdown units in met data file ' & ! MMY
1283-
//TRIM(filename%met)//' (SUBROUTINE open_met_file)') ! MMY
1284-
IF(.NOT.(metunits%LWdown(1:4)/='W/m2'.OR.metunits%LWdown(1:5) & ! MMY
1285-
/='W/m^2'.OR.metunits%LWdown(1:5)/='Wm^-2' & ! MMY
1286-
.OR.metunits%LWdown(1:4)/='Wm-2'.or.metunits%SWdown(1:5) /= 'W m-2')) THEN ! MMY
1287-
1288-
WRITE(*,*) metunits%LWdown ! MMY
1289-
CALL abort('Unknown units for LWdown'// & ! MMY
1290-
' in '//TRIM(filename%met)//' (SUBROUTINE open_met_data)') ! MMY
1291-
END IF ! MMY
1292-
ELSE ! MMY
1293-
! end of block - rk4417 - phase2
12941275
exists%LWdown = .FALSE. ! LWdown is not present in met file
12951276
all_met=.FALSE. ! not all met variables are present in file
12961277
! Note this in log file:
12971278
WRITE(logn,*) 'LWdown not present in met file; ', &
12981279
'values will be synthesised based on air temperature.'
12991280
END IF
1300-
END IF ! inserted by rk4417 - phase2
13011281

13021282
! Look for PSurf (can be synthesised):- - - - - - - - - - - - - - - -
13031283
IF (ncciy > 0) ncid_met = ncid_ps

0 commit comments

Comments
 (0)