39 type(esmf_regridmethod_flag
) :: method
47 print*,
"- INITIALIZE ESMF"
48 call esmf_initialize(rc=rc)
49 if(esmf_logfounderror(rctocheck=rc,msg=esmf_logerr_passthru,line=__line__,file=__file__)) &
52 print*,
"- CALL VMGetGlobal"
53 call esmf_vmgetglobal(vm, rc=rc)
54 if(esmf_logfounderror(rctocheck=rc,msg=esmf_logerr_passthru,line=__line__,file=__file__)) &
58 call esmf_vmget(vm, localpet=localpet, petcount=npets, rc=rc)
59 if(esmf_logfounderror(rctocheck=rc,msg=esmf_logerr_passthru,line=__line__,file=__file__)) &
62 print*,
'- NPETS IS ',npets
63 print*,
'- LOCAL PET ',localpet
83 if (fract_vegsoil_type)
then
84 print*,
'- WILL OUTPUT VEGETATION TYPE FRACTION AND DOMINANT CATEGORY.'
87 print*,
'- WILL OUTPUT DOMINANT VEGETATION TYPE.'
88 method=esmf_regridmethod_nearest_stod
89 call
interp(localpet, method, input_vegetation_type_file)
95 if (trim(input_snowfree_albedo_file) /=
"NULL")
then
97 method=esmf_regridmethod_bilinear
98 if (trim(snowfree_albedo_method)==
"conserve") method=esmf_regridmethod_conserve
99 call
interp(localpet, method, input_snowfree_albedo_file)
105 if (trim(input_maximum_snow_albedo_file) /=
"NULL")
then
107 method=esmf_regridmethod_bilinear
108 if (trim(maximum_snow_albedo_method)==
"conserve") method=esmf_regridmethod_conserve
109 call
interp(localpet, method, input_maximum_snow_albedo_file)
116 if (trim(input_facsf_file) /=
"NULL")
then
118 method=esmf_regridmethod_bilinear
119 call
interp(localpet, method, input_facsf_file)
125 if (trim(input_substrate_temperature_file) /=
"NULL")
then
127 method=esmf_regridmethod_bilinear
128 call
interp(localpet, method, input_substrate_temperature_file)
134 if (trim(input_slope_type_file) /=
"NULL")
then
136 method=esmf_regridmethod_nearest_stod
137 call
interp(localpet, method, input_slope_type_file)
143 if (trim(input_soil_type_file) /=
"NULL")
then
145 if (fract_vegsoil_type)
then
146 print*,
'- WILL OUTPUT SOIL TYPE FRACTION AND DOMINANT CATEGORY.'
149 print*,
'- WILL OUTPUT DOMINANT SOIL TYPE.'
150 method=esmf_regridmethod_nearest_stod
151 call
interp(localpet, method, input_soil_type_file)
158 if (trim(input_soil_color_file) /=
"NULL")
then
160 method=esmf_regridmethod_nearest_stod
161 call
interp(localpet, method, input_soil_color_file)
168 if (trim(input_vegetation_greenness_file) /=
"NULL")
then
170 method=esmf_regridmethod_bilinear
171 if (trim(vegetation_greenness_method)==
"conserve") method=esmf_regridmethod_conserve
172 call
interp(localpet, method, input_vegetation_greenness_file)
178 if (trim(input_leaf_area_index_file) /=
"NULL")
then
180 method=esmf_regridmethod_bilinear
181 if (trim(leaf_area_index_method)==
"conserve") method=esmf_regridmethod_conserve
182 call
interp(localpet, method, input_leaf_area_index_file)
188 print*,
"- CALL ESMF_finalize"
189 call esmf_finalize(endflag=esmf_end_keepmpi, rc=rc)
191 call mpi_finalize(rc)
subroutine, public source_grid_cleanup
Free up memory associated with this module.
subroutine, public define_source_grid(localpet, npets, input_file)
Defines esmf grid object for source grid.
subroutine, public model_grid_cleanup
Model grid cleanup.
subroutine, public define_model_grid(localpet, npets)
Define model grid.
This module defines the model grid.
subroutine interp_frac_cats(localpet, input_file)
Read the input source data and interpolate it to the model grid.
program driver
Reads static surface data on a global lat/lon grid, interpolates the data to the fv3 model grid...
subroutine, public error_handler(string, rc)
Handle errors.
Set up program execution.
subroutine interp(localpet, method, input_file)
Read the input source data and interpolate it to the model grid.
subroutine, public read_setup_namelist(localpet)
Read program setup namelist.
Read grid specs, date information and land/sea mask for the source data that will be interpolated to ...