Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into fea…
Browse files Browse the repository at this point in the history
…ture/gfdlmpv3
  • Loading branch information
dustinswales committed Oct 22, 2024
2 parents 1c2df6b + 1e10d62 commit cdca580
Show file tree
Hide file tree
Showing 50 changed files with 277 additions and 79 deletions.
79 changes: 77 additions & 2 deletions atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ subroutine update_atmos_radiation_physics (Atmos)
if (mpp_pe() == mpp_root_pe()) print *,'PHYSICS STEP2 ', GFS_control%kdt, GFS_control%fhour
call fv3atm_checksum(GFS_control, GFS_Statein, GFS_Stateout, GFS_Grid, GFS_Tbd, GFS_Cldprop, GFS_Sfcprop, GFS_Radtend, GFS_Coupling, Atm_block)
endif
call getiauforcing(GFS_control,IAU_data)
call getiauforcing(GFS_control,IAU_data,Atm(mygrid))
if (mpp_pe() == mpp_root_pe() .and. debug) write(6,*) "end of radiation and physics step"

!--- execute the atmospheric timestep finalize step
Expand Down Expand Up @@ -725,7 +725,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
Atm(mygrid)%flagstruct%do_skeb = GFS_control%do_skeb

! initialize the IAU module
call iau_initialize (GFS_control,IAU_data,Init_parm)
call iau_initialize (GFS_control,IAU_data,Init_parm,Atm(mygrid))

Init_parm%blksz => null()
Init_parm%ak => null()
Expand Down Expand Up @@ -3121,6 +3121,54 @@ subroutine assign_importdata(jdat, rc)
endif
endif

fldname = 'hflx_fire'
if (trim(impfield_name) == trim(fldname)) then
findex = queryImportFields(fldname)
if (importFieldsValid(findex)) then
!$omp parallel do default(shared) private(i,j,nb,ix)
do j=jsc,jec
do i=isc,iec
nb = Atm_block%blkno(i,j)
ix = Atm_block%ixp(i,j)
im = GFS_control%chunk_begin(nb)+ix-1
GFS_sfcprop%hflx_fire(im) = datar82d(i-isc+1,j-jsc+1)
enddo
enddo
endif
endif

fldname = 'evap_fire'
if (trim(impfield_name) == trim(fldname)) then
findex = queryImportFields(fldname)
if (importFieldsValid(findex)) then
!$omp parallel do default(shared) private(i,j,nb,ix)
do j=jsc,jec
do i=isc,iec
nb = Atm_block%blkno(i,j)
ix = Atm_block%ixp(i,j)
im = GFS_control%chunk_begin(nb)+ix-1
GFS_sfcprop%evap_fire(im) = datar82d(i-isc+1,j-jsc+1)
enddo
enddo
endif
endif

fldname = 'smoke_fire'
if (trim(impfield_name) == trim(fldname)) then
findex = queryImportFields(fldname)
if (importFieldsValid(findex)) then
!$omp parallel do default(shared) private(i,j,nb,ix)
do j=jsc,jec
do i=isc,iec
nb = Atm_block%blkno(i,j)
ix = Atm_block%ixp(i,j)
im = GFS_control%chunk_begin(nb)+ix-1
GFS_sfcprop%smoke_fire(im) = datar82d(i-isc+1,j-jsc+1)
enddo
enddo
endif
endif

