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 method=esmf_regridmethod_nearest_stod
84 call
interp(localpet, method, input_vegetation_type_file)
89 if (trim(input_snowfree_albedo_file) /=
"NULL")
then
91 method=esmf_regridmethod_bilinear
92 if (trim(snowfree_albedo_method)==
"conserve") method=esmf_regridmethod_conserve
93 call
interp(localpet, method, input_snowfree_albedo_file)
99 if (trim(input_maximum_snow_albedo_file) /=
"NULL")
then
101 method=esmf_regridmethod_bilinear
102 if (trim(maximum_snow_albedo_method)==
"conserve") method=esmf_regridmethod_conserve
103 call
interp(localpet, method, input_maximum_snow_albedo_file)
110 if (trim(input_facsf_file) /=
"NULL")
then
112 method=esmf_regridmethod_bilinear
113 call
interp(localpet, method, input_facsf_file)
119 if (trim(input_substrate_temperature_file) /=
"NULL")
then
121 method=esmf_regridmethod_bilinear
122 call
interp(localpet, method, input_substrate_temperature_file)
128 if (trim(input_slope_type_file) /=
"NULL")
then
130 method=esmf_regridmethod_nearest_stod
131 call
interp(localpet, method, input_slope_type_file)
137 if (trim(input_soil_type_file) /=
"NULL")
then
139 method=esmf_regridmethod_nearest_stod
140 call
interp(localpet, method, input_soil_type_file)
146 if (trim(input_vegetation_greenness_file) /=
"NULL")
then
148 method=esmf_regridmethod_bilinear
149 if (trim(vegetation_greenness_method)==
"conserve") method=esmf_regridmethod_conserve
150 call
interp(localpet, method, input_vegetation_greenness_file)
156 if (trim(input_leaf_area_index_file) /=
"NULL")
then
158 method=esmf_regridmethod_bilinear
159 if (trim(leaf_area_index_method)==
"conserve") method=esmf_regridmethod_conserve
160 call
interp(localpet, method, input_leaf_area_index_file)
166 print*,
"- CALL ESMF_finalize"
167 call esmf_finalize(endflag=esmf_end_keepmpi, rc=rc)
169 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.
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 ...