From 31b085169f9700ac1015dd0e7ce715a9b810ed50 Mon Sep 17 00:00:00 2001 From: Amidu Oloso Date: Wed, 13 Sep 2023 17:56:40 -0400 Subject: [PATCH 1/3] added changes for hybrid --- .../gfdl_cloud_microphys.F90 | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/gfdl_cloud_microphys.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/gfdl_cloud_microphys.F90 index 14dce1627..66c1814bb 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/gfdl_cloud_microphys.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/gfdl_cloud_microphys.F90 @@ -36,7 +36,7 @@ module gfdl2_cloud_microphys_mod - use mpp_mod, only: mpp_pe, mpp_root_pe + ! use mpp_mod, only: mpp_pe, mpp_root_pe ! use mpp_mod, only: stdlog, mpp_pe, mpp_root_pe, mpp_clock_id, & ! mpp_clock_begin, mpp_clock_end, clock_routine, & ! input_nml_file @@ -46,10 +46,11 @@ module gfdl2_cloud_microphys_mod ! use fms_mod, only: write_version_number, open_namelist_file, & ! check_nml_error, file_exist, close_file - use fms_mod, only: write_version_number, open_namelist_file, & - check_nml_error, close_file, file_exist, & - fms_init + !use fms_mod, only: write_version_number, open_namelist_file, & + ! check_nml_error, close_file, file_exist, & + ! fms_init use GEOSmoist_Process_Library, only: ice_fraction + use MAPL, only: MAPL_AM_I_ROOT implicit none @@ -3381,7 +3382,7 @@ subroutine gfdl_cloud_microphys_init (comm) ! logical :: flag ! real :: tmp, q1, q2 - call fms_init(comm) + !call fms_init(comm) ! root_proc = (mpp_pe () .eq.mpp_root_pe ()) @@ -3393,16 +3394,24 @@ subroutine gfdl_cloud_microphys_init (comm) write (6, *) 'gfdl - mp :: namelist file: ', trim (fn_nml), ' does not exist' stop else - nlunit=open_namelist_file() - rewind (nlunit) + !nlunit=open_namelist_file() + !rewind (nlunit) + open(NEWUNIT=nlunit,file=trim(fn_nml), form='formatted',access='sequential',iostat=ios) + if(ios /= 0) stop('open namelist file gfdl_cloud_microphys_init failed, bailing out...') + rewind (nlunit, iostat=ios) + if(ios /= 0) stop('rewind namelist file gfdl_cloud_microphys_init failed, bailing out...') ! Read Main namelist read (nlunit,gfdl_cloud_microphysics_nml,iostat=ios) - ierr = check_nml_error(ios,'gfdl_cloud_microphysics_nml') - call close_file(nlunit) + if(ios /= 0) stop('read namelist gfdl_cloud_microphys_init failed, bailing out...') + !ierr = check_nml_error(ios,'gfdl_cloud_microphysics_nml') + !call close_file(nlunit) + close(nlunit, iostat=ios) + if(ios /= 0) stop('close namelist file gfdl_cloud_microphys_init failed, bailing out...') endif #endif - if (mpp_pe() .EQ. mpp_root_pe()) then + !if (mpp_pe() .EQ. mpp_root_pe()) then + if (MAPL_AM_I_ROOT()) then write (*, *) " ================================================================== " write (*, *) "gfdl_cloud_microphys_mod" write (*, nml = gfdl_cloud_microphysics_nml) From 9cf48f4c09aa50ba56664ac2f609e65d10d3a7fe Mon Sep 17 00:00:00 2001 From: Amidu Oloso Date: Wed, 29 Nov 2023 18:02:30 -0500 Subject: [PATCH 2/3] Removed dependency on MPP and FMS from gfdl_cloud_microphysics.F90 --- .../GEOSmoist_GridComp/gfdl_cloud_microphys.F90 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/gfdl_cloud_microphys.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/gfdl_cloud_microphys.F90 index edc389669..bbbc502a1 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/gfdl_cloud_microphys.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/gfdl_cloud_microphys.F90 @@ -49,7 +49,7 @@ module gfdl2_cloud_microphys_mod !use fms_mod, only: write_version_number, open_namelist_file, & ! check_nml_error, close_file, file_exist, & ! fms_init - use GEOSmoist_Process_Library, only: ice_fraction + use GEOSmoist_Process_Library, only: sigma, ice_fraction use MAPL, only: MAPL_AM_I_ROOT implicit none @@ -398,7 +398,6 @@ subroutine gfdl_cloud_microphys_driver (qv, ql, qr, qi, qs, qg, qa, qn, & real, dimension (iie - iis + 1, jje - jjs + 1, kke - kks + 1) :: vt_r, vt_s, vt_g, vt_i, qn2 real :: allmax - is = 1 js = 1 ks = 1 From 5a110f531f29b751153588affbf9ede28a06eced Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Tue, 19 Mar 2024 16:08:33 -0400 Subject: [PATCH 3/3] update stop statements --- .../GEOSmoist_GridComp/gfdl_cloud_microphys.F90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/gfdl_cloud_microphys.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/gfdl_cloud_microphys.F90 index bbbc502a1..5f7a8967d 100644 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/gfdl_cloud_microphys.F90 +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSmoist_GridComp/gfdl_cloud_microphys.F90 @@ -3395,16 +3395,16 @@ subroutine gfdl_cloud_microphys_init (comm) !nlunit=open_namelist_file() !rewind (nlunit) open(NEWUNIT=nlunit,file=trim(fn_nml), form='formatted',access='sequential',iostat=ios) - if(ios /= 0) stop('open namelist file gfdl_cloud_microphys_init failed, bailing out...') + if(ios /= 0) stop 'open namelist file gfdl_cloud_microphys_init failed, bailing out...' rewind (nlunit, iostat=ios) - if(ios /= 0) stop('rewind namelist file gfdl_cloud_microphys_init failed, bailing out...') + if(ios /= 0) stop 'rewind namelist file gfdl_cloud_microphys_init failed, bailing out...' ! Read Main namelist read (nlunit,gfdl_cloud_microphysics_nml,iostat=ios) - if(ios /= 0) stop('read namelist gfdl_cloud_microphys_init failed, bailing out...') + if(ios /= 0) stop 'read namelist gfdl_cloud_microphys_init failed, bailing out...' !ierr = check_nml_error(ios,'gfdl_cloud_microphysics_nml') !call close_file(nlunit) close(nlunit, iostat=ios) - if(ios /= 0) stop('close namelist file gfdl_cloud_microphys_init failed, bailing out...') + if(ios /= 0) stop 'close namelist file gfdl_cloud_microphys_init failed, bailing out...' endif #endif