Skip to content

Commit

Permalink
Merge pull request #3 from uramirez8707/user/u1r/new_fmsio
Browse files Browse the repository at this point in the history
Replace fms_io with fms2_io
  • Loading branch information
nikizadehgfdl authored Jun 4, 2021
2 parents 1490907 + a0db094 commit 7f34efa
Showing 1 changed file with 9 additions and 21 deletions.
30 changes: 9 additions & 21 deletions atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,17 @@ module atmos_model_mod
use mpp_domains_mod, only : CYCLIC_GLOBAL_DOMAIN, mpp_get_data_domain
use mpp_domains_mod, only : mpp_get_compute_domain, mpp_get_tile_id
use mpp_domains_mod, only : mpp_get_current_ntile
use fms_mod, only : field_exist, read_data, field_size, stdout, set_domain
use fms_mod, only : open_namelist_file, check_nml_error, file_exist, close_file
use fms_io_mod, only : parse_mask_table
use fms_mod, only : stdout
use fms_mod, only : check_nml_error
use fms2_io_mod, only : file_exists, parse_mask_table
use time_manager_mod, only : time_type
use coupler_types_mod, only : coupler_2d_bc_type
use diag_manager_mod, only : diag_axis_init
use constants_mod, only : cp_air, hlv
use mosaic_mod, only : get_mosaic_ntiles
use xgrid_mod, only : grid_box_type
use grid_mod, only : get_grid_ntiles, define_cube_mosaic
use grid_mod, only : get_grid_size, get_grid_cell_vertices
use grid_mod, only : get_grid_cell_centers
use grid2_mod, only : get_grid_ntiles, define_cube_mosaic
use grid2_mod, only : get_grid_size, get_grid_cell_vertices
use grid2_mod, only : get_grid_cell_centers
use diag_integral_mod, only : diag_integral_init
use tracer_manager_mod,only : register_tracers
use field_manager_mod, only : MODEL_LAND
Expand Down Expand Up @@ -382,17 +381,8 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step, do_concurrent_ra
integer :: namelist_unit, io, ierr, stdoutunit

!--- read namelist
#ifdef INTERNAL_FILE_NML
read (input_nml_file, atmos_model_nml, iostat=io)
#else
namelist_unit = open_namelist_file()
ierr=1
do while (ierr /= 0)
read(namelist_unit, nml=atmos_model_nml, iostat=io, end=20)
ierr = check_nml_error (io, 'atmos_model_nml')
enddo
20 call close_file (namelist_unit)
#endif
read (input_nml_file, atmos_model_nml, iostat=io)
ierr = check_nml_error (io, 'atmos_model_nml')

stdoutunit = stdout()
!---- set the atmospheric model time ------
Expand All @@ -405,7 +395,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step, do_concurrent_ra
call get_grid_size('ATM',1,nlon,nlat)


if(file_exist(mask_table)) then
if(file_exists(mask_table)) then
if(ntile > 1) then
call mpp_error(FATAL, &
'atmos_model_init: file '//trim(mask_table)//' should not exist when ntile is not 1')
Expand Down Expand Up @@ -563,8 +553,6 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step, do_concurrent_ra
Atmos % lon_bnd(:,:), &
Atmos % lat_bnd(:,:), area)

call set_domain(Atmos%domain)

end subroutine atmos_model_init
! </SUBROUTINE>

Expand Down

0 comments on commit 7f34efa

Please sign in to comment.