From b231f79debeeb29fa5af2a25cdddb053ecb8a988 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Fri, 6 Sep 2024 11:05:49 -0600 Subject: [PATCH] Comment out a bunch of stuff --- tools/mksurfdata_esmf/src/mksurfdata.F90 | 184 ++++++++++++----------- 1 file changed, 94 insertions(+), 90 deletions(-) diff --git a/tools/mksurfdata_esmf/src/mksurfdata.F90 b/tools/mksurfdata_esmf/src/mksurfdata.F90 index 35ff1807cd..d015fed44c 100644 --- a/tools/mksurfdata_esmf/src/mksurfdata.F90 +++ b/tools/mksurfdata_esmf/src/mksurfdata.F90 @@ -421,11 +421,11 @@ program mksurfdata ! Make LAI and SAI from 1/2 degree data and write to surface dataset ! Write to netcdf file is done inside mklai routine ! ----------------------------------- - if (fsurdat /= ' ') then - call mklai(mksrf_flai_mesh, mksrf_flai, mesh_model, pioid, rc=rc) - flush(ndiag) - if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mklai') - end if +! if (fsurdat /= ' ') then +! call mklai(mksrf_flai_mesh, mksrf_flai, mesh_model, pioid, rc=rc) +! flush(ndiag) +! if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mklai') +! end if ! ----------------------------------- ! Make PFTs [pctnatpft, pctcft] from dataset [fvegtyp] @@ -436,33 +436,33 @@ program mksurfdata allocate(pctnatpft(lsize_o)) ; allocate(pctcft(lsize_o)) ; allocate(landfrac_pft(lsize_o)) ; landfrac_pft(:) = spval - call mkpft( mksrf_fvegtyp_mesh, mksrf_fvegtyp, mesh_model, & - pctlnd_o=pctlnd_pft, pctnatpft_o=pctnatpft, pctcft_o=pctcft, rc=rc) +! call mkpft( mksrf_fvegtyp_mesh, mksrf_fvegtyp, mesh_model, & +! pctlnd_o=pctlnd_pft, pctnatpft_o=pctnatpft, pctcft_o=pctcft, rc=rc) flush(ndiag) if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkdomain') do n = 1,lsize_o landfrac_pft(n) = pctlnd_pft(n)/100._r8 end do - if (fsurdat /= ' ') then - if (root_task) write(ndiag, '(a)') trim(subname)//" writing land fraction from pft dataset" - if (root_task) flush(ndiag) - call mkfile_output(pioid, mesh_model, 'LANDFRAC_PFT', landfrac_pft, rc=rc) - if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkfile_output') - call pio_syncfile(pioid) - end if +! if (fsurdat /= ' ') then +! if (root_task) write(ndiag, '(a)') trim(subname)//" writing land fraction from pft dataset" +! if (root_task) flush(ndiag) +! call mkfile_output(pioid, mesh_model, 'LANDFRAC_PFT', landfrac_pft, rc=rc) +! if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkfile_output') +! call pio_syncfile(pioid) +! end if ! ----------------------------------- ! Make constant harvesting data at model resolution ! ----------------------------------- ! Note that this call must come after call to mkpftInit - since num_cft is set there ! Output data is written in mkharvest - if (fsurdat /= ' ') then - call mkharvest( mksrf_fhrvtyp_mesh, mksrf_fhrvtyp, mesh_model, pioid, & - rc=rc ) - flush(ndiag) - if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkharvest_init') - end if +! if (fsurdat /= ' ') then +! call mkharvest( mksrf_fhrvtyp_mesh, mksrf_fhrvtyp, mesh_model, pioid, & +! rc=rc ) +! flush(ndiag) +! if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkharvest_init') +! end if ! ----------------------------------- ! Make inland water [pctlak, pctwet] @@ -471,18 +471,18 @@ program mksurfdata ! Need to keep pctlak and pctwet external for use below allocate ( pctlak(lsize_o)) ; pctlak(:) = spval allocate ( pctlak_max(lsize_o)) ; pctlak_max(:) = spval - call mkpctlak(mksrf_fpctlak_mesh, mksrf_fpctlak, mesh_model, pctlak, pioid, & - rc=rc) +! call mkpctlak(mksrf_fpctlak_mesh, mksrf_fpctlak, mesh_model, pctlak, pioid, & +! rc=rc) flush(ndiag) if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkpctlak') - call mklakdep(mksrf_flakdep_mesh, mksrf_flakdep, mesh_model, pioid, fsurdat, & - rc=rc) +! call mklakdep(mksrf_flakdep_mesh, mksrf_flakdep, mesh_model, pioid, fsurdat, & +! rc=rc) flush(ndiag) if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mklakdep') allocate ( pctwet(lsize_o)) ; pctwet(:) = spval allocate ( pctwet_orig(lsize_o)) ; pctwet_orig(:) = spval - call mkwetlnd(mksrf_fwetlnd_mesh, mksrf_fwetlnd, mesh_model, pctwet, rc=rc) +! call mkwetlnd(mksrf_fwetlnd_mesh, mksrf_fwetlnd, mesh_model, pctwet, rc=rc) flush(ndiag) if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkwetlnd') @@ -498,7 +498,7 @@ program mksurfdata ! ----------------------------------- allocate (pctgla(lsize_o)) ; pctgla(:) = spval allocate (pctgla_orig(lsize_o)) ; pctgla_orig(:) = spval - call mkglacier (mksrf_fglacier_mesh, mksrf_fglacier, mesh_model, glac_o=pctgla, rc=rc) +! call mkglacier (mksrf_fglacier_mesh, mksrf_fglacier, mesh_model, glac_o=pctgla, rc=rc) flush(ndiag) if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkglacier') @@ -507,7 +507,7 @@ program mksurfdata ! ----------------------------------- if (fsurdat /= ' ') then ! GLACIER_REGION is written out in the subroutine - call mkglacierregion(mksrf_fglacierregion_mesh, mksrf_fglacierregion, mesh_model, pioid, rc) + ! call mkglacierregion(mksrf_fglacierregion_mesh, mksrf_fglacierregion, mesh_model, pioid, rc) flush(ndiag) if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkglacierregion') end if @@ -522,62 +522,66 @@ program mksurfdata if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mksoiltex') end if + call pio_closefile(pioid) + exit + + ! ----------------------------------- ! Make soil color classes [soicol] [fsoicol] ! ----------------------------------- - if (fsurdat /= ' ') then - ! SOIL_COLOR and mxsoil_color is written out in the subroutine - call mksoilcol( mksrf_fsoicol, mksrf_fsoicol_mesh, mesh_model, pioid, rc) - flush(ndiag) - if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mksoilcol') - end if +! if (fsurdat /= ' ') then +! ! SOIL_COLOR and mxsoil_color is written out in the subroutine +! call mksoilcol( mksrf_fsoicol, mksrf_fsoicol_mesh, mesh_model, pioid, rc) +! flush(ndiag) +! if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mksoilcol') +! end if ! ----------------------------------- ! Make soil fmax [fmaxsoil] ! ----------------------------------- - if (fsurdat /= ' ') then - ! FMAX is written out in the subroutine - call mksoilfmax( mksrf_fmax_mesh, mksrf_fmax, mesh_model, pioid, rc) - flush(ndiag) - if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mksoilfmax') - end if +! if (fsurdat /= ' ') then +! ! FMAX is written out in the subroutine +! call mksoilfmax( mksrf_fmax_mesh, mksrf_fmax, mesh_model, pioid, rc) +! flush(ndiag) +! if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mksoilfmax') +! end if ! ----------------------------------- ! Make GDP data [gdp] from [gdp] ! ----------------------------------- - if (fsurdat /= ' ') then - ! gdp is written out in the subroutine - call mkgdp (mksrf_fgdp_mesh, mksrf_fgdp, mesh_model, pioid, rc=rc) - flush(ndiag) - if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkdomain') - end if +! if (fsurdat /= ' ') then +! ! gdp is written out in the subroutine +! call mkgdp (mksrf_fgdp_mesh, mksrf_fgdp, mesh_model, pioid, rc=rc) +! flush(ndiag) +! if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkdomain') +! end if ! ----------------------------------- ! Make peat data [fpeat] from [peatf] ! ----------------------------------- - if (fsurdat /= ' ') then - call mkpeat (mksrf_fpeat_mesh, mksrf_fpeat, mesh_model, pioid, rc=rc) - flush(ndiag) - if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkpeat') - end if +! if (fsurdat /= ' ') then +! call mkpeat (mksrf_fpeat_mesh, mksrf_fpeat, mesh_model, pioid, rc=rc) +! flush(ndiag) +! if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkpeat') +! end if ! ----------------------------------- ! Make soil depth data [soildepth] from [soildepthf] ! ----------------------------------- - if (fsurdat /= ' ') then - call mksoildepth( mksrf_fsoildepth_mesh, mksrf_fsoildepth, mesh_model, pioid, rc) - flush(ndiag) - if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mksoildepth') - end if +! if (fsurdat /= ' ') then +! call mksoildepth( mksrf_fsoildepth_mesh, mksrf_fsoildepth, mesh_model, pioid, rc) +! flush(ndiag) +! if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mksoildepth') +! end if ! ----------------------------------- ! Make agricultural fire peak month data [abm] from [abm] ! ----------------------------------- - if (fsurdat /= ' ') then - call mkagfirepkmon (mksrf_fabm_mesh, mksrf_fabm, mesh_model, pioid, rc=rc) - flush(ndiag) - if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkagfirepkmon') - end if +! if (fsurdat /= ' ') then +! call mkagfirepkmon (mksrf_fabm_mesh, mksrf_fabm, mesh_model, pioid, rc=rc) +! flush(ndiag) +! if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkagfirepkmon') +! end if ! ----------------------------------- ! Make urban fraction [pcturb] from [furban] dataset and @@ -586,17 +590,17 @@ program mksurfdata allocate (pcturb_max(lsize_o, numurbl)) ; pcturb_max(:,:) = spval allocate (urban_classes(lsize_o,numurbl)) ; urban_classes(:,:) = spval allocate (urban_region(lsize_o)) ; urban_region(:) = -999 - call mkurban(mksrf_furban_mesh, mksrf_furban, mesh_model, pcturb, & - urban_classes, urban_region, rc=rc) - flush(ndiag) - if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkurban') - if (fsurdat /= ' ') then - if (root_task) write(ndiag, '(a)') trim(subname)//" writing out urban region id" - if (root_task) flush(ndiag) - call mkfile_output(pioid, mesh_model, 'URBAN_REGION_ID', urban_region, rc=rc) - if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkfile_output') - call pio_syncfile(pioid) - end if +! call mkurban(mksrf_furban_mesh, mksrf_furban, mesh_model, pcturb, & +! urban_classes, urban_region, rc=rc) +! flush(ndiag) +! if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkurban') +! if (fsurdat /= ' ') then +! if (root_task) write(ndiag, '(a)') trim(subname)//" writing out urban region id" +! if (root_task) flush(ndiag) +! call mkfile_output(pioid, mesh_model, 'URBAN_REGION_ID', urban_region, rc=rc) +! if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkfile_output') +! call pio_syncfile(pioid) +! end if ! Note that final values of urban are not set and written out until further down ! Adjust pcturb @@ -608,7 +612,7 @@ program mksurfdata ! (this same dataset used to be used for glacier-related purposes as well). ! TODO(wjs, 2016-01-15) A better solution for this urban screening would probably ! be to modify the raw urban data; in that case, I believe we could remove furbtopo. - call mkurban_topo ( mksrf_furbtopo_mesh, mksrf_furbtopo, mesh_model, varname='TOPO_ICE', elev_o=elev, rc=rc) +! call mkurban_topo ( mksrf_furbtopo_mesh, mksrf_furbtopo, mesh_model, varname='TOPO_ICE', elev_o=elev, rc=rc) flush(ndiag) if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkurban_topo') where (elev > elev_thresh) @@ -618,32 +622,32 @@ program mksurfdata ! ----------------------------------- ! Compute topography statistics [topo_stddev, slope] from [ftopostats] ! ----------------------------------- - if (fsurdat /= ' ') then - call mktopostats ( mksrf_ftopostats_mesh, mksrf_ftopostats, mksrf_ftopostats_override, & - mesh_model, pioid, rc=rc) - flush(ndiag) - if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mktopostats') - end if +! if (fsurdat /= ' ') then +! call mktopostats ( mksrf_ftopostats_mesh, mksrf_ftopostats, mksrf_ftopostats_override, & +! mesh_model, pioid, rc=rc) +! flush(ndiag) +! if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mktopostats') +! end if ! ----------------------------------- ! Compute VIC parameters ! ----------------------------------- - if (fsurdat /= ' ') then - if (outnc_vic) then - call mkVICparams ( mksrf_fvic_mesh, mksrf_fvic, mesh_model, pioid, rc) - flush(ndiag) - if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkVICparams') - end if - end if +! if (fsurdat /= ' ') then +! if (outnc_vic) then +! call mkVICparams ( mksrf_fvic_mesh, mksrf_fvic, mesh_model, pioid, rc) +! flush(ndiag) +! if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkVICparams') +! end if +! end if ! ----------------------------------- ! Make VOC emission factors for isoprene [ef1_btr,ef1_fet,ef1_fdt,ef1_shr,ef1_grs,ef1_crp] ! ----------------------------------- - if (fsurdat /= ' ') then - call mkvocef ( mksrf_fvocef_mesh, mksrf_fvocef, mesh_model, pioid, lat, rc) - flush(ndiag) - if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkvocef') - end if +! if (fsurdat /= ' ') then +! call mkvocef ( mksrf_fvocef_mesh, mksrf_fvocef, mesh_model, pioid, lat, rc) +! flush(ndiag) +! if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkvocef') +! end if ! ----------------------------------- ! Save special land unit areas of surface dataset