Skip to content

Commit

Permalink
more axis_type changes
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenchilutti committed Sep 14, 2023
1 parent 50fc492 commit eae88b4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions model/fv_regional_bc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,10 @@ module fv_regional_mod

#ifdef OVERLOAD_R4
real, parameter:: real_snan=real(Z'FFBFFFFF')
character(len=5), parameter :: axis_type = 'float'
#else
real, parameter:: real_snan=real(Z'FFF7FFFFFFFFFFFF')
character(len=6), parameter :: axis_type = 'double'
#endif
real(kind=R_GRID), parameter:: dbl_snan=real(Z'FFF7FFFFFFFFFFFF',kind=R_GRID)

Expand Down Expand Up @@ -5785,23 +5787,23 @@ subroutine dump_field_3d (domain, name, field, isd, ied, jsd, jed, nlev, stag)

if (open_file(fileobj, fname, "overwrite", domain)) then
call register_axis(fileobj, "grid_xt", nxg)
call register_field(fileobj, "grid_xt", "double", (/"grid_xt"/))
call register_field(fileobj, "grid_xt", axis_type, (/"grid_xt"/))
call register_variable_attribute(fileobj, "grid_xt", "axis", "X", str_len=1)
call register_variable_attribute(fileobj, "grid_xt", "units", "km", str_len=len("km"))
call register_variable_attribute(fileobj, "grid_xt", "long_name", "X distance", str_len=len("X distance"))
call register_variable_attribute(fileobj, "grid_xt", "cartesian", "X", str_len=1)
call write_data(fileobj, "grid_xt", (/(i*1.0,i=1,nxg)/))

call register_axis(fileobj, "grid_yt", nyg)
call register_field(fileobj, "grid_yt", "double", (/"grid_yt"/))
call register_field(fileobj, "grid_yt", axis_type, (/"grid_yt"/))
call register_variable_attribute(fileobj, "grid_yt", "axis", "Y", str_len=1)
call register_variable_attribute(fileobj, "grid_yt", "units", "km", str_len=len("km"))
call register_variable_attribute(fileobj, "grid_yt", "long_name", "Y distance", str_len=len("Y distance"))
call register_variable_attribute(fileobj, "grid_yt", "cartesian", "Y", str_len=1)
call write_data(fileobj, "grid_yt", (/(j*1.0,j=1,nyg)/))

call register_axis(fileobj, "lev", nz)
call register_field(fileobj, "lev", "double", (/"lev"/))
call register_field(fileobj, "lev", axis_type, (/"lev"/))
call register_variable_attribute(fileobj, "lev", "axis", "Z", str_len=1)
call register_variable_attribute(fileobj, "lev", "units", "km", str_len=len("km"))
call register_variable_attribute(fileobj, "lev", "long_name", "Z distance", str_len=len("Z distance"))
Expand Down Expand Up @@ -5904,15 +5906,15 @@ subroutine dump_field_2d (domain, name, field, isd, ied, jsd, jed, stag)

if (open_file(fileobj, fname, "overwrite", domain)) then
call register_axis(fileobj, "grid_xt", nxg)
call register_field(fileobj, "grid_xt", "double", (/"grid_xt"/))
call register_field(fileobj, "grid_xt", axis_type, (/"grid_xt"/))
call register_variable_attribute(fileobj, "grid_xt", "axis", "X", str_len=1)
call register_variable_attribute(fileobj, "grid_xt", "units", "km", str_len=len("km"))
call register_variable_attribute(fileobj, "grid_xt", "long_name", "X distance", str_len=len("X distance"))
call register_variable_attribute(fileobj, "grid_xt", "cartesian", "X", str_len=1)
call write_data(fileobj, "grid_xt", (/(i*1.0,i=1,nxg)/))

call register_axis(fileobj, "grid_yt", nyg)
call register_field(fileobj, "grid_yt", "double", (/"grid_yt"/))
call register_field(fileobj, "grid_yt", axis_type, (/"grid_yt"/))
call register_variable_attribute(fileobj, "grid_yt", "axis", "Y", str_len=1)
call register_variable_attribute(fileobj, "grid_yt", "units", "km", str_len=len("km"))
call register_variable_attribute(fileobj, "grid_yt", "long_name", "Y distance", str_len=len("Y distance"))
Expand Down

0 comments on commit eae88b4

Please sign in to comment.