Skip to content

Commit

Permalink
Added aquaplanet check in mo_drydep.F90
Browse files Browse the repository at this point in the history
This check in get_landuse_and_soilw_from_file() avoids loading the drydep file for aquaplanet runs.

	modified:   components/cam/src/chemistry/mozart/mo_drydep.F90
  • Loading branch information
whannah1 committed Apr 8, 2019
1 parent 0b2a13b commit 9fa4bf2
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions components/cam/src/chemistry/mozart/mo_drydep.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1997,31 +1997,37 @@ end subroutine dvel_inti_xactive
subroutine get_landuse_and_soilw_from_file(do_soilw)
use cam_pio_utils, only : cam_pio_openfile
use ncdio_atm, only : infld
use cam_control_mod, only: aqua_planet
logical, intent(in) :: do_soilw
logical :: readvar

type(file_desc_t) :: piofile
character(len=shr_kind_cl) :: locfn
logical :: lexist

call getfil (drydep_srf_file, locfn, 1, lexist)
if(lexist) then
call cam_pio_openfile(piofile, locfn, PIO_NOWRITE)

call infld('fraction_landuse', piofile, 'ncol','class',' ',1,pcols,1,n_land_type, begchunk,endchunk, &
fraction_landuse, readvar, gridname='physgrid')
if (aqua_planet) then
fraction_landuse = 0.
soilw_3d = 0.
else

if(do_soilw) then
call infld('soilw', piofile, 'ncol','month',' ',1,pcols,1,12, begchunk,endchunk, &
soilw_3d, readvar, gridname='physgrid')
end if
call getfil (drydep_srf_file, locfn, 1, lexist)
if(lexist) then
call cam_pio_openfile(piofile, locfn, PIO_NOWRITE)

call pio_closefile(piofile)
else
call endrun('Unstructured grids require drydep_srf_file ')
end if
call infld('fraction_landuse', piofile, 'ncol','class',' ',1,pcols,1,n_land_type, begchunk,endchunk, &
fraction_landuse, readvar, gridname='physgrid')

if(do_soilw) then
call infld('soilw', piofile, 'ncol','month',' ',1,pcols,1,12, begchunk,endchunk, &
soilw_3d, readvar, gridname='physgrid')
end if

call pio_closefile(piofile)
else
call endrun('Unstructured grids require drydep_srf_file ')
end if

end if ! aqua_planet
end subroutine get_landuse_and_soilw_from_file

!-------------------------------------------------------------------------------------
Expand Down

0 comments on commit 9fa4bf2

Please sign in to comment.