! write post merge import data to NetCDF file.
if (GFS_control%cpl_imp_dbg) then
call ESMF_FieldGet(importFields(n), grid=grid, rc=rc)
Expand Down Expand Up @@ -3294,6 +3342,21 @@ subroutine setup_exportdata(rc)
do nb = 1, Atm_block%nblks
select case (trim(fieldname))
!--- Instantaneous quantities
! Instantaneous mean layer pressure (Pa)
case ('inst_pres_levels')
call block_data_copy_or_fill(datar83d, GFS_statein%prsl, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
! Instantaneous geopotential at model layer centers (m2 s-2)
case ('inst_geop_levels')
call block_data_copy_or_fill(datar83d, GFS_statein%phil, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
! Instantaneous zonal wind (m s-1)
case ('inst_zonal_wind_levels')
call block_data_copy_or_fill(datar83d, GFS_statein%ugrs, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
! Instantaneous meridional wind (m s-1)
case ('inst_merid_wind_levels')
call block_data_copy_or_fill(datar83d, GFS_statein%vgrs, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
! Instantaneous surface roughness length (cm)
case ('inst_surface_roughness')
call block_data_copy(datar82d, GFS_sfcprop%zorl, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
! Instantaneous u wind (m/s) 10 m above ground
case ('inst_zonal_wind_height10m')
call block_data_copy(datar82d, GFS_coupling%u10mi_cpl, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
Expand Down Expand Up @@ -3378,6 +3441,9 @@ subroutine setup_exportdata(rc)
! Land/Sea mask (sea:0,land:1)
case ('inst_land_sea_mask', 'slmsk')
call block_data_copy(datar82d, GFS_sfcprop%slmsk, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
! Total precipitation amount in each time step
case ('inst_rainfall_amount')
call block_data_copy(datar82d, GFS_sfcprop%tprcp, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
!--- Mean quantities
! MEAN Zonal compt of momentum flux (N/m**2)
case ('mean_zonal_moment_flx_atm')
Expand Down Expand Up @@ -3430,6 +3496,15 @@ subroutine setup_exportdata(rc)
! MEAN NET sfc uv+vis diffused flux (W/m**2)
case ('mean_net_sw_vis_dif_flx')
call block_data_copy(datar82d, GFS_coupling%nvisdf_cpl, Atm_block, nb, rtime, spval, offset=GFS_Control%chunk_begin(nb), rc=localrc)
! MEAN precipitation rate (kg/m2/s)
case ('mean_prec_rate')
call block_data_copy(datar82d, GFS_sfcprop%tprcp, Atm_block, nb, rtimek, spval, offset=GFS_Control%chunk_begin(nb), rc=localrc)
! MEAN convective precipitation rate (kg/m2/s)
case ('mean_prec_rate_conv')
call block_data_copy(datar82d, GFS_coupling%rainc_cpl, Atm_block, nb, rtimek, spval, offset=GFS_Control%chunk_begin(nb), rc=localrc)
! MEAN snow precipitation rate (kg/m2/s)
case ('mean_fprec_rate')
call block_data_copy(datar82d, GFS_coupling%snow_cpl, Atm_block, nb, rtimek, spval, offset=GFS_Control%chunk_begin(nb), rc=localrc)
! oceanfrac used by atm to calculate fluxes
case ('openwater_frac_in_atm')
call block_data_combine_fractions(datar82d, GFS_sfcprop%oceanfrac, GFS_sfcprop%fice, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
Expand Down
9 changes: 7 additions & 2 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
'physics/physics/hooks/machine.F',
'physics/physics/Radiation/RRTMG/radsw_param.f',
'physics/physics/Radiation/RRTMG/radlw_param.f',
'physics/physics/photochem/h2o_def.f',
'physics/physics/photochem/module_ozphys.F90',
'physics/physics/photochem/module_h2ophys.F90',
'data/CCPP_typedefs.F90',
'data/GFS_typedefs.F90',
'data/CCPP_data.F90',
Expand All @@ -45,6 +45,10 @@
'module_ozphys' : '',
'ty_ozphys' : '',
},
'module_h2ophys' : {
'module_h2ophys' : '',
'ty_h2ophys' : '',
},
'CCPP_typedefs' : {
'GFS_interstitial_type' : 'GFS_Interstitial(cdata%thrd_no)',
'GFDL_interstitial_type' : 'GFDL_interstitial',
Expand Down Expand Up @@ -85,6 +89,7 @@
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_photochemistry.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.fv3.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90',
Expand Down Expand Up @@ -150,7 +155,7 @@
'physics/physics/GWD/gwdc_post.f',
'physics/physics/GWD/gwdps.f',
'physics/physics/GWD/rayleigh_damp.f',
'physics/physics/photochem/h2ophys.f',
'physics/physics/photochem/module_h2ophys.F90',
'physics/physics/photochem/module_ozphys.F90',
'physics/physics/MP/Ferrier_Aligo/mp_fer_hires.F90',
'physics/physics/MP/GFDL/v1_2019/gfdl_cloud_microphys.F90',
Expand Down
Loading

0 comments on commit cdca580

Please sign in to comment.