diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index 03a7ae7dc..6944f421b 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit 03a7ae7dc0b93ca9eec0f9e133bfceccf004b083 +Subproject commit 6944f421bba37887394ef9552d8b88869f82dd49 diff --git a/atmos_model.F90 b/atmos_model.F90 index 0a3872631..00821d721 100644 --- a/atmos_model.F90 +++ b/atmos_model.F90 @@ -416,24 +416,6 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step) logunit = stdlog() -!----------------------------------------------------------------------- -! initialize atmospheric model ----- - - IF ( file_exist('input.nml')) THEN -#ifdef INTERNAL_FILE_NML - read(input_nml_file, nml=atmos_model_nml, iostat=io) - ierr = check_nml_error(io, 'atmos_model_nml') -#else - unit = open_namelist_file ( ) - ierr=1 - do while (ierr /= 0) - read (unit, nml=atmos_model_nml, iostat=io, end=10) - ierr = check_nml_error(io,'atmos_model_nml') - enddo - 10 call close_file (unit) -#endif - endif - !---------- initialize atmospheric dynamics after reading the namelist ------- !---------- (need name of CCPP suite definition file from input.nml) --------- call atmosphere_init (Atmos%Time_init, Atmos%Time, Atmos%Time_step,& @@ -453,6 +435,25 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step) Atmos%mlon = mlon Atmos%mlat = mlat + +!---------------------------------------------------------------------------------------------- +! initialize atmospheric model - must happen AFTER atmosphere_init so that nests work correctly + + IF ( file_exist('input.nml')) THEN +#ifdef INTERNAL_FILE_NML + read(input_nml_file, nml=atmos_model_nml, iostat=io) + ierr = check_nml_error(io, 'atmos_model_nml') +#else + unit = open_namelist_file ( ) + ierr=1 + do while (ierr /= 0) + read (unit, nml=atmos_model_nml, iostat=io, end=10) + ierr = check_nml_error(io,'atmos_model_nml') + enddo + 10 call close_file (unit) +#endif + endif + !----------------------------------------------------------------------- !--- before going any further check definitions for 'blocks' !-----------------------------------------------------------------------