SUBROUTINE READ_LSC() ! UW Land Surface Hydrology Group implementation of SAC/SNOW17 model ! modified from NLDAS implementation ! author: Kostas Andreadis, kostas@hydro.washington.edu ! READS MODEL PARAMETERS ! driverMod contains definitions for all global driver variables USE driverMod IMPLICIT NONE ! Define local variables INTEGER J,I,K INTEGER land_idx REAL TEMP(1,xlen,ylen) REAL TEMP_TIME(NMONTHS,xlen,ylen) REAL tmp_PCTIM,tmp_ADIMP,tmp_RIVA,tmp_SIDE,tmp_RSERV REAL tmp_SCF,tmp_MFMAX,tmp_MFMIN,tmp_UADJ,tmp_SI,tmp_NMF REAL tmp_TIPM,tmp_MBASE,tmp_PXTEMP,tmp_PLWHC,tmp_DAYGM REAL tmp_ADC(NADC) CHARACTER*200 FILENAME_TMP CHARACTER*2 K_STR REAL dummy_real(2), tmpreal(landlen) INTEGER tmpint, dummy_int(2), tmptileid INTEGER tmpveg(landlen), month INTEGER landlenc landlenc = 3322 ! Catchment soil parameters are contained in a NetCDF file by default (no ASCII option) CALL READ_LSC_NETCDF ! vegetation class OPEN (10,file=VEG_FILE,form='formatted',status='old') DO K=1,landlenc READ (10,*) tmptileid, dummy_int(1), tmpint, dummy_int(2), dummy_real(1), dummy_real(2) tmpveg(tmptileid) = tmpint END DO DO K=1,landlen CP(K)%vegcls = tmpveg(LAND(K)) END DO CLOSE(10,status='keep') ! climatological LAI and Greenness OPEN (10,file=LAI_FILE,form='unformatted',convert='big_endian') OPEN (11,file=GREEN_FILE,form='unformatted',convert='big_endian') DO month=1,12 READ (10) (tmpreal(K), K=1,landlenc) DO K=1,landlen CLAI(K,month) = tmpreal(LAND(K)) END DO READ (11) (tmpreal(K), K=1,landlenc) DO K=1,landlen CGREEN(K,month) = tmpreal(LAND(K)) END DO ! check lai and greenness DO K=1,landlen IF (CGREEN(K,month) < 0.01) CGREEN(K,month) = 0.01 IF (CLAI(K,month) < 0.01) CLAI(K,month) = 0.01 END DO END DO CLOSE (10,status='keep') CLOSE (11,status='keep') ! diffuse IR MODIS parameters OPEN (10,file=MODIS_ALBNF_FILE,form='unformatted',convert='big_endian', & action='read',status='old') DO month = 1,12 READ (10) (tmpreal(K), K=1,landlenc) DO K = 1,landlen MODIS_PARAM(K,month)%sc_albnf = tmpreal(LAND(K)) END DO END DO CLOSE(10,status='keep') OPEN (10,file=MODIS_ALBVF_FILE,form='unformatted',convert='big_endian', & action='read',status='old') DO month = 1,12 READ (10) (tmpreal(K), K=1,landlenc) DO K = 1,landlen MODIS_PARAM(K,month)%sc_albvf = tmpreal(LAND(K)) END DO END DO CLOSE(10,status='keep') OPEN (10,file=MODIS_ALBVR_FILE,form='unformatted',convert='big_endian', & action='read',status='old') DO month = 1,12 READ (10) (tmpreal(K), K=1,landlenc) DO K = 1,landlen MODIS_PARAM(K,month)%sc_albvr = tmpreal(LAND(K)) END DO END DO CLOSE(10,status='keep') OPEN (10,file=MODIS_ALBNR_FILE,form='unformatted',convert='big_endian', & action='read',status='old') DO month = 1,12 READ (10) (tmpreal(K), K=1,landlenc) DO K = 1,landlen MODIS_PARAM(K,month)%sc_albnr = tmpreal(LAND(K)) END DO END DO CLOSE(10,status='keep') END SUBROUTINE READ_LSC