diff --git a/include/Makeoptions b/include/Makeoptions index 02b334d2..e3dde8fa 120000 --- a/include/Makeoptions +++ b/include/Makeoptions @@ -1 +1 @@ -Makeoptions.gnu \ No newline at end of file +Makeoptions.github \ No newline at end of file diff --git a/include/Makeoptions.CMA-HPC b/include/Makeoptions.CMA-HPC old mode 100644 new mode 100755 diff --git a/include/Makeoptions.SYSU-BaiduBoat.gnu b/include/Makeoptions.SYSU-BaiduBoat.gnu new file mode 100755 index 00000000..649811bd --- /dev/null +++ b/include/Makeoptions.SYSU-BaiduBoat.gnu @@ -0,0 +1,39 @@ +# ========================================================== +# mpif90 - gnu + +# please "source /share/home/dq089/soft/gnu-env" first. + +FF = mpif90 + +NETCDF_LIB = /share/home/dq089/soft/netcdf-fortran-4.6.1-gnu/lib +NETCDF_INC = /share/home/dq089/soft/netcdf-fortran-4.6.1-gnu/include + +MOD_CMD = -J + +FOPTS = -fdefault-real-8 -ffree-form -C -g -u -xcheck=stkovf \ + -ffpe-trap=invalid,zero,overflow -fbounds-check \ + -mcmodel=medium -fbacktrace -fdump-core -cpp \ + -ffree-line-length-0 + +INCLUDE_DIR = -I../include -I../share -I../mksrfdata -I../mkinidata -I../main -I$(NETCDF_INC) +LDFLAGS = -L${NETCDF_LIB} -lnetcdff -llapack -L/share/home/dq089/soft/lib -lblas.gnu + +#============================================================ +# CaMa-Flood Mkinclude (for Linux, gfortran) + +RM = /bin/rm -f +CP = /bin/cp +#---- +# Pre-Prosessing options +# DMPI=-DUseMPI: activate when MPI parallelization is used +# DCDF=-DUseCDF: activate when using netCDF, comment out when not needed +# DATM=-DNoAtom: activate when OMP ATOMIC calculation should be avoided (bit identical simulation) +#---- +#DMPI=-DUseMPI +DCDF=-DUseCDF +#DATM=-DNoAtom +CFLAGS=$(DMPI) $(DCDF) $(DATM) +#---- +FCMP = gfortran -fopenmp +FC = gfortran +FFLAGS = -O3 -Wall -cpp -free -fimplicit-none -fbounds-check -fbacktrace diff --git a/include/Makeoptions.SYSU-BaiduBoat.intel b/include/Makeoptions.SYSU-BaiduBoat.intel new file mode 100755 index 00000000..56e03464 --- /dev/null +++ b/include/Makeoptions.SYSU-BaiduBoat.intel @@ -0,0 +1,46 @@ +# ======================================================= +# mpif90 - intel + +# please "source /share/home/dq089/soft/intel-env" first. + +FF = mpif90 + +NETCDF_LIB = /share/home/dq089/soft/netcdf-fortran-4.6.1-intel/lib +NETCDF_INC = /share/home/dq089/soft/netcdf-fortran-4.6.1-intel/include + +MOD_CMD = -module + +#<<<<<<< HEAD +#FOPTS = -qopenmp -g -traceback -r8 -free -check uninit + # -r8 -free -O0 -check uninit -check bounds -check pointers \ + # -traceback -assume byterecl -pthread -heap-arrays #-nogen-interface + +#INCLUDE_DIR = -I../include -I../share -I../mksrfdata \ +# -I../mkinidata -I../main -I../hydro -I${NETCDF_INC} +#LDFLAGS = -L${NETCDF_LIB} -lnetcdff + + + FOPTS = -qopenmp -O2 -traceback -r8 -free -check uninit -check bounds + + LDFLAGS = -L${NETCDF_LIB} -lnetcdff -llapack -L/share/home/dq089/soft/lib -lgfortran -lblas.intel + +#============================================================ +# CaMa-Flood Mkinclude (for Linux, gfortran) + +RM = /bin/rm -f +CP = /bin/cp +#---- +# Pre-Prosessing options +# DMPI=-DUseMPI: activate when MPI parallelization is used +# DCDF=-DUseCDF: activate when using netCDF, comment out when not needed +# DATM=-DNoAtom: activate when OMP ATOMIC calculation should be avoided (bit identical simulation) +#---- +#DMPI=-DUseMPI +DCDF=-DUseCDF +#DATM=-DNoAtom +CFLAGS=$(DMPI) $(DCDF) $(DATM) +#---- +FCMP = ifort -qopenmp +FC = ifort +LFLAGS = +FFLAGS = -O3 -warn all -fpp -free -assume byterecl -heap-arrays -nogen-interface -lpthread -static-intel diff --git a/include/Makeoptions.SYSU-BaiduBoat_Parallel_with_zip b/include/Makeoptions.SYSU-BaiduBoat_Parallel_with_zip old mode 100644 new mode 100755 diff --git a/include/Makeoptions.github b/include/Makeoptions.github new file mode 100755 index 00000000..16b35621 --- /dev/null +++ b/include/Makeoptions.github @@ -0,0 +1,52 @@ +# ======================================================= +# mpif90 - gfortran +# + + FF = mpif90 -fopenmp + + NETCDF_LIB = /usr/lib/x86_64-linux-gnu + NETCDF_INC = /usr/include + + MOD_CMD = -J + +# determine the gfortran version + GCC_VERSION := "`gcc -dumpversion`" + IS_GCC_ABOVE_10 := $(shell expr "$(GCC_VERSION)" ">=" "10") + ifeq "$(IS_GCC_ABOVE_10)" "1" + FOPTS = -fdefault-real-8 -ffree-form -C -g -u -xcheck=stkovf \ + -ffpe-trap=invalid,zero,overflow -fbounds-check \ + -mcmodel=medium -fbacktrace -fdump-core -cpp \ + -ffree-line-length-0 -fallow-argument-mismatch + else + FOPTS = -fdefault-real-8 -ffree-form -C -g -u -xcheck=stkovf \ + -ffpe-trap=invalid,zero,overflow -fbounds-check \ + -mcmodel=medium -fbacktrace -fdump-core -cpp \ + -ffree-line-length-0 + endif + + INCLUDE_DIR = -I../include -I../share -I../mksrfdata -I../mkinidata -I../main -I$(NETCDF_INC) + LDFLAGS = -L$(NETCDF_LIB) -lnetcdff -lnetcdf -llapack -lblas + + + +#============================================================ +# CaMa-Flood Mkinclude (for Linux, gfortran) + +RM = /bin/rm -f +CP = /bin/cp +#---- +# Pre-Prosessing options +# DMPI=-DUseMPI: activate when MPI parallelization is used +# DCDF=-DUseCDF: activate when using netCDF, comment out when not needed +# DATM=-DNoAtom: activate when OMP ATOMIC calculation should be avoided (bit identical simulation) +#---- +#DMPI=-DUseMPI +DCDF=-DUseCDF -DUseCDF_CMF +#DATM=-DNoAtom +CFLAGS=$(DMPI) $(DCDF) $(DATM) +#---- +FCMP = /usr/bin/gfortran -fopenmp +FC = /usr/bin/gfortran + +LFLAGS = +FFLAGS = -O3 -Wall -cpp -free -fimplicit-none -fbounds-check -fbacktrace diff --git a/include/Makeoptions.gnu b/include/Makeoptions.land.gnu old mode 100644 new mode 100755 similarity index 89% rename from include/Makeoptions.gnu rename to include/Makeoptions.land.gnu index 75b08623..98131332 --- a/include/Makeoptions.gnu +++ b/include/Makeoptions.land.gnu @@ -4,11 +4,8 @@ FF = mpif90 -fopenmp -NETCDF_LIB = /usr/lib/x86_64-linux-gnu -NETCDF_INC = /usr/include - -# NETCDF_LIB = /opt/netcdf-c-4.9.2-fortran-4.6.0-gnu/lib -# NETCDF_INC = /opt/netcdf-c-4.9.2-fortran-4.6.0-gnu/include + NETCDF_LIB = /opt/netcdf-c-4.9.2-fortran-4.6.0-gnu/lib + NETCDF_INC = /opt/netcdf-c-4.9.2-fortran-4.6.0-gnu/include MOD_CMD = -J diff --git a/include/Makeoptions.intel b/include/Makeoptions.land.intel similarity index 100% rename from include/Makeoptions.intel rename to include/Makeoptions.land.intel diff --git a/main/MOD_LAIReadin.F90 b/main/MOD_LAIReadin.F90 index a3ab76dd..03fa1f72 100644 --- a/main/MOD_LAIReadin.F90 +++ b/main/MOD_LAIReadin.F90 @@ -114,7 +114,7 @@ SUBROUTINE LAI_readin (year, time, dir_landdata) #ifdef URBAN_MODEL IF(m == URBAN) CYCLE #endif - IF( m == 0 )THEN + IF(m == 0 .or. m == WATERBODY)THEN fveg(npatch) = 0. tlai(npatch) = 0. tsai(npatch) = 0. diff --git a/mkinidata/MOD_IniTimeVariable.F90 b/mkinidata/MOD_IniTimeVariable.F90 index b379e262..40a4877a 100644 --- a/mkinidata/MOD_IniTimeVariable.F90 +++ b/mkinidata/MOD_IniTimeVariable.F90 @@ -333,9 +333,9 @@ SUBROUTINE IniTimeVar(ipatch, patchtype& IF(patchtype <= 5)THEN ! land grid ! (1) SOIL temperature, water and SNOW - ! Variables: t_soisno, wliq_soisno, wice_soisno - ! snowdp, sag, scv, fsno, snl, z_soisno, dz_soisno + ! Variables: t_soisno, wliq_soisno, wice_soisno, wa, zwt IF (use_soilini) THEN + ! (1.1) all temperature, water and zwt from data. zi_soi_a(:) = (/0., zi_soi/) @@ -408,9 +408,36 @@ SUBROUTINE IniTimeVar(ipatch, patchtype& wa = wa + 5000. ENDIF + ELSEIF (use_wtd) THEN + ! (1.2) only zwt is from data. + + DO j = 1, nl_soil + IF(patchtype==3)THEN !land ice + t_soisno(j) = 253. + wliq_soisno(j) = 0. + wice_soisno(j) = dz_soisno(j)*denice + ELSE + t_soisno(j) = 283. + wliq_soisno(j) = dz_soisno(j)*porsl(j)*denh2o + wice_soisno(j) = 0. + ENDIF + ENDDO + + IF (patchtype <= 1) THEN + CALL get_water_equilibrium_state (zwtmm, nl_soil, wliq_soisno(1:nl_soil), smp, hk, wa, & + zc_soimm, zi_soimm, porsl, vliq_r, psi0, hksati, nprms, prms) + ELSE + wa = 0. + zwt = 0. + ENDIF + + IF (.not. DEF_USE_VariablySaturatedFlow) THEN + wa = wa + 5000. + ENDIF + ELSE + ! (1.3) cold start - ! soil temperature, water content DO j = 1, nl_soil IF(patchtype==3)THEN !land ice t_soisno(j) = 253. @@ -423,8 +450,21 @@ SUBROUTINE IniTimeVar(ipatch, patchtype& ENDIF ENDDO + IF (DEF_USE_VariablySaturatedFlow) THEN + wa = 0. + zwt = zi_soimm(nl_soil)/1000. + ELSE + ! water table depth (initially at 1.0 m below the model bottom; wa when zwt + ! is below the model bottom zi(nl_soil) + wa = 4800. !assuming aquifer capacity is 5000 mm + zwt = (25. + z_soisno(nl_soil))+dz_soisno(nl_soil)/2. - wa/1000./0.2 !to result in zwt = zi(nl_soil) + 1.0 m + ENDIF + ENDIF + + ! (2) snow initialization + ! variables: snowdp, sag, scv, fsno, snl, z_soisno, dz_soisno z0m = htop * z0mr #if (defined LULC_IGBP_PFT || defined LULC_IGBP_PC) IF(patchtype==0)THEN @@ -500,34 +540,6 @@ SUBROUTINE IniTimeVar(ipatch, patchtype& ENDIF - ! (2) SOIL aquifer and water table - ! Variables: wa, zwt - IF (.not. use_wtd) THEN - - IF (.not. use_soilini) THEN - IF (DEF_USE_VariablySaturatedFlow) THEN - wa = 0. - zwt = zi_soimm(nl_soil)/1000. - ELSE - ! water table depth (initially at 1.0 m below the model bottom; wa when zwt - ! is below the model bottom zi(nl_soil) - wa = 4800. !assuming aquifer capacity is 5000 mm - zwt = (25. + z_soisno(nl_soil))+dz_soisno(nl_soil)/2. - wa/1000./0.2 !to result in zwt = zi(nl_soil) + 1.0 m - ENDIF - ENDIF - ELSE - IF (patchtype <= 1) THEN - CALL get_water_equilibrium_state (zwtmm, nl_soil, wliq_soisno(1:nl_soil), smp, hk, wa, & - zc_soimm, zi_soimm, porsl, vliq_r, psi0, hksati, nprms, prms) - ELSE - wa = 0. - zwt = 0. - ENDIF - - IF (.not. DEF_USE_VariablySaturatedFlow) THEN - wa = wa + 5000. - ENDIF - ENDIF ! (3) soil matrix potential hydraulic conductivity ! Variables: smp, hk diff --git a/mksrfdata/Aggregation_PercentagesPFT.F90 b/mksrfdata/Aggregation_PercentagesPFT.F90 index 781df19e..d24f2fc9 100644 --- a/mksrfdata/Aggregation_PercentagesPFT.F90 +++ b/mksrfdata/Aggregation_PercentagesPFT.F90 @@ -203,10 +203,12 @@ SUBROUTINE Aggregation_PercentagesPFT (gland, dir_rawdata, dir_model_landdata, l -1.0e36_r8, lndname, 'pct_crop_patch', compress = 1, write_mode = 'one') #endif #else - allocate (SITE_croptyp(numpatch)) - allocate (SITE_pctcrop(numpatch)) - SITE_croptyp = cropclass - SITE_pctcrop = pctshrpch + IF (.not. USE_SITE_pctcrop) THEN + allocate (SITE_croptyp(numpatch)) + allocate (SITE_pctcrop(numpatch)) + SITE_croptyp = cropclass + SITE_pctcrop = pctshrpch + ENDIF #endif #endif diff --git a/mksrfdata/MOD_LandCrop.F90 b/mksrfdata/MOD_LandCrop.F90 index 771e3ad3..7a874815 100644 --- a/mksrfdata/MOD_LandCrop.F90 +++ b/mksrfdata/MOD_LandCrop.F90 @@ -150,6 +150,8 @@ SUBROUTINE landcrop_build (lc_year) CALL pixelsetshared_build (landpatch, gcrop, cropdata, N_CFT, cropfilter, & pctshrpch, cropclass, fracin = pctshared) + + cropclass = cropclass + N_PFT - 1 numpatch = landpatch%nset diff --git a/mksrfdata/MOD_LandPFT.F90 b/mksrfdata/MOD_LandPFT.F90 index 61f83de3..bc267c19 100644 --- a/mksrfdata/MOD_LandPFT.F90 +++ b/mksrfdata/MOD_LandPFT.F90 @@ -126,7 +126,7 @@ SUBROUTINE landpft_build (lc_year) #ifdef CROP ELSEIF (landpatch%settyp(1) == CROPLAND) THEN DO ipft = 1, numpft - landpft%settyp(ipft) = cropclass(ipft) + N_PFT - 1 + landpft%settyp(ipft) = cropclass(ipft) pft2patch (ipft) = ipft patch_pft_s (ipft) = ipft patch_pft_e (ipft) = ipft @@ -273,7 +273,7 @@ SUBROUTINE landpft_build (lc_year) landpft%eindex(npft) = landpatch%eindex(ipatch) landpft%ipxstt(npft) = landpatch%ipxstt(ipatch) landpft%ipxend(npft) = landpatch%ipxend(ipatch) - landpft%settyp(npft) = cropclass(ipatch) + N_PFT - 1 + landpft%settyp(npft) = cropclass(ipatch) landpft%pctshared(npft) = landpatch%pctshared(ipatch) diff --git a/mksrfdata/MOD_SingleSrfdata.F90 b/mksrfdata/MOD_SingleSrfdata.F90 index a4acd985..998b7ffb 100644 --- a/mksrfdata/MOD_SingleSrfdata.F90 +++ b/mksrfdata/MOD_SingleSrfdata.F90 @@ -24,7 +24,7 @@ MODULE MOD_SingleSrfdata #endif #ifdef CROP - real(r8), allocatable :: SITE_croptyp (:) + integer, allocatable :: SITE_croptyp (:) real(r8), allocatable :: SITE_pctcrop (:) #endif diff --git a/run/CRA40_Grid_50km_IGBP_VG.nml b/run/CRA40_Grid_50km_IGBP_VG.nml deleted file mode 100644 index a4883f44..00000000 --- a/run/CRA40_Grid_50km_IGBP_VG.nml +++ /dev/null @@ -1,71 +0,0 @@ -&nl_colm - -! Author: Shupeng Zhang -! Description : include soil state init from data. - - DEF_CASE_NAME = 'CRA40' - - - DEF_domain%edges = 20.0 - DEF_domain%edgen = 25.0 - DEF_domain%edgew = 109.0 - DEF_domain%edgee = 118.0 - - DEF_simulation_time%greenwich = .TRUE. - DEF_simulation_time%start_year = 1980 - DEF_simulation_time%start_month = 1 - DEF_simulation_time%start_day = 1 - DEF_simulation_time%start_sec = 21600 - DEF_simulation_time%end_year = 2015 - DEF_simulation_time%end_month = 12 - DEF_simulation_time%end_day = 31 - DEF_simulation_time%end_sec = 86400 - DEF_simulation_time%spinup_year = 0 - DEF_simulation_time%spinup_month = 1 - DEF_simulation_time%spinup_day = 365 - DEF_simulation_time%spinup_sec = 86400 - DEF_simulation_time%spinup_repeat = 0 - - DEF_simulation_time%timestep = 1800. - - DEF_dir_rawdata = '/share/home/dq013/zhwei/colm/data/CoLMrawdata/' - DEF_dir_runtime = '/share/home/dq013/zhwei/colm/data/CoLMruntime/' - DEF_dir_output = '/share/home/dq013/zhwei/colm/cases/' - - - ! ----- land units and land sets ----- - ! for GRIDBASED - DEF_GRIDBASED_lon_res = 0.5 - DEF_GRIDBASED_lat_res = 0.5 - - - ! soil state init - DEF_USE_SoilInit = .true. - DEF_file_SoilInit = '/share/home/dq013/zhwei/colm/data/soilstate/soilstate.nc' - - ! LAI setting - DEF_LAI_MONTHLY = .true. - DEF_LAI_CHANGE_YEARLY = .false. - - DEF_USE_PLANTHYDRAULICS = .false. - - ! ----- forcing ----- - ! Options : - ! PRINCETON | GSWP3 | QIAN | CRUNCEPV4 | CRUNCEPV7 | ERA5LAND | ERA5 | MSWX - ! WFDE5 | CRUJRA | WFDEI | JRA55 | GDAS | CMFD | POINT | JRA3Q - DEF_forcing_namelist = '/share/home/dq013/zhwei/colm/CoLM202X-CRA40/CoLM202X/run/forcing/CRA40.nml' - - ! ----- history ----- - DEF_hist_grid_as_forcing = .true. - DEF_WRST_FREQ = 'YEARLY' ! write restart file frequency: HOURLY/DAILY/MONTHLY/YEARLY - DEF_HIST_FREQ = 'MONTHLY' ! write history file frequency: HOURLY/DAILY/MONTHLY/YEARLY - DEF_HIST_groupby = 'MONTH' ! history in one file: DAY/MONTH/YEAR - DEF_HIST_mode = 'one' ! history in one or block - DEF_REST_CompressLevel = 1 - DEF_HIST_CompressLevel = 1 - - DEF_HIST_WriteBack = .true. - - DEF_hist_vars_out_default = .true. - -/ diff --git a/run/cama_flood.nml b/run/CaMa/cama_flood.nml old mode 100755 new mode 100644 similarity index 100% rename from run/cama_flood.nml rename to run/CaMa/cama_flood.nml diff --git a/run/cama_flood_10km.nml b/run/CaMa/cama_flood_10km.nml similarity index 100% rename from run/cama_flood_10km.nml rename to run/CaMa/cama_flood_10km.nml diff --git a/run/cama_flood_US_30km.nml b/run/CaMa/cama_flood_US_30km.nml similarity index 100% rename from run/cama_flood_US_30km.nml rename to run/CaMa/cama_flood_US_30km.nml diff --git a/run/CRA40_Grid_30km_IGBP_VG.nml b/run/examples/CRA40_Grid_30km_IGBP_VG.nml old mode 100755 new mode 100644 similarity index 100% rename from run/CRA40_Grid_30km_IGBP_VG.nml rename to run/examples/CRA40_Grid_30km_IGBP_VG.nml diff --git a/run/China_Grid_50km_IGBP_VG.nml b/run/examples/China_Grid_50km_IGBP_VG.nml similarity index 100% rename from run/China_Grid_50km_IGBP_VG.nml rename to run/examples/China_Grid_50km_IGBP_VG.nml diff --git a/run/Global_Grid_2x2_PFT_VG_BGC.nml b/run/examples/Global_Grid_2x2_PFT_VG_BGC.nml similarity index 100% rename from run/Global_Grid_2x2_PFT_VG_BGC.nml rename to run/examples/Global_Grid_2x2_PFT_VG_BGC.nml diff --git a/run/Global_Grid_30km_IGBP_VG_CaMa.nml b/run/examples/Global_Grid_30km_IGBP_VG_CaMa.nml old mode 100755 new mode 100644 similarity index 100% rename from run/Global_Grid_30km_IGBP_VG_CaMa.nml rename to run/examples/Global_Grid_30km_IGBP_VG_CaMa.nml diff --git a/run/Global_Grid_50km_IGBP_CB_URBAN.nml b/run/examples/Global_Grid_50km_IGBP_CB_URBAN.nml similarity index 100% rename from run/Global_Grid_50km_IGBP_CB_URBAN.nml rename to run/examples/Global_Grid_50km_IGBP_CB_URBAN.nml diff --git a/run/GreaterBay_Grid_10km_IGBP_VG.nml b/run/examples/GreaterBay_Grid_10km_IGBP_VG.nml similarity index 100% rename from run/GreaterBay_Grid_10km_IGBP_VG.nml rename to run/examples/GreaterBay_Grid_10km_IGBP_VG.nml diff --git a/run/PearlRiver_Catch_100km_IGBP_VG.nml b/run/examples/PearlRiver_Catch_100km_IGBP_VG.nml similarity index 100% rename from run/PearlRiver_Catch_100km_IGBP_VG.nml rename to run/examples/PearlRiver_Catch_100km_IGBP_VG.nml diff --git a/run/PoyangLake_Grid_5km_IGBP_VG.nml b/run/examples/PoyangLake_Grid_5km_IGBP_VG.nml similarity index 100% rename from run/PoyangLake_Grid_5km_IGBP_VG.nml rename to run/examples/PoyangLake_Grid_5km_IGBP_VG.nml diff --git a/run/RegChina_Grid_50km_IGBP_CB_LULCC.nml b/run/examples/RegChina_Grid_50km_IGBP_CB_LULCC.nml similarity index 100% rename from run/RegChina_Grid_50km_IGBP_CB_LULCC.nml rename to run/examples/RegChina_Grid_50km_IGBP_CB_LULCC.nml diff --git a/run/SiteSYSUAtmos_IGBP_VG.nml b/run/examples/SiteSYSUAtmos_IGBP_VG.nml similarity index 100% rename from run/SiteSYSUAtmos_IGBP_VG.nml rename to run/examples/SiteSYSUAtmos_IGBP_VG.nml diff --git a/run/US_Grid_10km_IGBP_VG_CaMa.nml b/run/examples/US_Grid_10km_IGBP_VG_CaMa.nml similarity index 100% rename from run/US_Grid_10km_IGBP_VG_CaMa.nml rename to run/examples/US_Grid_10km_IGBP_VG_CaMa.nml diff --git a/run/examples/full_history_variables.nml b/run/examples/full_history_variables.nml new file mode 100644 index 00000000..8eabbf9c --- /dev/null +++ b/run/examples/full_history_variables.nml @@ -0,0 +1,353 @@ +&nl_colm_history + + ! ----------- history ------------ + ! A full list of output variables. + + DEF_hist_vars%xy_us = .true. + DEF_hist_vars%xy_vs = .true. + DEF_hist_vars%xy_t = .true. + DEF_hist_vars%xy_q = .true. + DEF_hist_vars%xy_prc = .true. + DEF_hist_vars%xy_prl = .true. + DEF_hist_vars%xy_pbot = .true. + DEF_hist_vars%xy_frl = .true. + DEF_hist_vars%xy_solarin = .true. + DEF_hist_vars%xy_rain = .true. + DEF_hist_vars%xy_snow = .true. + DEF_hist_vars%xy_ozone = .true. + DEF_hist_vars%xy_hpbl = .true. + + DEF_hist_vars%taux = .true. + DEF_hist_vars%tauy = .true. + DEF_hist_vars%fsena = .true. + DEF_hist_vars%lfevpa = .true. + DEF_hist_vars%fevpa = .true. + DEF_hist_vars%fsenl = .true. + DEF_hist_vars%fevpl = .true. + DEF_hist_vars%etr = .true. + DEF_hist_vars%fseng = .true. + DEF_hist_vars%fevpg = .true. + DEF_hist_vars%fgrnd = .true. + DEF_hist_vars%sabvsun = .true. + DEF_hist_vars%sabvsha = .true. + DEF_hist_vars%sabg = .true. + DEF_hist_vars%olrg = .true. + DEF_hist_vars%rnet = .true. + DEF_hist_vars%xerr = .true. + DEF_hist_vars%zerr = .true. + DEF_hist_vars%rsur = .true. + DEF_hist_vars%rsur_se = .true. + DEF_hist_vars%rsur_ie = .true. + DEF_hist_vars%rsub = .true. + DEF_hist_vars%rnof = .true. + DEF_hist_vars%xwsur = .true. + DEF_hist_vars%xwsub = .true. + DEF_hist_vars%qintr = .true. + DEF_hist_vars%qinfl = .true. + DEF_hist_vars%qdrip = .true. + DEF_hist_vars%wat = .true. + DEF_hist_vars%wat_inst = .true. + DEF_hist_vars%wetwat = .true. + DEF_hist_vars%wetwat_inst = .true. + DEF_hist_vars%assim = .true. + DEF_hist_vars%respc = .true. + DEF_hist_vars%qcharge = .true. + DEF_hist_vars%t_grnd = .true. + DEF_hist_vars%tleaf = .true. + DEF_hist_vars%ldew = .true. + DEF_hist_vars%scv = .true. + DEF_hist_vars%snowdp = .true. + DEF_hist_vars%fsno = .true. + DEF_hist_vars%sigf = .true. + DEF_hist_vars%green = .true. + DEF_hist_vars%lai = .true. + DEF_hist_vars%laisun = .true. + DEF_hist_vars%laisha = .true. + DEF_hist_vars%sai = .true. + DEF_hist_vars%alb = .true. + DEF_hist_vars%emis = .true. + DEF_hist_vars%z0m = .true. + DEF_hist_vars%trad = .true. + DEF_hist_vars%rss = .true. + DEF_hist_vars%tref = .true. + DEF_hist_vars%qref = .true. + + DEF_hist_vars%fsen_roof = .true. + DEF_hist_vars%fsen_wsun = .true. + DEF_hist_vars%fsen_wsha = .true. + DEF_hist_vars%fsen_gimp = .true. + DEF_hist_vars%fsen_gper = .true. + DEF_hist_vars%fsen_urbl = .true. + DEF_hist_vars%lfevp_roof = .true. + DEF_hist_vars%lfevp_gimp = .true. + DEF_hist_vars%lfevp_gper = .true. + DEF_hist_vars%lfevp_urbl = .true. + DEF_hist_vars%fhac = .true. + DEF_hist_vars%fwst = .true. + DEF_hist_vars%fach = .true. + DEF_hist_vars%fhah = .true. + DEF_hist_vars%meta = .true. + DEF_hist_vars%vehc = .true. + DEF_hist_vars%t_room = .true. + DEF_hist_vars%tafu = .true. + DEF_hist_vars%t_roof = .true. + DEF_hist_vars%t_wall = .true. + + DEF_hist_vars%assimsun = .true. + DEF_hist_vars%assimsha = .true. + DEF_hist_vars%etrsun = .true. + DEF_hist_vars%etrsha = .true. + + DEF_hist_vars%leafc = .true. + DEF_hist_vars%leafc_storage = .true. + DEF_hist_vars%leafc_xfer = .true. + DEF_hist_vars%frootc = .true. + DEF_hist_vars%frootc_storage = .true. + DEF_hist_vars%frootc_xfer = .true. + DEF_hist_vars%livestemc = .true. + DEF_hist_vars%livestemc_storage = .true. + DEF_hist_vars%livestemc_xfer = .true. + DEF_hist_vars%deadstemc = .true. + DEF_hist_vars%deadstemc_storage = .true. + DEF_hist_vars%deadstemc_xfer = .true. + DEF_hist_vars%livecrootc = .true. + DEF_hist_vars%livecrootc_storage = .true. + DEF_hist_vars%livecrootc_xfer = .true. + DEF_hist_vars%deadcrootc = .true. + DEF_hist_vars%deadcrootc_storage = .true. + DEF_hist_vars%deadcrootc_xfer = .true. + DEF_hist_vars%grainc = .true. + DEF_hist_vars%grainc_storage = .true. + DEF_hist_vars%grainc_xfer = .true. + DEF_hist_vars%leafn = .true. + DEF_hist_vars%leafn_storage = .true. + DEF_hist_vars%leafn_xfer = .true. + DEF_hist_vars%frootn = .true. + DEF_hist_vars%frootn_storage = .true. + DEF_hist_vars%frootn_xfer = .true. + DEF_hist_vars%livestemn = .true. + DEF_hist_vars%livestemn_storage = .true. + DEF_hist_vars%livestemn_xfer = .true. + DEF_hist_vars%deadstemn = .true. + DEF_hist_vars%deadstemn_storage = .true. + DEF_hist_vars%deadstemn_xfer = .true. + DEF_hist_vars%livecrootn = .true. + DEF_hist_vars%livecrootn_storage = .true. + DEF_hist_vars%livecrootn_xfer = .true. + DEF_hist_vars%deadcrootn = .true. + DEF_hist_vars%deadcrootn_storage = .true. + DEF_hist_vars%deadcrootn_xfer = .true. + DEF_hist_vars%grainn = .true. + DEF_hist_vars%grainn_storage = .true. + DEF_hist_vars%grainn_xfer = .true. + DEF_hist_vars%retrasn = .true. + DEF_hist_vars%gpp = .true. + DEF_hist_vars%downreg = .true. + DEF_hist_vars%ar = .true. + DEF_hist_vars%cwdprod = .true. + DEF_hist_vars%cwddecomp = .true. + DEF_hist_vars%hr = .true. + DEF_hist_vars%fpg = .true. + DEF_hist_vars%fpi = .true. + DEF_hist_vars%gpp_enftemp = .false. !1 + DEF_hist_vars%gpp_enfboreal = .false. !2 + DEF_hist_vars%gpp_dnfboreal = .false. !3 + DEF_hist_vars%gpp_ebftrop = .false. !4 + DEF_hist_vars%gpp_ebftemp = .false. !5 + DEF_hist_vars%gpp_dbftrop = .false. !6 + DEF_hist_vars%gpp_dbftemp = .false. !7 + DEF_hist_vars%gpp_dbfboreal = .false. !8 + DEF_hist_vars%gpp_ebstemp = .false. !9 + DEF_hist_vars%gpp_dbstemp = .false. !10 + DEF_hist_vars%gpp_dbsboreal = .false. !11 + DEF_hist_vars%gpp_c3arcgrass = .false. !12 + DEF_hist_vars%gpp_c3grass = .false. !13 + DEF_hist_vars%gpp_c4grass = .false. !14 + DEF_hist_vars%leafc_enftemp = .false. !1 + DEF_hist_vars%leafc_enfboreal = .false. !2 + DEF_hist_vars%leafc_dnfboreal = .false. !3 + DEF_hist_vars%leafc_ebftrop = .false. !4 + DEF_hist_vars%leafc_ebftemp = .false. !5 + DEF_hist_vars%leafc_dbftrop = .false. !6 + DEF_hist_vars%leafc_dbftemp = .false. !7 + DEF_hist_vars%leafc_dbfboreal = .false. !8 + DEF_hist_vars%leafc_ebstemp = .false. !9 + DEF_hist_vars%leafc_dbstemp = .false. !10 + DEF_hist_vars%leafc_dbsboreal = .false. !11 + DEF_hist_vars%leafc_c3arcgrass = .false. !12 + DEF_hist_vars%leafc_c3grass = .false. !13 + DEF_hist_vars%leafc_c4grass = .false. !14 + + DEF_hist_vars%cphase = .true. + DEF_hist_vars%gddmaturity = .true. + DEF_hist_vars%gddplant = .true. + DEF_hist_vars%vf = .true. + DEF_hist_vars%hui = .true. + DEF_hist_vars%cropprod1c = .true. + DEF_hist_vars%cropprod1c_loss = .true. + DEF_hist_vars%cropseedc_deficit = .true. + DEF_hist_vars%grainc_to_cropprodc = .true. + DEF_hist_vars%plantdate_rainfed_temp_corn = .true. + DEF_hist_vars%plantdate_irrigated_temp_corn = .true. + DEF_hist_vars%plantdate_rainfed_spwheat = .true. + DEF_hist_vars%plantdate_irrigated_spwheat = .true. + DEF_hist_vars%plantdate_rainfed_wtwheat = .true. + DEF_hist_vars%plantdate_irrigated_wtwheat = .true. + DEF_hist_vars%plantdate_rainfed_temp_soybean = .true. + DEF_hist_vars%plantdate_irrigated_temp_soybean = .true. + DEF_hist_vars%plantdate_rainfed_cotton = .true. + DEF_hist_vars%plantdate_irrigated_cotton = .true. + DEF_hist_vars%plantdate_rainfed_rice = .true. + DEF_hist_vars%plantdate_irrigated_rice = .true. + DEF_hist_vars%plantdate_rainfed_sugarcane = .true. + DEF_hist_vars%plantdate_irrigated_sugarcane = .true. + DEF_hist_vars%plantdate_rainfed_trop_corn = .true. + DEF_hist_vars%plantdate_irrigated_trop_corn = .true. + DEF_hist_vars%plantdate_rainfed_trop_soybean = .true. + DEF_hist_vars%plantdate_irrigated_trop_soybean = .true. + DEF_hist_vars%plantdate_unmanagedcrop = .true. + DEF_hist_vars%cropprodc_rainfed_temp_corn = .true. + DEF_hist_vars%cropprodc_irrigated_temp_corn = .true. + DEF_hist_vars%cropprodc_rainfed_spwheat = .true. + DEF_hist_vars%cropprodc_irrigated_spwheat = .true. + DEF_hist_vars%cropprodc_rainfed_wtwheat = .true. + DEF_hist_vars%cropprodc_irrigated_wtwheat = .true. + DEF_hist_vars%cropprodc_rainfed_temp_soybean = .true. + DEF_hist_vars%cropprodc_irrigated_temp_soybean = .true. + DEF_hist_vars%cropprodc_rainfed_cotton = .true. + DEF_hist_vars%cropprodc_irrigated_cotton = .true. + DEF_hist_vars%cropprodc_rainfed_rice = .true. + DEF_hist_vars%cropprodc_irrigated_rice = .true. + DEF_hist_vars%cropprodc_rainfed_sugarcane = .true. + DEF_hist_vars%cropprodc_irrigated_sugarcane = .true. + DEF_hist_vars%cropprodc_rainfed_trop_corn = .true. + DEF_hist_vars%cropprodc_irrigated_trop_corn = .true. + DEF_hist_vars%cropprodc_rainfed_trop_soybean = .true. + DEF_hist_vars%cropprodc_irrigated_trop_soybean = .true. + DEF_hist_vars%cropprodc_unmanagedcrop = .true. + + DEF_hist_vars%grainc_to_seed = .true. + DEF_hist_vars%fert_to_sminn = .true. + + DEF_hist_vars%huiswheat = .true. + DEF_hist_vars%pdcorn = .true. + DEF_hist_vars%pdswheat = .true. + DEF_hist_vars%pdwwheat = .true. + DEF_hist_vars%pdsoybean = .true. + DEF_hist_vars%pdcotton = .true. + DEF_hist_vars%pdrice1 = .true. + DEF_hist_vars%pdrice2 = .true. + DEF_hist_vars%pdsugarcane = .true. + DEF_hist_vars%fertnitro_corn = .true. + DEF_hist_vars%fertnitro_swheat = .true. + DEF_hist_vars%fertnitro_wwheat = .true. + DEF_hist_vars%fertnitro_soybean = .true. + DEF_hist_vars%fertnitro_cotton = .true. + DEF_hist_vars%fertnitro_rice1 = .true. + DEF_hist_vars%fertnitro_rice2 = .true. + DEF_hist_vars%fertnitro_sugarcane = .true. + DEF_hist_vars%irrig_method_corn = .true. + DEF_hist_vars%irrig_method_swheat = .true. + DEF_hist_vars%irrig_method_wwheat = .true. + DEF_hist_vars%irrig_method_soybean = .true. + DEF_hist_vars%irrig_method_cotton = .true. + DEF_hist_vars%irrig_method_rice1 = .true. + DEF_hist_vars%irrig_method_rice2 = .true. + DEF_hist_vars%irrig_method_sugarcane = .true. + + DEF_hist_vars%irrig_rate = .true. + DEF_hist_vars%deficit_irrig = .true. + DEF_hist_vars%sum_irrig = .true. + DEF_hist_vars%sum_irrig_count = .true. + + DEF_hist_vars%ndep_to_sminn = .true. + DEF_hist_vars%CONC_O2_UNSAT = .true. + DEF_hist_vars%O2_DECOMP_DEPTH_UNSAT = .true. + DEF_hist_vars%abm = .true. + DEF_hist_vars%gdp = .true. + DEF_hist_vars%peatf = .true. + DEF_hist_vars%hdm = .true. + DEF_hist_vars%lnfm = .true. + + DEF_hist_vars%t_soisno = .true. + DEF_hist_vars%wliq_soisno = .true. + DEF_hist_vars%wice_soisno = .true. + + DEF_hist_vars%h2osoi = .true. + DEF_hist_vars%rstfacsun = .true. + DEF_hist_vars%rstfacsha = .true. + DEF_hist_vars%gssun = .true. + DEF_hist_vars%gssha = .true. + DEF_hist_vars%rootr = .true. + DEF_hist_vars%vegwp = .true. + DEF_hist_vars%BD_all = .true. + DEF_hist_vars%wfc = .true. + DEF_hist_vars%OM_density = .true. + DEF_hist_vars%wdsrf = .true. + DEF_hist_vars%wdsrf_inst = .true. + DEF_hist_vars%zwt = .true. + DEF_hist_vars%wa = .true. + DEF_hist_vars%wa_inst = .true. + + DEF_hist_vars%dz_lake = .true. + DEF_hist_vars%t_lake = .true. + DEF_hist_vars%lake_icefrac = .true. + + DEF_hist_vars%litr1c_vr = .true. + DEF_hist_vars%litr2c_vr = .true. + DEF_hist_vars%litr3c_vr = .true. + DEF_hist_vars%soil1c_vr = .true. + DEF_hist_vars%soil2c_vr = .true. + DEF_hist_vars%soil3c_vr = .true. + DEF_hist_vars%cwdc_vr = .true. + DEF_hist_vars%litr1n_vr = .true. + DEF_hist_vars%litr2n_vr = .true. + DEF_hist_vars%litr3n_vr = .true. + DEF_hist_vars%soil1n_vr = .true. + DEF_hist_vars%soil2n_vr = .true. + DEF_hist_vars%soil3n_vr = .true. + DEF_hist_vars%cwdn_vr = .true. + DEF_hist_vars%sminn_vr = .true. + + DEF_hist_vars%ustar = .true. + DEF_hist_vars%ustar2 = .true. + DEF_hist_vars%tstar = .true. + DEF_hist_vars%qstar = .true. + DEF_hist_vars%zol = .true. + DEF_hist_vars%rib = .true. + DEF_hist_vars%fm = .true. + DEF_hist_vars%fh = .true. + DEF_hist_vars%fq = .true. + DEF_hist_vars%us10m = .true. + DEF_hist_vars%vs10m = .true. + DEF_hist_vars%fm10m = .true. + DEF_hist_vars%sr = .true. + DEF_hist_vars%solvd = .true. + DEF_hist_vars%solvi = .true. + DEF_hist_vars%solnd = .true. + DEF_hist_vars%solni = .true. + DEF_hist_vars%srvd = .true. + DEF_hist_vars%srvi = .true. + DEF_hist_vars%srnd = .true. + DEF_hist_vars%srni = .true. + + DEF_hist_vars%solvdln = .true. + DEF_hist_vars%solviln = .true. + DEF_hist_vars%solndln = .true. + DEF_hist_vars%solniln = .true. + DEF_hist_vars%srvdln = .true. + DEF_hist_vars%srviln = .true. + DEF_hist_vars%srndln = .true. + DEF_hist_vars%srniln = .true. + + DEF_hist_vars%xsubs_bsn = .true. + DEF_hist_vars%xsubs_hru = .true. + DEF_hist_vars%riv_height = .true. + DEF_hist_vars%riv_veloct = .true. + DEF_hist_vars%discharge = .true. + DEF_hist_vars%wdsrf_hru = .true. + DEF_hist_vars%veloc_hru = .true. + + DEF_hist_vars%sensors = .true. +/ + diff --git a/run/hist_dynamic_lake.nml b/run/hist_dynamic_lake.nml deleted file mode 100644 index e489d8ba..00000000 --- a/run/hist_dynamic_lake.nml +++ /dev/null @@ -1,10 +0,0 @@ -&nl_colm_history - - ! ----- history ----- - DEF_hist_vars%wdsrf = .true. - DEF_hist_vars%scv = .true. - DEF_hist_vars%dz_lake = .true. - DEF_hist_vars%t_lake = .true. - DEF_hist_vars%lake_icefrac = .true. -/ - diff --git a/run/copy_code b/run/scripts/copy_code similarity index 100% rename from run/copy_code rename to run/scripts/copy_code diff --git a/run/create_clone b/run/scripts/create_clone similarity index 100% rename from run/create_clone rename to run/scripts/create_clone diff --git a/run/create_header b/run/scripts/create_header similarity index 100% rename from run/create_header rename to run/scripts/create_header diff --git a/run/create_namelist b/run/scripts/create_namelist similarity index 100% rename from run/create_namelist rename to run/scripts/create_namelist diff --git a/run/create_newcase b/run/scripts/create_newcase similarity index 100% rename from run/create_newcase rename to run/scripts/create_newcase diff --git a/run/create_scripts b/run/scripts/create_scripts similarity index 100% rename from run/create_scripts rename to run/scripts/create_scripts diff --git a/share/MOD_Utils.F90 b/share/MOD_Utils.F90 index 5e4ee91f..a6de72c1 100644 --- a/share/MOD_Utils.F90 +++ b/share/MOD_Utils.F90 @@ -1074,8 +1074,11 @@ FUNCTION arclen (lat1, lon1, lat2, lon2) real(r8), intent(in) :: lat1, lon1, lat2, lon2 real(r8), parameter :: re = 6.37122e3 ! kilometer + real(r8) :: tmp - arclen = re * acos (sin(lat1)*sin(lat2) + cos(lat1)*cos(lat2) * cos(lon1-lon2)) + tmp = sin(lat1)*sin(lat2) + cos(lat1)*cos(lat2) * cos(lon1-lon2) + tmp = min(max(tmp, -1.), 1.) + arclen = re * acos(tmp) END FUNCTION arclen