Skip to content

Commit

Permalink
Some more cleanup. Nearly done
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed Apr 22, 2024
1 parent 8b2d73e commit 8aee3da
Show file tree
Hide file tree
Showing 6 changed files with 586 additions and 479 deletions.
811 changes: 538 additions & 273 deletions physics/MP/GFDL/module_gfdlmp_param.F90

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions physics/MP/GFDL/v1_2019/gfdl_cloud_microphys.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
!! \cite chen_and_lin_2013 ).
module gfdl_cloud_microphys

use module_gfdl_cloud_microphys, only: gfdl_cloud_microphys_mod_init, &
gfdl_cloud_microphys_mod_driver, &
gfdl_cloud_microphys_mod_end, &
use module_gfdl_cloud_microphys, only: module_gfdl_cloud_microphys_init, &
module_gfdl_cloud_microphys_driver, &
module_gfdl_cloud_microphys_end, &
cloud_diagnosis

implicit none
Expand Down Expand Up @@ -63,7 +63,7 @@ subroutine gfdl_cloud_microphys_init (me, master, nlunit, input_nml_file, loguni
return
endif

call gfdl_cloud_microphys_mod_init(me, master, nlunit, input_nml_file, logunit, fn_nml, errmsg, errflg)
! call module_gfdl_cloud_microphys_init(me, master, nlunit, input_nml_file, logunit, fn_nml, errmsg, errflg)

is_initialized = .true.

Expand All @@ -89,7 +89,7 @@ subroutine gfdl_cloud_microphys_finalize(errmsg, errflg)

if (.not.is_initialized) return

call gfdl_cloud_microphys_mod_end()
call module_gfdl_cloud_microphys_end()

is_initialized = .false.

Expand Down Expand Up @@ -234,7 +234,7 @@ subroutine gfdl_cloud_microphys_run(
snow0 = 0
graupel0 = 0

call gfdl_cloud_microphys_mod_driver(iis, iie, jjs, jje, kks, kke, ktop, kbot, &
call module_gfdl_cloud_microphys_driver(iis, iie, jjs, jje, kks, kke, ktop, kbot, &
qv1, ql1, qr1, qi1, qs1, qg1, qa1, qn1, qv_dt, ql_dt, qr_dt, qi_dt, &
qs_dt, qg_dt, qa_dt, pt_dt, pt, w, uin, vin, u_dt, v_dt, dz, delp, &
garea, dtp, frland, rain0, snow0, ice0, graupel0, hydrostatic, &
Expand Down
20 changes: 10 additions & 10 deletions physics/MP/GFDL/v1_2019/module_gfdl_cloud_microphys.F90
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ module module_gfdl_cloud_microphys

private

public gfdl_cloud_microphys_mod_driver, gfdl_cloud_microphys_mod_init, &
gfdl_cloud_microphys_mod_end, cloud_diagnosis
public module_gfdl_cloud_microphys_driver, module_gfdl_cloud_microphys_init, &
module_gfdl_cloud_microphys_end, cloud_diagnosis
! public wqs1, wqs2, qs_blend, wqsat_moist, wqsat2_moist
! public qsmith_init, qsmith, es2_table1d, es3_table1d, esw_table1d
! public setup_con, wet_bulb
Expand Down Expand Up @@ -342,7 +342,7 @@ module module_gfdl_cloud_microphys

!>\ingroup mod_gfdl_cloud_mp
!! This subroutine is the driver of the GFDL cloud microphysics
subroutine gfdl_cloud_microphys_mod_driver ( &
subroutine module_gfdl_cloud_microphys_driver ( &
iis, iie, jjs, jje, kks, kke, ktop, kbot, &
qv, ql, qr, qi, qs, qg, qa, qn, &
qv_dt, ql_dt, qr_dt, qi_dt, qs_dt, qg_dt, qa_dt, pt_dt, pt, w, &
Expand Down Expand Up @@ -652,7 +652,7 @@ subroutine gfdl_cloud_microphys_mod_driver (
enddo
endif

end subroutine gfdl_cloud_microphys_mod_driver
end subroutine module_gfdl_cloud_microphys_driver

! -----------------------------------------------------------------------
!>\ingroup mod_gfdl_cloud_mp
Expand Down Expand Up @@ -3550,7 +3550,7 @@ end subroutine setupm
!>\ingroup mod_gfdl_cloud_mp
!! The subroutine 'gfdl_cloud_microphys_init' initializes the GFDL
!! cloud microphysics.
subroutine gfdl_cloud_microphys_mod_init (me, master, nlunit, input_nml_file, logunit, &
subroutine module_gfdl_cloud_microphys_init (me, master, nlunit, input_nml_file, logunit, &
fn_nml, errmsg, errflg)

implicit none
Expand Down Expand Up @@ -3589,7 +3589,7 @@ subroutine gfdl_cloud_microphys_mod_init (me, master, nlunit, input_nml_file, lo
if (.not. exists) then
write (6, *) 'gfdl - mp :: namelist file: ', trim (fn_nml), ' does not exist'
errflg = 1
errmsg = 'ERROR(gfdl_cloud_microphys_mod_init): namelist file '//trim (fn_nml)//' does not exist'
errmsg = 'ERROR(module_gfdl_cloud_microphys_init): namelist file '//trim (fn_nml)//' does not exist'
return
else
open (unit = nlunit, file = fn_nml, action = 'read' , status = 'old', iostat = ios)
Expand All @@ -3602,7 +3602,7 @@ subroutine gfdl_cloud_microphys_mod_init (me, master, nlunit, input_nml_file, lo
! write version number and namelist to log file
if (me == master) then
write (logunit, *) " ================================================================== "
write (logunit, *) "gfdl_cloud_microphys_mod"
write (logunit, *) "module_gfdl_cloud_microphys"
write (logunit, nml = gfdl_cloud_microphysics_nml)
endif

Expand Down Expand Up @@ -3700,14 +3700,14 @@ subroutine gfdl_cloud_microphys_mod_init (me, master, nlunit, input_nml_file, lo

call radar_init

end subroutine gfdl_cloud_microphys_mod_init
end subroutine module_gfdl_cloud_microphys_init

! =======================================================================
! end of gfdl cloud microphysics
!>\ingroup mod_gfdl_cloud_mp
!! The subroutine 'gfdl_cloud_microphys_init' terminates the GFDL
!! cloud microphysics.
subroutine gfdl_cloud_microphys_mod_end()
subroutine module_gfdl_cloud_microphys_end()

implicit none

Expand All @@ -3722,7 +3722,7 @@ subroutine gfdl_cloud_microphys_mod_end()

tables_are_initialized = .false.

end subroutine gfdl_cloud_microphys_mod_end
end subroutine module_gfdl_cloud_microphys_end

! =======================================================================
! qsmith table initialization
Expand Down
12 changes: 6 additions & 6 deletions physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
!! \cite chen_and_lin_2013 ).
module gfdl_cloud_microphys_v3

use module_gfdl_cloud_microphys_v3, only: module_gfdl_cld_mp_init, &
module_gfdl_cld_mp_driver, &
module_gfdl_cld_mp_end, &
use module_gfdl_cloud_microphys_v3, only: module_gfdl_cloud_microphys_v3_init, &
module_gfdl_cloud_microphys_v3_driver, &
module_gfdl_cloud_microphys_v3_end, &
rad_ref, cld_eff_rad

implicit none
Expand Down Expand Up @@ -66,7 +66,7 @@ subroutine gfdl_cloud_microphys_v3_init (me, master, nlunit, input_nml_file, log
return
endif

call module_gfdl_cld_mp_init(me, master, nlunit, input_nml_file, logunit, fn_nml, hydrostatic, errmsg, errflg)
! call module_gfdl_cloud_microphys_v3_init(me, master, nlunit, input_nml_file, logunit, fn_nml, hydrostatic, errmsg, errflg)

is_initialized = .true.

Expand All @@ -93,7 +93,7 @@ subroutine gfdl_cloud_microphys_v3_finalize(errmsg, errflg)

if (.not.is_initialized) return

call module_gfdl_cld_mp_end()
call module_gfdl_cloud_microphys_v3_end()

is_initialized = .false.

Expand Down Expand Up @@ -264,7 +264,7 @@ subroutine gfdl_cloud_microphys_v3_run(
hs = oro(:) * con_g
gsize = sqrt(garea(:))

call module_gfdl_cld_mp_driver( qv1, ql1, qr1, qi1, qs1, qg1, qa1, qnl, qni, pt, w,&
call module_gfdl_cloud_microphys_v3_driver( qv1, ql1, qr1, qi1, qs1, qg1, qa1, qnl, qni, pt, w,&
uin, vin, dz, delp, gsize, dtp, hs, water0, rain0, &
ice0, snow0, graupel0, hydrostatic, iis, iie, kks, kke, q_con, cappa, &
fast_mp_consv, adj_vmr, te, dte, prefluxw, prefluxr, prefluxi, prefluxs, &
Expand Down
8 changes: 4 additions & 4 deletions physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3.meta
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@
dimensions = ()
type = integer
intent = in
[imp_physics_gfdl_v3]
standard_name = identifier_for_gfdl_microphysics_v3_scheme
[imp_physics_gfdl]
standard_name = identifier_for_gfdl_microphysics_scheme
long_name = choice of GFDL microphysics scheme
units = flag
dimensions = ()
Expand Down Expand Up @@ -207,7 +207,7 @@
standard_name = area_type
long_name = landmask: sea/land/ice=0/1/2
units = flag
dimensions = (horizontal_dimension)
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
Expand Down Expand Up @@ -391,7 +391,7 @@
standard_name = height_above_mean_sea_level
long_name = height_above_mean_sea_level
units = m
dimensions = (horizontal_dimension)
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = inout
Expand Down
Loading

0 comments on commit 8aee3da

Please sign in to comment.