diff --git a/io/fv3atm_clm_lake_io.F90 b/io/fv3atm_clm_lake_io.F90 index cef83e442..024f85771 100644 --- a/io/fv3atm_clm_lake_io.F90 +++ b/io/fv3atm_clm_lake_io.F90 @@ -98,8 +98,8 @@ module fv3atm_clm_lake_io !> This subroutine is clm_lake%alocate_data. It deallocates all !> data, and reallocate to the size specified in Model. !> - !> @param clm_lake ??? - !> @param Model ??? + !> @param clm_lake Temporary storage for CLM Lake restart data. + !> @param Model Model control parameters input from a nml and/or derived from others. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine clm_lake_allocate_data(clm_lake,Model) @@ -152,9 +152,9 @@ end subroutine clm_lake_allocate_data !> This is clm_lake%register_axes. It registers all five axes needed !> by CLM Lake restart data. !> - !> @param clm_lake ??? - !> @param[in] Model ??? - !> @param Sfc_restart ??? + !> @param clm_lake Temporary storage for CLM Lake restart data. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param Sfc_restart FMS NetCDF object containing surface restart data. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine clm_lake_register_axes(clm_lake,Model,Sfc_restart) @@ -172,9 +172,9 @@ end subroutine clm_lake_register_axes !> name as each clm_lake axis, and fills the variable with the !> appropriate indices. !> - !> @param clm_lake ??? - !> @param[in] Model ??? - !> @param Sfc_restart ??? + !> @param clm_lake Temporary storage for CLM Lake restart data. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param Sfc_restart FMS NetCDF object containing surface restart data. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine clm_lake_write_axes(clm_lake, Model, Sfc_restart) @@ -201,10 +201,10 @@ end subroutine clm_lake_write_axes !> Terrible things will happen if you don't call !> clm_lake%allocate_data first. !> - !> @param clm_lake ??? - !> @param[in] Model ??? - !> @param[in] Atm_block ??? - !> @param[in] Sfcprop ??? + !> @param clm_lake Temporary storage for CLM Lake restart data. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] Atm_block Physics block layout information. + !> @param[in] Sfcprop Surface properties that may be read in and/or updated by climatology or observations . !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine clm_lake_fill_data(clm_lake, Model, Atm_block, Sfcprop) @@ -256,10 +256,10 @@ end subroutine clm_lake_fill_data !> Terrible things will happen if you don't call !> clm_lake%allocate_data first. !> - !> @param clm_lake ??? - !> @param[in] Model ??? - !> @param[in] Atm_block ??? - !> @param[in] Sfcprop ??? + !> @param clm_lake Temporary storage for CLM Lake restart data. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] Atm_block Physics block layout information. + !> @param[in] Sfcprop Surface properties that may be read in and/or updated by climatology or observations . !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine clm_lake_copy_from_grid(clm_lake, Model, Atm_block, Sfcprop) @@ -310,10 +310,10 @@ end subroutine clm_lake_copy_from_grid !> variables to the corresponding Sfcprop variables. Terrible !> things will happen if you don't call data%allocate_data first. !> - !> @param clm_lake ??? - !> @param[in] Model ??? - !> @param[in] Atm_block ??? - !> @param[in] Sfcprop ??? + !> @param clm_lake Temporary storage for CLM Lake restart data. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] Atm_block Physics block layout information. + !> @param[in] Sfcprop Surface properties that may be read in and/or updated by climatology or observations . !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine clm_lake_copy_to_grid(clm_lake, Model, Atm_block, Sfcprop) @@ -365,8 +365,8 @@ end subroutine clm_lake_copy_to_grid !> CLM Lake Model. Terrible things will happen if you don't call !> clm_lake%allocate_data and clm_lake%register_axes first. !> - !> @param clm_lake ??? - !> @param[in] Sfc_restart ??? + !> @param clm_lake Temporary storage for CLM Lake restart data. + !> @param[in] Sfc_restart FMS NetCDF object containing surface restart data. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine clm_lake_register_fields(clm_lake, Sfc_restart) @@ -440,11 +440,11 @@ end subroutine clm_lake_register_fields !> Terrible things will happen if you don't call !> clm_lake%allocate_data and clm_lake%register_axes first. !> - !> @param clm_lake ??? - !> @param[inout] bundle ??? - !> @param[inout] grid ??? - !> @param[in] Model ??? - !> @param[in] outputfile ??? + !> @param clm_lake Temporary storage for CLM Lake restart data. + !> @param[inout] bundle ESMF field bundle containing fields for writing CLM Lake Model restarts. + !> @param[inout] grid ESMF output grid for writing CLM Lake Model restarts. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] outputfile Full path to the output restart file. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine clm_lake_bundle_fields(clm_lake, bundle, grid, Model, outputfile) @@ -499,7 +499,7 @@ end subroutine Clm_lake_bundle_fields !> automatically when an object of that type goes out of scope. This !> is simply a wrapper around clm_lake%deallocate_data(). !> - !> @param clm_lake ??? + !> @param clm_lake Temporary storage for CLM Lake restart data. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine clm_lake_final(clm_lake) @@ -513,7 +513,7 @@ end subroutine clm_lake_final !> used again after this call. This is also the implementation of !> the clm_lake_data_type final routine. !> - !> @param clm_lake ??? + !> @param clm_lake Temporary storage for CLM Lake restart data. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine clm_lake_deallocate_data(clm_lake) diff --git a/io/fv3atm_common_io.F90 b/io/fv3atm_common_io.F90 index 17bd47650..edd31f374 100644 --- a/io/fv3atm_common_io.F90 +++ b/io/fv3atm_common_io.F90 @@ -23,12 +23,12 @@ module fv3atm_common_io copy_to_GFS_Data_2d_int2phys, copy_to_GFS_Data_3d_int2phys public :: GFS_data_transfer - public :: GFS_data_transfer_2d_phys2phys, & - GFS_data_transfer_3d_phys2phys, & - GFS_data_transfer_2d_int2phys, & - GFS_data_transfer_3d_int2phys, & - GFS_data_transfer_3d_slice_phys2phys, & - GFS_data_transfer_2d_stack_phys2phys + public :: GFS_data_transfer_2d_phys2phys, & + GFS_data_transfer_3d_phys2phys, & + GFS_data_transfer_2d_int2phys, & + GFS_data_transfer_3d_int2phys, & + GFS_data_transfer_3d_slice_phys2phys, & + GFS_data_transfer_2d_stack_phys2phys public :: create_2d_field_and_add_to_bundle public :: create_3d_field_and_add_to_bundle @@ -94,9 +94,9 @@ module fv3atm_common_io !> Convenience function to get the x and y dimensions of the grid !> from Atm_block. !> - !> @param Atm_block ??? - !> @param nx ??? - !> @param ny ??? + !> @param Atm_block Physics block layout information. + !> @param nx Number of x dimension points on Atm_block grid. + !> @param ny Number of y dimension points on Atm_block grid. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine get_nx_ny_from_atm(Atm_block, nx, ny) @@ -120,13 +120,13 @@ end subroutine get_nx_ny_from_atm !> Copies from the ix-indexed var_block to the 2d x-y !> real(kind_phys) var2d array. !> - !> @param[in] ii1 ??? - !> @param[in] jj1 ??? - !> @param[in] isc ??? - !> @param[in] jsc ??? - !> @param[inout] nt ??? - !> @param[inout] var2d ??? - !> @param[inout] var_block ??? + !> @param[in] ii1 x-dimension locations correspondeing to ix indices. + !> @param[in] jj1 y-dimension locations correspondeing to ix indices. + !> @param[in] isc Unused. Remove? + !> @param[in] jsc Unused. Remove? + !> @param[inout] nt Number of tracers. + !> @param[inout] var2d 2-d x-y array. + !> @param[inout] var_block Blocked ix-indexed array. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine copy_from_GFS_Data_2d_phys2phys(ii1,jj1,isc,jsc,nt,var2d,var_block) @@ -145,13 +145,13 @@ end subroutine copy_from_GFS_Data_2d_phys2phys !> Copies from the ix-k-indexed var_block to the 3d x-y-z real(kind_phys) var3d array. !> - !> @param[in] ii1 ??? - !> @param[in] jj1 ??? - !> @param[in] isc ??? - !> @param[in] jsc ??? - !> @param[inout] nt ??? - !> @param[inout] var2d ??? - !> @param[inout] var_block ??? + !> @param[in] ii1 x-dimension locations correspondeing to ix indices. + !> @param[in] jj1 y-dimension locations correspondeing to ix indices. + !> @param[in] isc Unused. Remove? + !> @param[in] jsc Unused. Remove? + !> @param[inout] nt Number of tracers. + !> @param[inout] var3d 3-d x-y-z array. + !> @param[inout] var_block Blocked ix-k-indexed array. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine copy_from_GFS_Data_3d_phys2phys(ii1,jj1,isc,jsc,nt,var3d,var_block) @@ -172,13 +172,13 @@ end subroutine copy_from_GFS_Data_3d_phys2phys !> Copies from the ix-k-indexed var_block to the 3d x-y-z integer var2d array. !> - !> @param[in] ii1 ??? - !> @param[in] jj1 ??? - !> @param[in] isc ??? - !> @param[in] jsc ??? - !> @param[inout] nt ??? - !> @param[inout] var2d ??? - !> @param[inout] var_block ??? + !> @param[in] ii1 x-dimension locations correspondeing to ix indices. + !> @param[in] jj1 y-dimension locations correspondeing to ix indices. + !> @param[in] isc Unused. Remove? + !> @param[in] jsc Unused. Remove? + !> @param[inout] nt Number of tracers. + !> @param[inout] var2d 2-d x-y array. + !> @param[inout] var_block Blocked ix-indexed array. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine copy_from_GFS_Data_2d_int2phys(ii1,jj1,isc,jsc,nt,var2d,var_block) @@ -196,13 +196,13 @@ end subroutine copy_from_GFS_Data_2d_int2phys !> Copies a range of levels from the ix-k-indexed var_block to the x-y real(kind_phys) var3d array. !> - !> @param[in] ii1 ??? - !> @param[in] jj1 ??? - !> @param[in] isc ??? - !> @param[in] jsc ??? - !> @param[inout] nt ??? - !> @param[inout] var3d ??? - !> @param[inout] var_block ??? + !> @param[in] ii1 x-dimension locations correspondeing to ix indices. + !> @param[in] jj1 y-dimension locations correspondeing to ix indices. + !> @param[in] isc Unused. Remove? + !> @param[in] jsc Unused. Remove? + !> @param[inout] nt Number of tracers. + !> @param[inout] var3d 3-d x-y-z array. + !> @param[inout] var_block Blocked ix-k-indexed array. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine copy_from_GFS_Data_2d_stack_phys2phys(ii1,jj1,isc,jsc,nt,var3d,var_block) @@ -224,13 +224,13 @@ end subroutine copy_from_GFS_Data_2d_stack_phys2phys !> Copies from the ix-k-indexed var_block to the x-y integer var3d array. !> - !> @param[in] ii1 ??? - !> @param[in] jj1 ??? - !> @param[in] isc ??? - !> @param[in] jsc ??? - !> @param[inout] nt ??? - !> @param[inout] var3d ??? - !> @param[inout] var_block ??? + !> @param[in] ii1 x-dimension locations correspondeing to ix indices. + !> @param[in] jj1 y-dimension locations correspondeing to ix indices. + !> @param[in] isc Unused. Remove? + !> @param[in] jsc Unused. Remove? + !> @param[inout] nt Number of tracers. + !> @param[inout] var3d 3-d x-y-z array. + !> @param[inout] var_block Blocked ix-k-indexed array. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine copy_from_GFS_Data_3d_int2phys(ii1,jj1,isc,jsc,nt,var3d,var_block) @@ -250,13 +250,13 @@ end subroutine copy_from_GFS_Data_3d_int2phys !> Copies a range of levels from from the ix-k-indexed var_block to the x-y-z real(kind_phys) var3d array. !> - !> @param[in] ii1 ??? - !> @param[in] jj1 ??? - !> @param[in] isc ??? - !> @param[in] jsc ??? - !> @param[inout] nt ??? - !> @param[inout] var3d ??? - !> @param[inout] var_block ??? + !> @param[in] ii1 x-dimension locations correspondeing to ix indices. + !> @param[in] jj1 y-dimension locations correspondeing to ix indices. + !> @param[in] isc Unused. Remove? + !> @param[in] jsc Unused. Remove? + !> @param[inout] nt Number of tracers. + !> @param[inout] var3d 3-d x-y-z array. + !> @param[inout] var_block Blocked ix-k-indexed array. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine copy_from_GFS_Data_3d_slice_phys2phys(ii1,jj1,isc,jsc,nt,k1,k2,var3d,var_block) @@ -277,13 +277,13 @@ end subroutine copy_from_GFS_Data_3d_slice_phys2phys !> Copies from x-y real(kind_phys) var2d array to the ix-indexed var_block array. !> - !> @param[in] ii1 ??? - !> @param[in] jj1 ??? - !> @param[in] isc ??? - !> @param[in] jsc ??? - !> @param[inout] nt ??? - !> @param[inout] var2d ??? - !> @param[inout] var_block ??? + !> @param[in] ii1 x-dimension locations correspondeing to ix indices. + !> @param[in] jj1 y-dimension locations correspondeing to ix indices. + !> @param[in] isc Unused. Remove? + !> @param[in] jsc Unused. Remove? + !> @param[inout] nt Number of tracers. + !> @param[inout] var2d 2-d x-y array. + !> @param[inout] var_block Blocked ix-indexed array. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine copy_to_GFS_Data_2d_phys2phys(ii1,jj1,isc,jsc,nt,var2d,var_block) @@ -302,13 +302,13 @@ end subroutine copy_to_GFS_Data_2d_phys2phys !> Copies from x-y-z real(kind_phys) var3d array to the ix-k-indexed var_block array. !> - !> @param[in] ii1 ??? - !> @param[in] jj1 ??? - !> @param[in] isc ??? - !> @param[in] jsc ??? - !> @param[inout] nt ??? - !> @param[inout] var3d ??? - !> @param[inout] var_block ??? + !> @param[in] ii1 x-dimension locations correspondeing to ix indices. + !> @param[in] jj1 y-dimension locations correspondeing to ix indices. + !> @param[in] isc Unused. Remove? + !> @param[in] jsc Unused. Remove? + !> @param[inout] nt Number of tracers. + !> @param[inout] var3d 3-d x-y-z array. + !> @param[inout] var_block Blocked ix-k-indexed array. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine copy_to_GFS_Data_3d_phys2phys(ii1,jj1,isc,jsc,nt,var3d,var_block) @@ -329,13 +329,13 @@ end subroutine copy_to_GFS_Data_3d_phys2phys !> Copies from x-y-z real(kind_phys) var3d array to the ix-k-indexed var_block array. !> - !> @param[in] ii1 ??? - !> @param[in] jj1 ??? - !> @param[in] isc ??? - !> @param[in] jsc ??? - !> @param[inout] nt ??? - !> @param[inout] var3d ??? - !> @param[inout] var_block ??? + !> @param[in] ii1 x-dimension locations correspondeing to ix indices. + !> @param[in] jj1 y-dimension locations correspondeing to ix indices. + !> @param[in] isc Unused. Remove? + !> @param[in] jsc Unused. Remove? + !> @param[inout] nt Number of tracers. + !> @param[inout] var3d 3-d x-y-z array. + !> @param[inout] var_block Blocked ix-k-indexed array. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine copy_to_GFS_Data_2d_stack_phys2phys(ii1,jj1,isc,jsc,nt,var3d,var_block) @@ -357,15 +357,15 @@ end subroutine copy_to_GFS_Data_2d_stack_phys2phys !> Copies a range of levels from the x-y-z real(kind_phys) var3d array to the ix-k-indexed var_block array. !> - !> @param[in] ii1 ??? - !> @param[in] jj1 ??? - !> @param[in] isc ??? - !> @param[in] jsc ??? - !> @param[inout] nt ??? - !> @param[in] k1 ??? - !> @param[in] k2 ??? - !> @param[inout] var3d ??? - !> @param[inout] var_block ??? + !> @param[in] ii1 x-dimension locations correspondeing to ix indices. + !> @param[in] jj1 y-dimension locations correspondeing to ix indices. + !> @param[in] isc Unused. Remove? + !> @param[in] jsc Unused. Remove? + !> @param[inout] nt Number of tracers. + !> @param[in] k1 Starting vertical index for slice. + !> @param[in] k2 Ending vertical index for slice. + !> @param[inout] var3d 3-d x-y-z array. + !> @param[inout] var_block Blocked ix-indexed array. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine copy_to_GFS_Data_3d_slice_phys2phys(ii1,jj1,isc,jsc,nt,k1,k2,var3d,var_block) @@ -386,13 +386,13 @@ end subroutine copy_to_GFS_Data_3d_slice_phys2phys !> Copies from x-y integer var2d array to the ix-indexed var_block array. !> - !> @param[in] ii1 ??? - !> @param[in] jj1 ??? - !> @param[in] isc ??? - !> @param[in] jsc ??? - !> @param[inout] nt ??? - !> @param[inout] var2d ??? - !> @param[inout] var_block ??? + !> @param[in] ii1 x-dimension locations correspondeing to ix indices. + !> @param[in] jj1 y-dimension locations correspondeing to ix indices. + !> @param[in] isc Unused. Remove? + !> @param[in] jsc Unused. Remove? + !> @param[inout] nt Number of tracers. + !> @param[inout] var2d 2-d x-y array. + !> @param[inout] var_block Blocked ix-indexed array. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine copy_to_GFS_Data_2d_int2phys(ii1,jj1,isc,jsc,nt,var2d,var_block) @@ -441,14 +441,14 @@ end subroutine copy_to_GFS_Data_3d_int2phys !> to=false, it is copied from the var_block arrays. This allows the same subroutine !> to both read and write, preventing error-prone code duplication. !> - !> @param[in] to ??? - !> @param[in] ii1 ??? - !> @param[in] jj1 ??? - !> @param[in] isc ??? - !> @param[in] jsc ??? - !> @param[inout] nt ??? - !> @param[inout] var2d ??? - !> @param[inout] var_block ??? + !> @param[in] to Copy to (.true.) or from (.false.) or to GFS_Data structures? + !> @param[in] ii1 x-dimension locations correspondeing to ix indices. + !> @param[in] jj1 y-dimension locations correspondeing to ix indices. + !> @param[in] isc Unused. Remove? + !> @param[in] jsc Unused. Remove? + !> @param[inout] nt Number of tracers. + !> @param[inout] var2d 2-d x-y array. + !> @param[inout] var_block Blocked ix-indexed array. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine GFS_data_transfer_2d_phys2phys(to,ii1,jj1,isc,jsc,nt,var2d,var_block) @@ -474,14 +474,14 @@ end subroutine GFS_data_transfer_2d_phys2phys !> to=false, it is copied from the var_block arrays. This allows the same subroutine !> to both read and write, preventing error-prone code duplication. !> - !> @param[in] to ??? - !> @param[in] ii1 ??? - !> @param[in] jj1 ??? - !> @param[in] isc ??? - !> @param[in] jsc ??? - !> @param[inout] nt ??? - !> @param[inout] var2d ??? - !> @param[inout] var_block ??? + !> @param[in] to Copy to (.true.) or from (.false.) or to GFS_Data structures? + !> @param[in] ii1 x-dimension locations correspondeing to ix indices. + !> @param[in] jj1 y-dimension locations correspondeing to ix indices. + !> @param[in] isc Unused. Remove? + !> @param[in] jsc Unused. Remove? + !> @param[inout] nt Number of tracers. + !> @param[inout] var3d 3-d x-y-x array. + !> @param[inout] var_block Blocked ix-k-indexed array. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine GFS_data_transfer_3d_phys2phys(to,ii1,jj1,isc,jsc,nt,var3d,var_block) @@ -507,16 +507,16 @@ end subroutine GFS_data_transfer_3d_phys2phys !> to=false, it is copied from the var_block arrays. This allows the same subroutine !> to both read and write, preventing error-prone code duplication. !> - !> @param[in] to ??? - !> @param[in] ii1 ??? - !> @param[in] jj1 ??? - !> @param[in] isc ??? - !> @param[in] jsc ??? - !> @param[inout] nt ??? - !> @param[in] k1 ??? - !> @param[in] k2 ??? - !> @param[inout] var3d ??? - !> @param[inout] var_block ??? + !> @param[in] to Copy to (.true.) or from (.false.) or to GFS_Data structures? + !> @param[in] ii1 x-dimension locations correspondeing to ix indices. + !> @param[in] jj1 y-dimension locations correspondeing to ix indices. + !> @param[in] isc Unused. Remove? + !> @param[in] jsc Unused. Remove? + !> @param[inout] nt Number of tracers. + !> @param[in] k1 Starting vertical index for slice. + !> @param[in] k2 Ending vertical index for slice. + !> @param[inout] var3d 3-d x-y-x array. + !> @param[inout] var_block Blocked ix-k-indexed array. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine GFS_data_transfer_3d_slice_phys2phys(to,ii1,jj1,isc,jsc,nt,k1,k2,var3d,var_block) @@ -541,14 +541,14 @@ end subroutine GFS_data_transfer_3d_slice_phys2phys !> to=false, it is copied from the var_block arrays. This allows the same subroutine !> to both read and write, preventing error-prone code duplication. !> - !> @param[in] to ??? - !> @param[in] ii1 ??? - !> @param[in] jj1 ??? - !> @param[in] isc ??? - !> @param[in] jsc ??? - !> @param[inout] nt ??? - !> @param[inout] var2d ??? - !> @param[inout] var_block ??? + !> @param[in] to Copy to (.true.) or from (.false.) or to GFS_Data structures? + !> @param[in] ii1 x-dimension locations correspondeing to ix indices. + !> @param[in] jj1 y-dimension locations correspondeing to ix indices. + !> @param[in] isc Unused. Remove? + !> @param[in] jsc Unused. Remove? + !> @param[inout] nt Number of tracers. + !> @param[inout] var2d 2-d x-y array. + !> @param[inout] var_block Blocked ix-indexed array. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine GFS_data_transfer_2d_int2phys(to,ii1,jj1,isc,jsc,nt,var2d,var_block) @@ -573,14 +573,14 @@ end subroutine GFS_data_transfer_2d_int2phys !> to=false, it is copied from the var_block arrays. This allows the same subroutine !> to both read and write, preventing error-prone code duplication. !> - !> @param[in] to ??? - !> @param[in] ii1 ??? - !> @param[in] jj1 ??? - !> @param[in] isc ??? - !> @param[in] jsc ??? - !> @param[inout] nt ??? - !> @param[inout] var2d ??? - !> @param[inout] var_block ??? + !> @param[in] to Copy to (.true.) or from (.false.) or to GFS_Data structures? + !> @param[in] ii1 x-dimension locations correspondeing to ix indices. + !> @param[in] jj1 y-dimension locations correspondeing to ix indices. + !> @param[in] isc Unused. Remove? + !> @param[in] jsc Unused. Remove? + !> @param[inout] nt Number of tracers. + !> @param[inout] var3d 2-d x-y-z array. + !> @param[inout] var_block Blocked ix-k-indexed array. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine GFS_data_transfer_3d_int2phys(to,ii1,jj1,isc,jsc,nt,var3d,var_block) @@ -606,14 +606,14 @@ end subroutine GFS_data_transfer_3d_int2phys !> to=false, it is copied from the var_block arrays. This allows the same subroutine !> to both read and write, preventing error-prone code duplication. !> - !> @param[in] to ??? - !> @param[in] ii1 ??? - !> @param[in] jj1 ??? - !> @param[in] isc ??? - !> @param[in] jsc ??? - !> @param[inout] nt ??? - !> @param[inout] var2d ??? - !> @param[inout] var_block ??? + !> @param[in] to Copy to (.true.) or from (.false.) or to GFS_Data structures? + !> @param[in] ii1 x-dimension locations correspondeing to ix indices. + !> @param[in] jj1 y-dimension locations correspondeing to ix indices. + !> @param[in] isc Unused. Remove? + !> @param[in] jsc Unused. Remove? + !> @param[inout] nt Number of tracers. + !> @param[inout] var2d 2-d x-y array. + !> @param[inout] var_block Blocked ix-indexed array. !> !> @author Samuel Trahan @date Jun 20, 2023 pure subroutine GFS_Data_transfer_2d_stack_phys2phys(to,ii1,jj1,isc,jsc,nt,var3d,var_block) @@ -635,11 +635,11 @@ end subroutine GFS_Data_transfer_2d_stack_phys2phys !> Add a 2D restart array to an ESMF bundle for quilting restarts. !> - !> @param[in] temp_r2d ??? - !> @param[in] field_name ??? - !> @param[in] outputfile ??? - !> @param[in] grid ??? - !> @param[inout] bundle ??? + !> @param[in] temp_r2d Pointer to a 2d array. + !> @param[in] field_name Field name corresponding to the 2d array. + !> @param[in] outputfile Full path to the output file. + !> @param[in] grid ESMF restart output grid object. + !> @param[inout] bundle ESMF field bundle object holding the restart fields. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine create_2d_field_and_add_to_bundle(temp_r2d, field_name, outputfile, grid, bundle) @@ -673,13 +673,13 @@ end subroutine create_2d_field_and_add_to_bundle !> Add a 3D restart array and its vertical axis to an ESMF bundle for quilting restarts. !> - !> @param[in] temp_r3d ??? - !> @param[in] field_name ??? - !> @param[in] axis_name ??? - !> @param[in] axis_values ??? - !> @param[in] outputfile ??? - !> @param[in] grid ??? - !> @param[inout] bundle ??? + !> @param[in] temp_r3d Pointer to a 3d array. + !> @param[in] field_name Field name corresponding to the 3d array. + !> @param[in] axis_name Name of the vertical axis. + !> @param[in] axis_values Vertical axis values. + !> @param[in] outputfile Full path to the output file. + !> @param[in] grid ESMF restart output grid object. + !> @param[inout] bundle ESMF field bundle object holding the restart fields. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine create_3d_field_and_add_to_bundle(temp_r3d, field_name, axis_name, axis_values, outputfile, grid, bundle) @@ -717,9 +717,9 @@ end subroutine create_3d_field_and_add_to_bundle !> Add a vertical axis to an ESMF bundle for quilting restarts. !> - !> @param[in] field ??? - !> @param[in] axis_name ??? - !> @param[in] axis_values ??? + !> @param[in] field ESMF field object to add vertical axis to. + !> @param[in] axis_name Name of the vertical axis. + !> @param[in] axis_values Vertical axis values. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine add_zaxis_to_field(field, axis_name, axis_values) diff --git a/io/fv3atm_history_io.F90 b/io/fv3atm_history_io.F90 index 71146c7b9..450be7fb6 100644 --- a/io/fv3atm_history_io.F90 +++ b/io/fv3atm_history_io.F90 @@ -46,45 +46,55 @@ module fv3atm_history_io_mod real, parameter :: missing_value = 9.99e20_kind_phys !< Missing value. real, parameter :: stndrd_atmos_ps = 101325.0_kind_phys !< Standard atmospheric surface pressure. real, parameter :: stndrd_atmos_lapse = 0.0065_kind_phys !< Standard atmospheric lapse rate. - real, parameter :: drythresh = 1.e-4_kind_phys !< ??? + real, parameter :: drythresh = 1.e-4_kind_phys !< This appears to be unused. Can we delete? real, parameter :: zero = 0.0_kind_phys !< Zero. real, parameter :: one = 1.0_kind_phys !< One. !> Storage type for temporary data during output of diagnostic (history) files. type history_type - integer :: tot_diag_idx = 0 !< ??? - + !< Total number of diagnostics to output. + integer :: tot_diag_idx = 0 + !> Starting and ending indices for the current diagnostic. + !> Number of axes for the current diagnostic. integer :: isco=0,ieco=0,jsco=0,jeco=0,num_axes_phys=0 + !> Number of cloud species; number of soil levels; number of soil levels in the LSM; + !> microphysics scheme; land surface model. integer :: ncld=0, nsoil=0, nsoil_lsm=0, imp_physics=0, landsfcmdl=0 + !> Dianostic reset freqency in hours. real(4) :: fhzero=0. + !> Time step for the current diagnostic. real(4) :: dtp=0 + !> Number of vertical levels for the current diagnostic. integer,dimension(:), pointer :: levo => null() + !> Number of variables for bilinear interpolation. integer,dimension(:), pointer :: nstt => null() + !> Number of variables for vector bilinear interpolation. integer,dimension(:), pointer :: nstt_vctbl => null() + !> All possible axis names. integer,dimension(:), pointer :: all_axes => null() - !> ??? + !> Names for variable axes. character(20),dimension(:), pointer :: axis_name => null() - !> ??? + !> Pointer to variables for bilinear interpolation. real(4), dimension(:,:,:), pointer :: buffer_phys_bl => null() - !> ??? + !> Pointer to variables for nearest-stod interpolation. real(4), dimension(:,:,:), pointer :: buffer_phys_nb => null() - !> ??? + !> Pointer to vector variables for bilinear interpolation. real(4), dimension(:,:,:,:), pointer :: buffer_phys_windvect => null() - !> ??? + !> Pointer to longitude data for vector interpolation. real(kind=kind_phys),dimension(:,:),pointer :: lon => null() - !> ??? + !> Pointer to latitude data for vector interpolation. real(kind=kind_phys),dimension(:,:),pointer :: lat => null() - !> ??? + !> Pointer to temporary work variable for 2D u wind data. real(kind=kind_phys),dimension(:,:),pointer :: uwork => null() - !> ??? + !> Pointer to temporary work variable for 3D u wind data. real(kind=kind_phys),dimension(:,:,:),pointer:: uwork3d => null() - !> ??? + !> Does current work variable contain u wind information? logical :: uwork_set = .false. - !> ??? + !> Current name for u wind variable. character(128) :: uwindname = "(noname)" !--- miscellaneous other variables - logical :: use_wrtgridcomp_output = .FALSE. !< ??? + logical :: use_wrtgridcomp_output = .FALSE. !< Use the write component for output? contains procedure :: register => history_type_register procedure :: output => history_type_output @@ -112,13 +122,13 @@ module fv3atm_history_io_mod !> calls a GFDL FMS routine to register diagnositcs and compare against !> the diag_table to determine what variables are to be output. !> - !> @param[inout] Diag ??? - !> @param[in] Time ??? - !> @param[in] Atm_block ??? - !> @param[in] Model ??? - !> @param[in] xlon ??? - !> @param[in] xlat ??? - !> @param[in] axes ??? + !> @param[inout] Diag Container for write component configuration. + !> @param[in] Time Model time. + !> @param[in] Atm_block Physics block layout information. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] xlon Longitude array. + !> @param[in] xlat Latitude array. + !> @param[in] axes Axis information. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine fv3atm_diag_register(Diag, Time, Atm_block, Model, xlon, xlat, axes) @@ -141,19 +151,19 @@ end subroutine fv3atm_diag_register !> This routine transfers diagnostic data to the FMS diagnostic !> manager for eventual output to the history files. !> - !> @param[in] time ??? - !> @param[inout] diag ??? - !> @param[in] atm_block ??? - !> @param[in] nx ??? - !> @param[in] ny ??? - !> @param[in] levs ??? - !> @param[in] ntcw ??? - !> @param[in] ntoz ??? - !> @param[in] dt ??? - !> @param[in] time_int ??? - !> @param[in] time_intfull ??? - !> @param[in] time_radsw ??? - !> @param[in] time_radlw ??? + !> @param[in] time Model time. + !> @param[inout] diag Diag Container for write component configuration. + !> @param[in] atm_block Physics block layout information. + !> @param[in] nx Number of grid points on write grid in the x direction. + !> @param[in] ny Number of grid points on write grid the y direction. + !> @param[in] levs Number of vertical levels on write grid. + !> @param[in] ntcw Not used. Remove? + !> @param[in] ntoz Not used. Remove? + !> @param[in] dt Model time step. + !> @param[in] time_int Model integration time since last diag reset. + !> @param[in] time_intfull Total model integration time. + !> @param[in] time_radsw Time since last shortwave radiation update. + !> @param[in] time_radlw Time since last longwave radiation update. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine fv3atm_diag_output(time, diag, atm_block, nx, ny, levs, ntcw, ntoz, & @@ -181,12 +191,12 @@ end subroutine fv3atm_diag_output !> to use for writing diagnostic output. It is only defined when the !> write component is enabled at compile time. !> - !> @param[inout] Diag ??? - !> @param[in] axes ??? - !> @param[in] phys_bundle ??? - !> @param[in] fcst_grid ??? - !> @param[in] quilting ??? - !> @param[in] nbdlphys ??? + !> @param[inout] Diag Container for write component configuration. + !> @param[in] axes Axis information. + !> @param[in] phys_bundle ESMF bundle for physics output fields. + !> @param[in] fcst_grid Write component ESMF grid. + !> @param[in] quilting Whether to use quilted output (write component). + !> @param[in] nbdlphys Number of variables in phys_bundle. !> @param[in] rc Return code. !> !> @author Samuel Trahan @date Jun 20, 2023 @@ -218,14 +228,14 @@ end subroutine fv_phys_bundle_setup !> This is the history_type%register procedure, which provides the internal !> implementation of fv3atm_diag_register(). Do not call this directly. !> - !> @param hist ??? - !> @param[inout] Diag ??? - !> @param[in] Time ??? - !> @param[in] Atm_block ??? - !> @param[in] Model ??? - !> @param[in] xlon ??? - !> @param[in] xlat ??? - !> @param[in] axes ??? + !> @param hist Container for temporary data during output of diagnostic files. + !> @param[inout] Diag Container for write component configuration. + !> @param[in] Time Model time. + !> @param[in] Atm_block Physics block layout information. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] xlon Longitude array. + !> @param[in] xlat Latitude array. + !> @param[in] axes Axis information. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine history_type_register(hist, Diag, Time, Atm_block, Model, xlon, xlat, axes) @@ -346,20 +356,20 @@ end subroutine history_type_register !> Never call this directly. !> !> - !> @param hist ??? - !> @param[in] time ??? - !> @param[in] diag ??? - !> @param[in] atm_block ??? - !> @param[in] nx ??? - !> @param[in] ny ??? - !> @param[in] levs ??? - !> @param[in] ntcw ??? - !> @param[in] ntoz ??? - !> @param[in] dt ??? - !> @param[in] time_int ??? - !> @param[in] time_intfull ??? - !> @param[in] time_radsw ??? - !> @param[in] time_radlw ??? + !> @param hist Container for temporary data during output of diagnostic files. + !> @param[in] time Model time. + !> @param[in] diag Container for write component configuration. + !> @param[in] atm_block Physics block layout information. + !> @param[in] nx Number of grid points on write grid in the x direction. + !> @param[in] ny Number of grid points on write grid the y direction. + !> @param[in] levs Number of vertical levels on write grid. + !> @param[in] ntcw Not used. Remove? + !> @param[in] ntoz Not used. Remove? + !> @param[in] dt Model time step. + !> @param[in] time_int Model integration time since last diag reset. + !> @param[in] time_intfull Total model integration time. + !> @param[in] time_radsw Time since last shortwave radiation update. + !> @param[in] time_radlw Time since last longwave radiation update. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine history_type_output(hist, time, diag, atm_block, nx, ny, levs, ntcw, ntoz, & @@ -573,13 +583,13 @@ end subroutine history_type_output !> history_type_output (history_type%output). Never call this !> subroutine directly; call fv3atm_diag_output instead. !> - !> @param hist ??? - !> @param[inout] id ??? - !> @param[in] work ??? - !> @param[in] Time ??? - !> @param[in] idx ??? - !> @param[in] intpl_method ??? - !> @param[in] fldname ??? + !> @param hist Container for temporary data during output of diagnostic files. + !> @param[inout] id Variable ID. + !> @param[in] work Data to store. + !> @param[in] Time Model time. + !> @param[in] idx Index of the diagnostic variable. + !> @param[in] intpl_method Interpolation method. + !> @param[in] fldname Field name. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine history_type_store_data(hist,id, work, Time, idx, intpl_method, fldname) @@ -673,13 +683,13 @@ end subroutine history_type_store_data !> history_type_output (history_type%output) Never call this !> subroutine directly; call fv3atm_diag_output instead. !> - !> @param hist ??? - !> @param[inout] id ??? - !> @param[in] work ??? - !> @param[in] Time ??? - !> @param[in] idx ??? - !> @param[in] intpl_method ??? - !> @param[in] fldname ??? + !> @param hist Container for temporary data during output of diagnostic files. + !> @param[inout] id Variable ID. + !> @param[in] work Data to store. + !> @param[in] Time Model time. + !> @param[in] idx Index of the diagnostic variable. + !> @param[in] intpl_method Interpolation method. + !> @param[in] fldname Field name. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine history_type_store_data3D(hist, id, work, Time, idx, intpl_method, fldname) @@ -794,13 +804,13 @@ end subroutine history_type_store_data3D !> to use for writing diagnostic output. It is only defined when the !> write component is enabled at compile time. !> - !> @param hist ??? - !> @param[in] Diag ??? - !> @param[in] axes ??? - !> @param[in] phys_bundle ??? - !> @param[in] fcst_grid ??? - !> @param[in] quilting ??? - !> @param[in] nbdlphys ??? + !> @param hist Container for temporary data during output of diagnostic files. + !> @param[in] Diag Container for write component configuration. + !> @param[in] axes Axis information. + !> @param[in] phys_bundle ESMF bundle for physics output fields. + !> @param[in] fcst_grid ESMF grid for the forecast model. + !> @param[in] quilting Whether to use quilted output (write component). + !> @param[in] nbdlphys Number of variables in phys_bundle. !> @param[in] rc Return code. !> !> @author Samuel Trahan @date Jun 20, 2023 @@ -1110,19 +1120,20 @@ end subroutine history_type_bundle_setup !> not call this subroutine directly. Call fv_phys_bundle_setup !> instead. !> - !> @param hist ??? - !> @param[in] var_name ??? - !> @param[in] long_name ??? - !> @param[in] units ??? - !> @param[in] cell_methods ??? - !> @param[in] axes ??? - !> @param[in] phys_grid ??? - !> @param[in] kstt ??? - !> @param[inout] phys_bundle ??? - !> @param[in] output_file ??? - !> @param[in] intpl_method ??? - !> @param[in] range ??? - !> @param[in] l2dvector ??? + !> @param hist Container for temporary data during output of diagnostic files. + !> @param[in] var_name Variable name. + !> @param[in] long_name Variable long name. + !> @param[in] units Units of the variable. + !> @param[in] cell_methods + !> @param[in] axes Variable axes. + !> @param[in] phys_grid ESMF grid for the physics fields. + !> @param[in] kstt Starting index of vertical dimension. + !> @param[in] levo Number of vertical levels. + !> @param[inout] phys_bundle ESMF field bundle for physics output fields. + !> @param[in] output_file Full path to output write component file. + !> @param[in] intpl_method Interpolation method. + !> @param[in;optional] range Not used. Remove. + !> @param[in] l2dvector Whether the field is a 2D vector. !> @param[out] rcd Return code. !> !> @author Samuel Trahan @date Jun 20, 2023 @@ -1334,10 +1345,10 @@ end subroutine history_type_add_field_to_phybundle !> (history_type%bundle_setup) and should not be called !> directly. Call fv_phys_bundle_setup instead. !> - !> @param hist ??? - !> @param[in] module_name ??? - !> @param[in] field_name ??? - !> @param[out] output_name ??? + !> @param hist Container for temporary data during output of diagnostic files. + !> @param[in] module_name Name of module containing variable. + !> @param[in] field_name Name of variable in model. + !> @param[out] output_name Name of variable to use in output file. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine history_type_find_output_name(hist,module_name,field_name,output_name) diff --git a/io/fv3atm_oro_io.F90 b/io/fv3atm_oro_io.F90 index b9666124e..8b1d55fd7 100644 --- a/io/fv3atm_oro_io.F90 +++ b/io/fv3atm_oro_io.F90 @@ -16,13 +16,25 @@ module fv3atm_oro_io implicit none private - public :: Oro_io_data_type !> ??? - public :: Oro_io_register !> ??? - public :: Oro_io_copy !> ??? - public :: Oro_io_final !> ??? - public :: Oro_scale_io_data_type !> ??? - public :: Oro_scale_io_register !> ??? - public :: Oro_scale_io_copy !> ??? + !> Storage of working arrays for reading orography data + public :: Oro_io_data_type + !> Registers axes and fields for non-quilt restart reading of + !> non-scaled orography variables. + public :: Oro_io_register + !> Copies orography data from temporary arrays back to Sfcprop grid arrays. + public :: Oro_io_copy + !> Destructor for Oro_io_data_type + public :: Oro_io_final + !> Storage of working arrays for reading large-scale and small-scale + !> orography data for gravity wave drag schemes. + public :: Oro_scale_io_data_type + !> Registers axes and fields for non-quilt restart reading of scaled + !> orography variables. + public :: Oro_scale_io_register + !> Copies scaled orography data from temporary arrays back to + !> Sfcprop grid arrays. + public :: Oro_scale_io_copy + !> Oro_scale_io_data_type destructor. public :: Oro_scale_io_final !> ??? !> Storage of working arrays for reading orography data. @@ -64,10 +76,10 @@ module fv3atm_oro_io !> variables in the non-scaled orography data. The scaled data is !> handled by another function. This includes both 2D and 3D fields. !> - !> @param[in] oro ??? - !> @param[in] Model ??? - !> @param[in] Oro_restart ??? - !> @param[in] Atm_block + !> @param[in] oro Storage of working arrays for reading orography data. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] Oro_restart FMS restart file handle for restart orography data. + !> @param[in] Atm_block Physics block layout information. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Oro_io_register(oro, Model, Oro_restart, Atm_block) @@ -157,10 +169,10 @@ end subroutine Oro_io_register !> After reading the restart, data is on temporary arrays with x-y data storage. !> This subroutine copies the x-y fields to Sfcprop's blocked grid storage arrays. !> - !> @param[in] oro ??? - !> @param[in] Model ??? - !> @param[in] Sfcprop ??? - !> @param[in] Atm_block + !> @param[in] oro Storage of working arrays for reading orography data. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] Sfcprop Surface properties that may be read in and/or updated by climatology or observations . + !> @param[in] Atm_block Physics block layout information. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Oro_io_copy(oro, Model, Sfcprop, Atm_block) @@ -244,7 +256,7 @@ end subroutine Oro_io_copy !> Destructor for Oro_io_data_type !> - !> @param[in] oro ??? + !> @param[in] oro Storage of working arrays for reading orography data. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Oro_io_final(oro) @@ -273,10 +285,10 @@ end subroutine Oro_io_final !> scaled data is handled by another function. Each scale needs its !> own instance of oro_scale_io_data_type. !> - !> @param[in] oro_scale ??? - !> @param[in] Model ??? - !> @param[in] Oro_scale_restart ??? - !> @param[in] Atm_block + !> @param[in] oro_scale Storage of working arrays for oro data for gravity wave drag schemes. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] Oro_scale_restart FMS restart file handle for restart scaled orography data. + !> @param[in] Atm_block Physics block layout information. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Oro_scale_io_register(oro_scale, Model, Oro_scale_restart, Atm_block) @@ -332,10 +344,10 @@ end subroutine Oro_scale_io_register !> After reading the restart, data is on temporary arrays with x-y data storage. !> This subroutine copies the x-y fields to Sfcprop's blocked grid storage arrays. !> - !> @param[in] oro ??? - !> @param[in] Sfcprop ??? - !> @param[in] Atm_block - !> @param[in] first_index ??? + !> @param[in] oro Storage of working arrays for reading orography data. + !> @param[in] Sfcprop Surface properties that may be read in and/or updated by climatology or observations. + !> @param[in] Atm_block Physics block layout information. + !> @param[in] first_index Starding index of relevant data in second dimension of Sfcprop%hprime. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Oro_scale_io_copy(oro_scale, Sfcprop, Atm_block, first_index) @@ -364,7 +376,7 @@ end subroutine Oro_scale_io_copy !> Oro_scale_io_data_type destructor. !> - !> @param[in] oro_scale ??? + !> @param[in] oro_scale Storage of working arrays for reading scaled orography data. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Oro_scale_io_final(oro_scale) diff --git a/io/fv3atm_restart_io.F90 b/io/fv3atm_restart_io.F90 index 3fafca304..b23beb9ae 100644 --- a/io/fv3atm_restart_io.F90 +++ b/io/fv3atm_restart_io.F90 @@ -116,13 +116,13 @@ module fv3atm_restart_io_mod !> Calls sfc_prop_restart_read and phys_restart_read to read all !> surface and physics restart files. !> - !> @param[inout] GFS_Sfcprop ??? - !> @param[inout] GFS_Restart ??? - !> @param[in] Atm_block ??? - !> @param[inout] Model ??? - !> @param[in] fv_domain ??? - !> @param[in] warm_start ??? - !> @param[in] ignore_rst_cksum ??? + !> @param[inout] GFS_Sfcprop Surface properties that may be read in and/or updated by climatology or observations . + !> @param[inout] GFS_Restart Derived type containing physics restart data. + !> @param[in] Atm_block Physics block layout information. + !> @param[inout] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] fv_domain Contains domain decomposition information for cubed sphere grid. + !> @param[in] warm_start Is warm start run? + !> @param[in] ignore_rst_cksum Ignore checksums in restart files? !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine fv3atm_restart_read (GFS_Sfcprop, GFS_Restart, Atm_block, Model, fv_domain, warm_start, ignore_rst_cksum) @@ -146,12 +146,12 @@ end subroutine fv3atm_restart_read !> Writes surface and physics restart fields without using the write !> component (quilt). !> - !> @param[inout] GFS_Sfcprop ??? - !> @param[inout] GFS_Restart ??? - !> @param[in] Atm_block ??? - !> @param[inout] Model ??? - !> @param[in] fv_domain ??? - !> @param[in] timestamp ??? + !> @param[inout] GFS_Sfcprop Surface properties that may be read in and/or updated by climatology or observations . + !> @param[inout] GFS_Restart Derived type containing physics restart data. + !> @param[in] Atm_block Physics block layout information. + !> @param[inout] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] fv_domain Contains domain decomposition information for cubed sphere grid. + !> @param[in] timestamp Timestamp to append to intermediate restart files. !> !> Calls sfc_prop_restart_write and phys_restart_write to write !> surface and physics restart fields. This pauses the model to @@ -177,16 +177,16 @@ end subroutine fv3atm_restart_write !> ??? !> - !> @param[in] Model ??? - !> @param[in] GFS_Statein ??? - !> @param[in] GFS_Stateout ??? - !> @param[in] GFS_Grid ??? - !> @param[in] GFS_Tbd ??? - !> @param[in] GFS_Cldprop ??? - !> @param[in] GFS_Sfcprop ??? - !> @param[in] GFS_Radtend ??? - !> @param[in] GFS_Coupling ??? - !> @param[in] Atm_block ??? + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] GFS_Statein Prognostic state data provided to ccpp from dycore. + !> @param[in] GFS_Stateout Prognostic state data returned to dycore from ccpp. + !> @param[in] GFS_Grid Internal grid data needed for interpolations and length-scale calculations. + !> @param[in] GFS_Tbd Data not yet assigned to a defined container. + !> @param[in] GFS_Cldprop Cloud properties and tendencies needed by radiation from physics. + !> @param[in] GFS_Sfcprop Surface properties that may be read in and/or updated by climatology or observations. + !> @param[in] GFS_Radtend Radiation tendencies needed in physics + !> @param[in] GFS_Coupling Fields to/from other coupled components (e.g. land/ice/ocean/etc.). + !> @param[in] Atm_block Physics block layout information. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine fv3atm_checksum (Model, GFS_Statein, GFS_Stateout, GFS_Grid, GFS_Tbd, GFS_Cldprop, GFS_Sfcprop, GFS_Radtend, GFS_Coupling, Atm_block) @@ -577,12 +577,12 @@ end subroutine fv3atm_checksum !> Calls an FMS routine to restore the data from a restart file. !> Also calculates sncovr if it is not present in the restart file. !> - !> @param[inout] Sfcprop ??? - !> @param[in] Atm_block ??? - !> @param[inout] Model ??? - !> @param[in] fv_domain ??? - !> @param[in] warm_start ??? - !> @param[in] ignore_rst_cksum ??? + !> @param[inout] Sfcprop Surface properties that may be read in and/or updated by climatology or observations + !> @param[in] Atm_block Physics block layout information. + !> @param[inout] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] fv_domain Contains domain decomposition information for cubed sphere grid. + !> @param[in] warm_start Logical flag indicating whether this is a warm start. + !> @param[in] ignore_rst_cksum Logical flag indicating whether to ignore checksums in the restart file. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_start, ignore_rst_cksum) @@ -803,11 +803,11 @@ end subroutine sfc_prop_restart_read !> subsystem. Takes an optional argument to append timestamps for intermediate !> restarts. !> - !> @param[inout] Sfcprop ??? - !> @param[in] Atm_block ??? - !> @param[inout] Model ??? - !> @param[in] fv_domain ??? - !> @param[in] timestamp ??? + !> @param[inout] Sfcprop surface properties that may be read in and/or updated by climatology or observations. + !> @param[in] Atm_block Physics block layout information. + !> @param[inout] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] fv_domain Contains domain decomposition information for cubed sphere grid. + !> @param[in] timestamp Optional timestamp to append to the restart filename. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timestamp) @@ -903,11 +903,11 @@ end subroutine sfc_prop_restart_write !> restart variables with the GFDL FMS restart subsystem. !> Calls a GFDL FMS routine to restore the data from a restart file. !> - !> @param[inout] GFS_Restart ??? - !> @param[in] Atm_block ??? - !> @param[inout] Model ??? - !> @param[in] fv_domain ??? - !> @param[in] ignore_rst_cksum ??? + !> @param[inout] GFS_Restart Contains information about the restart variables. + !> @param[in] Atm_block Physics block layout information. + !> @param[inout] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] fv_domain Contains domain decomposition information for cubed sphere grid. + !> @param[in] ignore_rst_cksum Logical flag indicating whether to ignore checksums in the restart file. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine phys_restart_read (GFS_Restart, Atm_block, Model, fv_domain, ignore_rst_cksum) @@ -984,11 +984,11 @@ end subroutine phys_restart_read !> subsystem. Takes an optional argument to append timestamps for intermediate !> restarts. !> - !> @param[in] GFS_Restart ??? - !> @param[in] Atm_block ??? - !> @param[in] Model ??? - !> @param[in] fv_domain ??? - !> @param[in] timestamp ??? + !> @param[in] GFS_Restart Contains information about the restart variables + !> @param[in] Atm_block Physics block layout information. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] fv_domain Contains domain decomposition information for cubed sphere grid. + !> @param[in] timestamp Optional timestamp to append to the restart filename. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine phys_restart_write (GFS_Restart, Atm_block, Model, fv_domain, timestamp) @@ -1089,10 +1089,10 @@ end subroutine phys_restart_write !> !> Allocates all data buffers and sets variable names for surface and physics restarts. !> - !> @param[inout] Sfcprop ??? - !> @param[inout] GFS_Restart ??? - !> @param[in] Atm_block ??? - !> @param[inout] Model ??? + !> @param[inout] Sfcprop Surface properties that may be read in and/or updated by climatology or observations. + !> @param[inout] GFS_Restart Contains information about the restart variables. + !> @param[in] Atm_block Physics block layout information. + !> @param[inout] Model Model control parameters input from a nml and/or derived from others. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine fv3atm_restart_register (Sfcprop, GFS_restart, Atm_block, Model) @@ -1128,8 +1128,8 @@ end subroutine fv3atm_restart_register !> Copies physics restart fields from write component data !> structures to the model grid. !> - !> @param[in] GFS_Restart ??? - !> @param[in] Atm_block ??? + !> @param[in] GFS_Restart Contains information about the restart variables. + !> @param[in] Atm_block Physics block layout information. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine fv_phy_restart_output(GFS_Restart, Atm_block) @@ -1146,9 +1146,9 @@ end subroutine fv_phy_restart_output !> Copies physics restart fields from the model grid to write !> component data structures. !> - !> @param[in] Sfcprop ??? - !> @param[in] Atm_block ??? - !> @param[in] Model ??? + !> @param[in] Sfcprop Surface properties that may be read in and/or updated by climatology or observations. + !> @param[in] Atm_block Physics block layout information. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine fv_sfc_restart_output(Sfcprop, Atm_block, Model) @@ -1171,8 +1171,8 @@ end subroutine fv_sfc_restart_output !> Creates the ESMF bundle for physics restart data. !> - !> @param[inout] bundle ??? - !> @param[inout] grid ??? + !> @param[inout] bundle ESMF field bundle for physics restart data. + !> @param[inout] grid ESMF grid for physics restart data. !> @param[out] rc Return code. !> !> @author Samuel Trahan @date Jun 20, 2023 @@ -1227,9 +1227,9 @@ end subroutine fv_phy_restart_bundle_setup !> Creates the ESMF bundle for surface restart data. !> - !> @param[inout] bundle ??? - !> @param[inout] grid ??? - !> @param[in] Model ??? + !> @param[inout] bundle ESMF field bundle for surface restart data. + !> @param[inout] grid ESMF grid for surface restart data. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. !> @param[out] rc Return code. !> !> @author Samuel Trahan @date Jun 20, 2023 @@ -1272,11 +1272,17 @@ end subroutine fv_sfc_restart_bundle_setup ! !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - !>@brief Allocates and fills internal data structures for quilt or non-quilt physics restart I/O - !> \section phy_data_type%alloc procedure - !! Allocates the variable and variable name data structures in the phy_data_type. - !! Also, copies the GFS_Restart names to the phy_data_type arrays. - !! Do not call from outside this module; it is part of the internal implementation. + !> Allocates and fills internal data structures for quilt or non-quilt physics restart I/O + !> + !> Allocates the variable and variable name data structures in the phy_data_type. + !> Also, copies the GFS_Restart names to the phy_data_type arrays. + !> Do not call from outside this module; it is part of the internal implementation. + !> + !> @param[inout] phy Storage for reading and writing physics restart files. + !> @param[in] GFS_Restart Contains information about the restart variables. + !> @param[in] Atm_block Physics block layout information. + !> + !> @author Samuel Trahan @date Jun 20, 2023 logical function phy_data_alloc(phy, GFS_Restart, Atm_block) use fv3atm_common_io, only: get_nx_ny_from_atm implicit none @@ -1321,11 +1327,11 @@ end function phy_data_alloc !> reading=.false., data is copied from the model grid to temporary !> arrays (for writing the restart). !> - !> @param phy ??? - !> @param[in] reading ??? - !> @param GFS_Restart ??? - !> @param Atm_block ??? - !> @param[in] Model ??? + !> @param phy Storage for reading and writing physics restart files. + !> @param[in] reading Logical flag indicating the direction of the copy (true=to model grid, false=from model grid). + !> @param GFS_Restart Contains information about the restart variables. + !> @param Atm_block Physics block layout information. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine phy_data_transfer_data(phy, reading, GFS_Restart, Atm_block, Model) @@ -1430,7 +1436,7 @@ end subroutine phy_data_transfer_data !> Destructor for phy_data_type. !> - !> @param phy ??? + !> @param phy Storage for reading and writing physics restart files. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine phy_data_final(phy) diff --git a/io/fv3atm_rrfs_sd_io.F90 b/io/fv3atm_rrfs_sd_io.F90 index 0e515e4fc..8353741ce 100644 --- a/io/fv3atm_rrfs_sd_io.F90 +++ b/io/fv3atm_rrfs_sd_io.F90 @@ -1,7 +1,14 @@ !> \file fv3atm_rrfs_sd_io.F90 -!! This file contains derived types and subroutines for RRFS-SD scheme I/O. -!! They read and write restart files, and read emissions data. - +!> \brief This module handles the input/output operations for the FV3 atmospheric model +!> specific to the RRFS (Rapid Refresh Forecast System) SD (Stochastic +!> Dynamics) configuration. +!> +!> \author Samuel Trahan +!> \date 2023 +!> +!> \details +!> This module provides the necessary routines and functions to read and write restart +!> files for the RRFS-SD scheme. It also reads emissions data for the RRFS-SD scheme. module fv3atm_rrfs_sd_io use block_control_mod, only: block_control_type use fms2_io_mod, only: FmsNetcdfDomainFile_t, write_data, & @@ -29,19 +36,21 @@ module fv3atm_rrfs_sd_io !>\defgroup fv3atm_rrfs_sd_io module !> @{ - !>@ Temporary data storage for reading and writing restart data for the RRFS-SD scheme. + !> Temporary data storage for reading and writing restart data for the RRFS-SD scheme. + !> The rrfs_sd_state_type stores temporary arrays used to read or + !> write RRFS-SD restart and axis variables. type rrfs_sd_state_type - ! The rrfs_sd_state_type stores temporary arrays used to read or - ! write RRFS-SD restart and axis variables. + !> 2d i,j variables + !> Dust emission, salt emission, antrhopogenic oc emission, fire scale coef, fire blackbody coefficient real(kind_phys), pointer, private, dimension(:,:) :: & ! i,j variables emdust=>null(), emseas=>null(), emanoc=>null(), fhist=>null(), coef_bb_dc=>null() - + !> Smoke fire auxiliary input variables (i, j, fire_aux_data_levels) real(kind_phys), pointer, private, dimension(:,:,:) :: & fire_in=>null() ! i, j, fire_aux_data_levels - + !> 1:Model%fire_aux_data_levels index array for metadata write real(kind_phys), pointer, private, dimension(:) :: & - fire_aux_data_levels=>null() ! 1:Model%fire_aux_data_levels index array for metadata write + fire_aux_data_levels=>null() contains procedure, public :: register_axis => rrfs_sd_state_register_axis ! register fire_aux_data_levels axis @@ -58,21 +67,33 @@ module fv3atm_rrfs_sd_io ! -------------------------------------------------------------------- - !>@ Temporary data storage for reading RRFS-SD emissions data + !> Temporary data storage for reading RRFS-SD emissions data type rrfs_sd_emissions_type + !> Number of dust variables for 12-month period integer, private :: nvar_dust12m = 5 + !> Number of emission variables. integer, private :: nvar_emi = 1 + !> Number of fire variables. integer, private :: nvar_fire = 2 + !> Number of fire variables for 2D fields. integer, private :: nvar_fire2d = 5 + !> Names of variables in the dust12m file character(len=32), pointer, dimension(:), private :: dust12m_name => null() + !> Names of variables in the emissions file character(len=32), pointer, dimension(:), private :: emi_name => null() + !> Names of variables in the fire file character(len=32), pointer, dimension(:), private :: fire_name => null() + !> Names of variables in the fire file for 2D fields character(len=32), pointer, dimension(:), private :: fire_name2d => null() + !> 3d variables from the dust12m file real(kind=kind_phys), pointer, dimension(:,:,:,:), private :: dust12m_var => null() + !> 3d variables from the emissions file real(kind=kind_phys), pointer, dimension(:,:,:,:), private :: emi_var => null() + !> 3d variables from the fire file real(kind=kind_phys), pointer, dimension(:,:,:,:), private :: fire_var => null() + !> 2d variables from the fire file real(kind=kind_phys), pointer, dimension(:,:,: ), private :: fire_var2d => null() contains @@ -98,7 +119,17 @@ module fv3atm_rrfs_sd_io ! -- RRFS_SD_STATE IMPLEMENTATION ------------------------------------ ! -------------------------------------------------------------------- - !>@ Registers the fire_aux_data_levels axis for restart I/O + !> ------------------------------------------------------------------- + !> Registers the fire_aux_data_levels axis for restart I/O + !> + !> @param data The data structure containing the model state information. + !> @param Model Model control parameters input from a nml and/or derived from others. + !> @param Sfc_restart FMS NetCDF object containing surface restart data. + !> + !> @author Samuel Trahan + !> @date 2023 + !> + !----------------------------------------------------------------------- subroutine rrfs_sd_state_register_axis(data,Model,Sfc_restart) implicit none class(rrfs_sd_state_type) :: data @@ -109,8 +140,16 @@ subroutine rrfs_sd_state_register_axis(data,Model,Sfc_restart) end subroutine rrfs_sd_state_register_axis ! -------------------------------------------------------------------- - - !>@ Registers and writes the axis indices for the fire_aux_data_levels axis + !> Registers and writes the axis indices for the fire_aux_data_levels axis + !> + !> @param data The data structure containing the model state information. + !> @param Model Model control parameters input from a nml and/or derived from others. + !> @param Sfc_restart FMS NetCDF object containing surface restart data. + !> + !> @author Samuel Trahan + !> @date 2023 + !> + !----------------------------------------------------------------------- subroutine rrfs_sd_state_write_axis(data,Model,Sfc_restart) implicit none class(rrfs_sd_state_type) :: data @@ -123,8 +162,15 @@ subroutine rrfs_sd_state_write_axis(data,Model,Sfc_restart) end subroutine rrfs_sd_state_write_axis ! -------------------------------------------------------------------- - - !>@ Allocates temporary arrays for RRFS-SD scheme I/O and stores fire_aux_data_levels axis indices + !> Allocates temporary arrays for RRFS-SD scheme I/O and stores fire_aux_data_levels axis indices + !> + !> @param data The data structure containing the model state information. + !> @param Model Model control parameters input from a nml and/or derived from others. + !> + !> @author Samuel Trahan + !> @date 2023 + !> + !----------------------------------------------------------------------- subroutine rrfs_sd_state_allocate_data(data,Model) implicit none class(rrfs_sd_state_type) :: data @@ -151,11 +197,18 @@ subroutine rrfs_sd_state_allocate_data(data,Model) end subroutine rrfs_sd_state_allocate_data ! -------------------------------------------------------------------- - - !>@brief Fills RRFS-SD temporary arrays with reasonable defaults. - !> \section rrfs_sd_state_type%fill_data() procedure - !! Fills all temporary variables with default values. - !! Terrible things will happen if you don't call data%allocate_data first. + !> Fills all temporary variables with default values. + !> Terrible things will happen if you don't call data%allocate_data first. + !> + !> @param data The data structure containing the model state information. + !> @param Model Model control parameters input from a nml and/or derived from others. + !> @param Atm_block Physics block layout information. + !> @param Sfcprop Surface properties that may be read in and/or updated by climatology or observations . + !> + !> @author Samuel Trahan + !> @date 2023 + !> + !----------------------------------------------------------------------- subroutine rrfs_sd_state_fill_data(data, Model, Atm_block, Sfcprop) implicit none class(rrfs_sd_state_type) :: data @@ -187,11 +240,19 @@ end subroutine rrfs_sd_state_fill_data ! -------------------------------------------------------------------- - !>@brief Registers RRFS-SD restart variables (for read or write) - !> \section rrfs_sd_state_type%register_fields() procedure - !! Registers all restart fields needed by the RRFS-SD - !! Terrible things will happen if you don't call data%allocate_data - !! and data%register_axes first. + !> Registers RRFS-SD restart variables (for read or write) + !> + !> Terrible things will happen if you don't call data%allocate_data + !> and data%register_axes first. + !> + !> @param data The data structure containing the model state information. + !> @param Sfc_restart FMS NetCDF object containing surface restart data. + !> + !> @author Samuel Trahan + !> @date 2023 + !> + !----------------------------------------------------------------------- + subroutine rrfs_sd_state_register_fields(data,Sfc_restart) implicit none class(rrfs_sd_state_type) :: data @@ -226,11 +287,21 @@ end subroutine rrfs_sd_state_register_fields ! -------------------------------------------------------------------- - !>@brief Creates ESMF bundles for writing RRFS-SD restarts via the write component (quilt) - !> \section rrfs_sd_state_type%bundle_fields() procedure - !! Registers all restart fields needed by the RRFS-SD - !! Terrible things will happen if you don't call data%allocate_data - !! and data%register_axes first. + !> Creates ESMF bundles for writing RRFS-SD restarts via the write component (quilt) + !> + !> Terrible things will happen if you don't call data%allocate_data + !> and data%register_axes first. + !> + !> @param data The data structure containing the model state information. + !> @param bundle The ESMF field bundle for output to restart. + !> @param grid The output ESMF grid object. + !> @param Model Model control parameters input from a nml and/or derived from others. + !> @param outputfile Full path of the output file. + !> + !> @author Samuel Trahan + !> @date 2023 + !> + !----------------------------------------------------------------------- subroutine rrfs_sd_bundle_fields(data, bundle, grid, Model, outputfile) use esmf use GFS_typedefs, only: GFS_control_type @@ -255,12 +326,19 @@ end subroutine rrfs_sd_bundle_fields ! -------------------------------------------------------------------- - !>@brief Destructor for the rrfs_sd_state_type - !> \section rrfs_sd_state_type destructor() procedure - !! Final routine for rrfs_sd_state_type, called automatically when - !! an object of that type goes out of scope. This is a wrapper - !! around data%deallocate_data() with necessary syntactic - !! differences. + !> Destructor for the rrfs_sd_state_type + !> + !> Final routine for rrfs_sd_state_type, called automatically when + !> an object of that type goes out of scope. This is a wrapper + !> around data%deallocate_data() with necessary syntactic + !> differences. + !> + !> @param data The data structure containing the model state information. + !> + !> @author Samuel Trahan + !> @date 2023 + !> + !----------------------------------------------------------------------- subroutine rrfs_sd_state_final(data) implicit none type(rrfs_sd_state_type) :: data @@ -269,11 +347,19 @@ end subroutine rrfs_sd_state_final ! -------------------------------------------------------------------- - !>@brief Deallocates internal arrays in an rrfs_sd_state_type - !> \section rrfs_sd_state_type%deallocate_data() procedure - !! Deallocates all data used, and nullifies the pointers. The data - !! object can safely be used again after this call. This is also - !! the implementation of the rrfs_sd_state_deallocate_data final routine. + !> Deallocates internal arrays in an rrfs_sd_state_type + !> rrfs_sd_state_type%deallocate_data() procedure + !> + !> Deallocates all data used, and nullifies the pointers. The data + !> object can safely be used again after this call. This is also + !> the implementation of the rrfs_sd_state_deallocate_data final routine. + !> + !> @param data The data structure containing the model state information. + !> + !> @author Samuel Trahan + !> @date 2023 + !> + !----------------------------------------------------------------------- subroutine rrfs_sd_state_deallocate_data(data) implicit none class(rrfs_sd_state_type) :: data @@ -299,10 +385,21 @@ end subroutine rrfs_sd_state_deallocate_data ! -------------------------------------------------------------------- - !>@brief Copies from rrfs_sd_state_type internal arrays to the model grid. - !> \section rrfs_sd_state_type%copy_to_grid() procedure - !! This procedure is called after reading a restart, to copy restart data - !! from the rrfs_sd_state_type to the model grid. + !> Copies from rrfs_sd_state_type internal arrays to the model grid. + !> rrfs_sd_state_type%copy_to_grid() procedure + !> + !> This procedure is called after reading a restart, to copy restart data + !> from the rrfs_sd_state_type to the model grid. + !> + !> @param data The data structure containing the model state information. + !> @param Model Model control parameters input from a nml and/or derived from others. + !> @param Atm_block Physics block layout information. + !> @param Sfcprop Surface properties that may be read in and/or updated by climatology or observations . + !> + !> @author Samuel Trahan + !> @date 2023 + !> + !----------------------------------------------------------------------- subroutine rrfs_sd_state_copy_to_grid(data, Model, Atm_block, Sfcprop) implicit none class(rrfs_sd_state_type) :: data @@ -332,11 +429,22 @@ end subroutine rrfs_sd_state_copy_to_grid ! -------------------------------------------------------------------- - !>@brief Copies from the model grid to rrfs_sd_state_type internal arrays - !> \section rrfs_sd_state_type%copy_from_grid() procedure - !! This procedure is called before writing the restart, to copy data from - !! the model grid to rrfs_sd_state_type internal arrays. The ESMF or FMS - !! restart code will write data from those arrays, not the model grid. + !> Copies from the model grid to rrfs_sd_state_type internal arrays + !> rrfs_sd_state_type%copy_from_grid() procedure + !> + !> This procedure is called before writing the restart, to copy data from + !> the model grid to rrfs_sd_state_type internal arrays. The ESMF or FMS + !> restart code will write data from those arrays, not the model grid. + !> + !> @param data The data structure containing the model state information. + !> @param Model Model control parameters input from a nml and/or derived from others. + !> @param Atm_block Physics block layout information. + !> @param Sfcprop Surface properties that may be read in and/or updated by climatology or observations . + !> + !> @author Samuel Trahan + !> @date 2023 + !> + !----------------------------------------------------------------------- subroutine rrfs_sd_state_copy_from_grid(data, Model, Atm_block, Sfcprop) implicit none class(rrfs_sd_state_type) :: data @@ -368,7 +476,16 @@ end subroutine rrfs_sd_state_copy_from_grid ! -- RRFS_SD_EMISSIONS IMPLEMENTATION -------------------------------- ! -------------------------------------------------------------------- - !>@ Allocates temporary arrays and registers variables for reading the dust12m file. + !> Allocates temporary arrays and registers variables for reading the dust12m file. + !> + !> @param data The data structure containing the model state information. + !> @param restart FMS NetCDF object containing surface restart data. + !> @param Atm_block Physics block layout information. + !> + !> @author Samuel Trahan + !> @date 2023 + !> + !----------------------------------------------------------------------- subroutine rrfs_sd_emissions_register_dust12m(data, restart, Atm_block) implicit none class(rrfs_sd_emissions_type) :: data @@ -413,7 +530,17 @@ end subroutine rrfs_sd_emissions_register_dust12m ! -------------------------------------------------------------------- - !>@ Called after register_dust12m() to copy data from internal arrays to the model grid and deallocate arrays + !> Called after register_dust12m() to copy data from internal arrays to the model grid and deallocate arrays + !> + !> @param data The data structure containing the model state information. + !> @param Model Model control parameters input from a nml and/or derived from others. + !> @param Sfcprop Surface properties that may be read in and/or updated by climatology or observations . + !> @param Atm_block Physics block layout information. + !> + !> @author Samuel Trahan + !> @date 2023 + !> + !----------------------------------------------------------------------- subroutine rrfs_sd_emissions_copy_dust12m(data, Model, Sfcprop, Atm_block) implicit none type(GFS_control_type), intent(in) :: Model @@ -453,7 +580,16 @@ end subroutine rrfs_sd_emissions_copy_dust12m ! -------------------------------------------------------------------- - !>@ Allocates temporary arrays and registers variables for reading the emissions file. + !> Allocates temporary arrays and registers variables for reading the emissions file. + !> + !> @param data The data structure containing the model state information. + !> @param restart FMS NetCDF object containing surface restart data. + !> @param Atm_block Physics block layout information. + !> + !> @author Samuel Trahan + !> @date 2023 + !> + !----------------------------------------------------------------------- subroutine rrfs_sd_emissions_register_emi(data, restart, Atm_block) implicit none class(rrfs_sd_emissions_type) :: data @@ -492,7 +628,17 @@ end subroutine rrfs_sd_emissions_register_emi ! -------------------------------------------------------------------- - !>@ Called after register_emi() to copy data from internal arrays to the model grid and deallocate arrays + !> Called after register_emi() to copy data from internal arrays to the model grid and deallocate arrays + !> + !> @param data The data structure containing the model state information. + !> @param Model Model control parameters input from a nml and/or derived from others. + !> @param Sfcprop Surface properties that may be read in and/or updated by climatology or observations . + !> @param Atm_block Physics block layout information. + !> + !> @author Samuel Trahan + !> @date 2023 + !> + !----------------------------------------------------------------------- subroutine rrfs_sd_emissions_copy_emi(data, Model, Sfcprop, Atm_block) implicit none type(GFS_control_type), intent(in) :: Model @@ -528,7 +674,17 @@ end subroutine rrfs_sd_emissions_copy_emi ! -------------------------------------------------------------------- - !>@ Allocates temporary arrays and registers variables for reading the fire data file. + !> Allocates temporary arrays and registers variables for reading the fire data file. + !> + !> @param data The data structure containing the model state information. + !> @param Model Model control parameters input from a nml and/or derived from others. + !> @param restart FMS NetCDF object containing surface restart data. + !> @param Atm_block Physics block layout information. + !> + !> @author Samuel Trahan + !> @date 2023 + !> + !----------------------------------------------------------------------- subroutine rrfs_sd_emissions_register_fire(data, Model, restart, Atm_block) implicit none class(rrfs_sd_emissions_type) :: data @@ -607,7 +763,17 @@ end subroutine rrfs_sd_emissions_register_fire ! -------------------------------------------------------------------- - !>@ Called after register_fire() to copy data from internal arrays to the model grid and deallocate arrays + !> Called after register_fire() to copy data from internal arrays to the model grid and deallocate arrays + !> + !> @param data The data structure containing the model state information. + !> @param Model Model control parameters input from a nml and/or derived from others. + !> @param Sfcprop Surface properties that may be read in and/or updated by climatology or observations. + !> @param Atm_block Physics block layout information. + !> + !> @author Samuel Trahan + !> @date 2023 + !> + !----------------------------------------------------------------------- subroutine rrfs_sd_emissions_copy_fire(data, Model, Sfcprop, Atm_block) implicit none class(rrfs_sd_emissions_type) :: data @@ -646,7 +812,19 @@ subroutine rrfs_sd_emissions_copy_fire(data, Model, Sfcprop, Atm_block) enddo end subroutine rrfs_sd_emissions_copy_fire - !>@ Destructor for rrfs_sd_emissions_type + !> Destructor for rrfs_sd_emissions_type + !> + !> Final routine for rrfs_sd_emissions_type, called automatically when + !> an object of that type goes out of scope. This is a wrapper + !> around data%deallocate_data() with necessary syntactic + !> differences. + !> + !> @param data The data structure containing the model state information. + !> + !> @author Samuel Trahan + !> @date 2023 + !> + !----------------------------------------------------------------------- subroutine rrfs_sd_emissions_final(data) implicit none type(rrfs_sd_emissions_type) :: data @@ -671,4 +849,4 @@ end subroutine rrfs_sd_emissions_final end module fv3atm_rrfs_sd_io -!> @} +!> diff --git a/io/fv3atm_sfc_io.F90 b/io/fv3atm_sfc_io.F90 index b43f514de..91382390b 100644 --- a/io/fv3atm_sfc_io.F90 +++ b/io/fv3atm_sfc_io.F90 @@ -1,9 +1,4 @@ !> @file -!> @brief Derived type and subroutines to read and write restart files -!> for most FV3ATM surface fields. -!> -!> @author Samuel Trahan @date Jun 20, 2023 - !> @brief Derived type and subroutines to read and write restart files !> for most FV3ATM surface fields. !> @@ -39,24 +34,25 @@ module fv3atm_sfc_io !> Minimum temperature allowed for snow/ice. real(kind=kind_phys), parameter :: timin = 173.0_kind_phys - + !> Orographic height above which water points must be converted to lake real(kind_phys), parameter:: min_lake_orog = 200.0_kind_phys + !> Constants zero, one real(kind_phys), parameter:: zero = 0, one = 1 !> Internal data storage type for reading and writing surface restart files type Sfc_io_data_type - integer, public :: nvar2o = 0 !< ??? - integer, public :: nvar3 = 0 !< ??? - integer, public :: nvar2r = 0 !< ??? - integer, public :: nvar2mp = 0 !< ??? - integer, public :: nvar3mp = 0 !< ??? - integer, public :: nvar2l = 0 !< ??? - integer, public :: nvar2m = 0 !< ??? - integer, public :: nvar_before_lake = 0 !< ??? + integer, public :: nvar2o = 0 !< Number of 2d NSSTM variables in restart + integer, public :: nvar3 = 0 !< Number of 3d non-NoahMP variables in restart + integer, public :: nvar2r = 0 !< number of 2d RUC lsm variables + integer, public :: nvar2mp = 0 !< Number of 2d Noah MP variables in restart + integer, public :: nvar3mp = 0 !< Number of 3d Noah MP variables in restart + integer, public :: nvar2l = 0 !< Number of Lake/Flake variables in restart + integer, public :: nvar2m = 0 !< number of 2D variables in restart that don't fall into other categories + integer, public :: nvar_before_lake = 0 !< Number of variables before lake vars !> The lsoil flag is only meaningful when reading:; logical, public :: is_lsoil = .false. - + !> Is surface file version 2 ? logical, public :: is_v2_file = .false. ! SYNONYMS: Some nvar variables had two names in fv3atm_io.F90. They have @@ -69,22 +65,22 @@ module fv3atm_sfc_io ! - nvar2mp = nvar_s2mp ! - nvar3mp = nvar_s3mp - !> ??? + !> Restart 2-dimensional variables (nx, ny, nvar2m+nvar2o+nvar2mp_nvar2r+nvarl) real(kind=kind_phys), pointer, dimension(:,:,:), public :: var2 => null() - !> ??? + !> Restart 3-dimensional ice (nx, ny, kice) real(kind=kind_phys), pointer, dimension(:,:,:), public :: var3ice => null() - !> ??? + !> Restart 3-dimensional surface variables (nx, ny,lsoil/lsoil_lsm,nvar3) real(kind=kind_phys), pointer, dimension(:,:,:,:), public :: var3 => null() - !> ??? + !> Restart snow layer ice (mm),layer liquid water(mm), temp (K) ; Noah MP LSM only real(kind=kind_phys), pointer, dimension(:,:,:,:), public :: var3sn => null() - !> ??? + !> Restart equivalent volumetric soil moisture [m3/m3]; Noah MP LSM only real(kind=kind_phys), pointer, dimension(:,:,:,:), public :: var3eq => null() - !> ??? + !> Restart snow/soil layer depth (m) ; Noah MP LSM only real(kind=kind_phys), pointer, dimension(:,:,:,:), public :: var3zn => null() - !> ??? + !> Names of 2-dimensional surface restart variables character(len=32), pointer, dimension(:), public :: name2 => null() - !> ??? + !> Names of 3-dimensional surface restart variables character(len=32), pointer, dimension(:), public :: name3 => null() contains @@ -117,10 +113,10 @@ module fv3atm_sfc_io !> Calculates all nvar counts, which record the number of fields !> of various types. These determine array sizes. !> - !> @param sfc ??? - !> @param[in] Model ??? - !> @param[in] reading ??? - !> @param[in] warm_start ??? + !> @param sfc Internal data storage type for reading and writing surface restart files + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] reading Is the subroutine is reading (true) restart files or writing restart files? + !> @param[in] warm_start logical, is this a warm start? !> !> @return .true. if any nvar counts changed, or .false. otherwise. !> @@ -202,12 +198,24 @@ function Sfc_io_calculate_indices(sfc, Model, reading, warm_start) end function Sfc_io_calculate_indices - !>@brief Allocates internal Sfc_io_data_type arrays if array sizes should change. - !> \section Sfc_io_data_type%allocate_arrays() procedure + !> brief Allocates internal Sfc_io_data_type arrays if array sizes should change. + !> + !> Sfc_io_data_type%allocate_arrays() procedure + !> !> Calls calculate_arrays() to determine if any nvar counts have changed, based !> on the new arguments. If they have changed, then arrays are reallocated. !> The arrays will need to be filled with new data at that point, as the contents - !> will be unknown. Returns .true. if arrays were reallocated, and .false. otherwise. + !> will be unknown. + !> + !> @param sfc Internal data storage type for reading and writing surface restart files + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] Atm_block Physics block layout information. + !> @param[in] reading Is the subroutine is reading (true) restart files or writing restart files? + !> @param[in] warm_start logical, is this a warm start? + !> + !> @return .true. if arrays were reallocated, and .false. otherwise. + !> + !> @author Samuel Trahan @date Jun 20, 2023 function Sfc_io_allocate_arrays(sfc, Model, Atm_block, reading, warm_start) implicit none class(Sfc_io_data_type) :: sfc @@ -271,11 +279,11 @@ end function Sfc_io_allocate_arrays !> Registers all axes for reading or writing restarts using FMS (non-quilt). !> - !> @param sfc ??? - !> @param[in] Model ??? - !> @param Sfc_restart ??? - !> @param[in] reading ??? - !> @param[in] warm_start ??? + !> @param sfc Internal data storage type for reading and writing surface restart files + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] Sfc_restart FMS NetCDF object containing surface restart data. + !> @param[in] reading Is the subroutine is reading (true) restart files or writing restart files? + !> @param[in] warm_start Is this a warm start run? !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Sfc_io_register_axes(sfc, Model, Sfc_restart, reading, warm_start) @@ -336,9 +344,9 @@ end subroutine Sfc_io_register_axes !> Writes axis index variables and related metadata for all axes !> when writing FMS (non-quilt) restarts. !> - !> @param sfc ??? - !> @param[in] Model ??? - !> @param[in] Sfc_restart ??? + !> @param sfc Internal data storage type for reading and writing surface restart files. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] Sfc_restart FMS NetCDF object containing surface restart data. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Sfc_io_write_axes(sfc, Model, Sfc_restart) @@ -409,9 +417,9 @@ end subroutine Sfc_io_write_axes !> Fills the name3d array with all surface 3D field names. !> - !> @param sfc ??? - !> @param[in] Model ??? - !> @param[in] warm_start ??? + !> @param sfc Internal data storage type for reading and writing surface restart files. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] warm_start Is this a warm start run? !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Sfc_io_fill_3d_names(sfc,Model,warm_start) @@ -448,9 +456,9 @@ end subroutine Sfc_io_fill_3d_names !> Fills the name2d array with all surface 2D field names. Updates !> nvar2m if needed. !> - !> @param sfc ??? - !> @param[in] Model ??? - !> @param[in] warm_start ??? + !> @param sfc Internal data storage type for reading and writing surface restart files. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] warm_start Is this a warm start run? !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Sfc_io_fill_2d_names(sfc,Model,warm_start) @@ -613,8 +621,15 @@ subroutine Sfc_io_fill_2d_names(sfc,Model,warm_start) endif end subroutine Sfc_io_fill_2d_names - !>@ Fills the name2d array with all surface 2D field names. Updates nvar2m if needed. - !! This routine is for v2 coldstart files. + !> Fills the name2d array with all surface 2D field names. Updates nvar2m if needed. + !> + !> This routine is for v2 coldstart files. + !> + !> @param sfc Internal data storage type for reading and writing surface restart files. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] warm_start Is this a warm start run? + !> + !> @author Samuel Trahan @date Jun 20, 2023 subroutine Sfc_io_fill_2d_names_v2(sfc,Model,warm_start) implicit none class(Sfc_io_data_type) :: sfc @@ -781,7 +796,15 @@ subroutine Sfc_io_fill_2d_names_v2(sfc,Model,warm_start) endif end subroutine Sfc_io_fill_2d_names_v2 - !>@ Registers 2D fields with FMS for reading or writing non-quilt restart files + !> Registers 2D fields with FMS for reading or writing non-quilt restart files + !> + !> @param sfc Internal data storage type for reading and writing surface restart files. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] Sfc_restart FMS NetCDF object containing surface restart data. + !> @param[in] reading Is the subroutine is reading (true) restart files or writing restart files? + !> @param[in] warm_start Is this a warm start run? + !> + !> @author Samuel Trahan @date Jun 20, 2023 subroutine Sfc_io_register_2d_fields(sfc,Model,Sfc_restart,reading,warm_start) implicit none class(Sfc_io_data_type) :: sfc @@ -926,11 +949,11 @@ end subroutine Sfc_io_register_2d_fields !> Registers 3D fields with FMS for reading or writing non-quilt !> restart files. !> - !> @param sfc ??? - !> @param[in] Model ??? - !> @param Sfc_restart ??? - !> @param[in] reading ??? - !> @param[in] warm_start ??? + !> @param sfc Internal data storage type for reading and writing surface restart files. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param Sfc_restart FMS NetCDF object containing surface restart data. + !> @param[in] reading Is the subroutine is reading (true) restart files or writing restart files? + !> @param[in] warm_start Is this a warm start run? !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Sfc_io_register_3d_fields(sfc,Model,Sfc_restart,reading,warm_start) @@ -1014,7 +1037,12 @@ subroutine Sfc_io_register_3d_fields(sfc,Model,Sfc_restart,reading,warm_start) end subroutine Sfc_io_register_3d_fields - !>@ Initializes some surface fields with reasonable defaults + !> Initializes some surface fields with reasonable defaults + !> + !> @param sfc Internal data storage type for reading and writing surface restart files. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> + !> @author Samuel Trahan @date Jun 20, 2023 subroutine Sfc_io_init_fields(sfc,Model) implicit none class(Sfc_io_data_type) :: sfc @@ -1038,13 +1066,13 @@ end subroutine Sfc_io_init_fields !> !> In addition, if override_frac_grid is provided, it will be set to Model%frac_grid. !> - !> @param sfc ??? - !> @param[in] reading ??? - !> @param[in] Model ??? - !> @param[in] Atm_block ??? - !> @param Sfcprop ??? - !> @param[in] warm_start ??? - !> @param[in] override_frac_grid ??? + !> @param sfc Internal data storage type for reading and writing surface restart files. + !> @param[in] reading Is the subroutine is reading (true) restart files or writing restart files? + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] Atm_block Physics block layout information. + !> @param[in] Sfcprop Surface properties that may be read in and/or updated by climatology or observations . + !> @param[in] warm_start Is this a warm start run? + !> @param[in] override_frac_grid Override fractional grid choice with Model%frac_grid ? !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Sfc_io_transfer(sfc, reading, Model, Atm_block, Sfcprop, warm_start, override_frac_grid) @@ -1524,12 +1552,12 @@ end subroutine Sfc_io_transfer !> Copies from Sfc_io_data_type internal arrays to the model grid by !> calling transfer() with reading=.true. !> - !> @param sfc ??? - !> @param[in] Model ??? - !> @param[in] Atm_block ??? - !> @param Sfcprop ??? - !> @param[in] warm_start ??? - !> @param[in] override_frac_grid ??? + !> @param sfc Internal data storage type for reading and writing surface restart files. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] Atm_block Physics block layout information. + !> @param[in] Sfcprop Surface properties that may be read in and/or updated by climatology or observations . + !> @param[in] warm_start Is this a warm start run? + !> @param[in] override_frac_grid Output file ESMF grid object. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Sfc_io_copy_to_grid(sfc, Model, Atm_block, Sfcprop, warm_start, override_frac_grid) @@ -1550,10 +1578,10 @@ end subroutine Sfc_io_copy_to_grid !> Copies from the model grid to Sfc_io_data_type internal arrays by !> calling transfer() with reading=.false. !> - !> @param sfc ??? - !> @param[in] Model ??? - !> @param[in] Atm_block ??? - !> @param Sfcprop ??? + !> @param sfc Internal data storage type for reading and writing surface restart files + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] Atm_block Physics block layout information. + !> @param[in] Sfcprop Surface properties that may be read in and/or updated by climatology or observations !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Sfc_io_copy_from_grid(sfc, Model, Atm_block, Sfcprop) @@ -1571,10 +1599,10 @@ end subroutine Sfc_io_copy_from_grid !> Calculates values and applies safeguards after reading restart data. !> - !> @param sfc ??? - !> @param[in] Model ??? - !> @param[in] Atm_block ??? - !> @param Sfcprop ??? + !> @param sfc Internal data storage type for reading and writing surface restart files + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] Atm_block Physics block layout information. + !> @param[in] Sfcprop Surface properties that may be read in and/or updated by climatology or observations !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Sfc_io_apply_safeguards(sfc, Model, Atm_block, Sfcprop) @@ -2003,7 +2031,7 @@ end subroutine Sfc_io_apply_safeguards !> Destructor for Sfc_io_data_type. !> - !> @param sfc ??? + !> @param sfc Internal data storage type for reading and writing surface restart files !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Sfc_io_final(sfc) @@ -2044,11 +2072,11 @@ end subroutine Sfc_io_final !> Creates ESMF bundles for 2D fields, for writing surface restart !> files using the write component (quilt). !> - !> @param sfc ??? - !> @param[inout] bundle ??? - !> @param[inout] grid ??? - !> @param[in] Model ??? - !> @param[in] outputfile ??? + !> @param sfc Internal data storage type for reading and writing surface restart files. + !> @param[inout] bundle ESMF_FieldBundle containing 2d fields for output. + !> @param[inout] grid Output file ESMF grid object. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] outputfile Full path to target output file. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Sfc_io_bundle_2d_fields(sfc, bundle, grid, Model, outputfile) @@ -2101,11 +2129,11 @@ end subroutine Sfc_io_bundle_2d_fields !> Creates ESMF bundles for 3D fields, for writing surface restart !> files using the write component (quilt). !> - !> @param sfc ??? - !> @param[inout] bundle ??? - !> @param[inout] grid ??? - !> @param[in] Model ??? - !> @param[in] outputfile ??? + !> @param sfc Internal data storage type for reading and writing surface restart files. + !> @param[inout] bundle ESMF_FieldBundle containing 3d fields for output. + !> @param[inout] grid Output file ESMF grid object. + !> @param[in] Model Model control parameters input from a nml and/or derived from others. + !> @param[in] outputfile Full path to target output file. !> !> @author Samuel Trahan @date Jun 20, 2023 subroutine Sfc_io_bundle_3d_fields(sfc, bundle, grid, Model, outputfile)