-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create vertical-interp repo on Nov. 16, 2021
- Loading branch information
0 parents
commit 36b5f97
Showing
41 changed files
with
7,384 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#----------------------------------------------------------------------------- | ||
|
||
include make_rules | ||
|
||
#################################################### | ||
|
||
OBJS = module_namelist.o \ | ||
nc_get1Dint.o \ | ||
nc_get1Dvar.o \ | ||
nc_get2Dint.o \ | ||
nc_get2Dvar.o \ | ||
nc_get3Dint.o \ | ||
nc_get3Dvar.o \ | ||
nc_get4Dvar.o \ | ||
nc_get5Dvar.o \ | ||
nc_getGlobalIntAttr.o \ | ||
nc_getGlobalRealAttr.o \ | ||
nc_getGlobalCharAttr.o \ | ||
nc_put_single_int.o \ | ||
nc_put1Dvar.o \ | ||
nc_put1Dint.o \ | ||
nc_put2Dvar.o \ | ||
nc_put2Dint.o \ | ||
nc_put3Dvar.o \ | ||
nc_put3Dint.o \ | ||
nc_put4Dvar.o \ | ||
nc_put5Dvar.o \ | ||
nc_putChar.o \ | ||
nc_putAttr.o \ | ||
nc_putAxisAttr.o \ | ||
nc_putAxisIntAttr.o \ | ||
nc_putIntAttr.o \ | ||
nc_putGlobalIntAttr.o \ | ||
nc_putGlobalRealAttr.o \ | ||
nc_putGlobalCharAttr.o \ | ||
tile_module.o \ | ||
latlon_module.o \ | ||
read_weights.o \ | ||
output_tilegrid.o \ | ||
output_latlongrid.o \ | ||
interp_vars.o | ||
|
||
#################################################### | ||
|
||
deflt : clean_modulde nc4_lib fv3interp2latlon | ||
|
||
clean_modulde : | ||
$(RM) latlon_module.f90 latlon_module.mod latlon_module.o tile_module.f90 tile_module.mod tile_module.o | ||
|
||
nc4_lib : $(OBJS) | ||
$(RM) libnc4.a | ||
$(AR) libnc4.a $(OBJS) | ||
$(RANLIB) libnc4.a | ||
|
||
fv3interp2latlon : fv3interp2latlon.o | ||
$(FC) -o fv3interp2latlon.exe fv3interp2latlon.o $(FFLAGS) $(LOC_LIBS) \ | ||
libnc4.a | ||
|
||
clean : | ||
$(RM) libnc4.a $(OBJS) $(TEST_OBJS) \ | ||
*.f90 *.mod *.exe | ||
|
||
#################################################### | ||
|
||
# DEPENDENCIES : only dependencies after this line (don't remove the word DEPENDENCIES) | ||
|
||
#fv3interp2latlon.o : tile_module.o | ||
|
||
tile_module.o : tile_module.F90 | ||
|
||
latlon_module.o : latlon_module.F90 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# vertical-interp | ||
Quick setup — if you’ve done this kind of thing before | ||
or | ||
https://github.com/weihuang-jedi/vertical-interp.git | ||
Get started by creating a new file or uploading an existing file. We recommend every repository include a README, LICENSE, and .gitignore. | ||
|
||
…or create a new repository on the command line | ||
echo "# vertical-interp" >> README.md | ||
git init | ||
git add README.md | ||
git commit -m "first commit" | ||
git branch -M develop | ||
git remote add origin https://github.com/weihuang-jedi/vertical-interp.git | ||
git push -u origin develop | ||
…or push an existing repository from the command line | ||
git remote add origin https://github.com/weihuang-jedi/vertical-interp.git | ||
git branch -M develop | ||
git push -u origin develop | ||
…or import code from another repository | ||
You can initialize this repository with code from a Subversion, Mercurial, or TFS project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
!-------------------------------------------------------------------- | ||
PROGRAM fv3interp2latlon | ||
|
||
use namelist_module | ||
use tile_module | ||
use latlon_module | ||
|
||
IMPLICIT NONE | ||
|
||
type tiletype | ||
type(tilegrid), dimension(6) :: tile | ||
end type tiletype | ||
|
||
type(tiletype), dimension(max_types) :: types | ||
type(latlongrid) :: latlon | ||
integer :: n | ||
logical :: last | ||
|
||
call read_namelist('input.nml') | ||
|
||
call initialize_latlongrid(nlon, nlat, npnt, latlon) | ||
|
||
do n = 1, num_types | ||
print *, 'dirname: <', trim(dirname), & | ||
'>, data_types(', n, ') = <', trim(data_types(n)), '>' | ||
call initialize_tilegrid(types(n)%tile, trim(dirname), trim(data_types(n))) | ||
|
||
if(trim(data_types(n)) == 'fv_core.res.tile') then | ||
latlon%nlev = types(n)%tile(1)%nz | ||
else if(trim(data_types(n)) == 'sfc_data.tile') then | ||
latlon%nlay = types(n)%tile(1)%nz | ||
end if | ||
end do | ||
|
||
if(generate_weights) then | ||
call generate_weight(types(1)%tile, latlon) | ||
call write_latlongrid(latlon, wgt_flnm) | ||
else | ||
call read_weights(latlon, wgt_flnm) | ||
|
||
do n = 1, num_types | ||
last = (n == num_types) | ||
!print *, 'n = ', n | ||
!print *, 'last = ', last | ||
call generate_header(n, types(n)%tile, latlon, & | ||
trim(data_types(n)), output_flnm, last) | ||
end do | ||
|
||
do n = 1, num_types | ||
call interp2latlongrid(trim(data_types(n)), types(n)%tile, latlon) | ||
end do | ||
end if | ||
|
||
do n = 1, num_types | ||
call finalize_tilegrid(types(n)%tile) | ||
end do | ||
|
||
call closefile(latlon) | ||
call finalize_latlongrid(latlon) | ||
|
||
END PROGRAM fv3interp2latlon | ||
|
Oops, something went wrong.