Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vertical dimension and computation of z_c. #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions write_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ subroutine write_to_file(localpet)
call netcdf_err(error ,'SETTING COLLECTIVE ACCESS')
endif

error = nf90_def_var(ncid, 'Z_C', NF90_FLOAT, (/dim_lon, dim_lat, dim_zp1, dim_time/), id_z)
error = nf90_def_var(ncid, 'Z_C', NF90_FLOAT, (/dim_lon, dim_lat, dim_z, dim_time/), id_z)
call netcdf_err(error, 'DEFINING Z_C FIELD')
error = nf90_put_att(ncid, id_z, "description", "Layer center height above mean sea level")
call netcdf_err(error, 'DEFINING Z_C NAME')
Expand Down Expand Up @@ -1476,7 +1476,7 @@ subroutine write_to_file(localpet)
end do
end do

error = nf90_put_var(ncid, id_z, dum3d(:,:,1:nz_input), start = (/clb(1),clb(2),1,1/), &
error = nf90_put_var(ncid, id_z, dum3d(:,:,1:nz_input) / 9.81, start = (/clb(1),clb(2),1,1/), &
count=(/count1, count2, nz_input, 1/))
call netcdf_err(error, 'WRITING RECORD')

Expand Down