Skip to content

Commit

Permalink
Fixed bug in heatc
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier Vegas-Regidor committed Mar 28, 2017
1 parent a3052f9 commit 0370dad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cdfheatc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ PROGRAM cdfheatc
IF ( lfull ) THEN
e3t(:,:, jk) = e31d(ik)
ELSE
e3t(:,:, jk) = getvar(cn_fzgr, 'e3t', ik, npiglo, npjglo, kimin=iimin, kjmin=ijmin, ldiom=.TRUE.)
e3t(:,:, jk) = getvar(cn_fzgr, 'e3t_ps', ik, npiglo, npjglo, kimin=iimin, kjmin=ijmin, ldiom=.TRUE.)
ENDIF
ENDIF
PRINT *, 'Compute weight'
Expand Down
7 changes: 5 additions & 2 deletions src/cdfmean.f90
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,11 @@ PROGRAM cdfmean
IF ( ierr /= 0 ) THEN
npk = getdim (cf_in, 'nav_lev', cdtrue=cv_dep, kstatus=ierr)
IF ( ierr /= 0 ) THEN
PRINT *,' assume file with no depth'
npk=0
npk = getdim (cf_in, 'lev', cdtrue=cv_dep, kstatus=ierr)
IF ( ierr /= 0 ) THEN
PRINT *,' assume file with no depth'
npk=0
ENDIF
ENDIF
ENDIF
ENDIF
Expand Down
2 changes: 1 addition & 1 deletion src/modutils.f90
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ CHARACTER(LEN=256) FUNCTION SetFileName(cdconf, cdtag, cdgrid ,ld_stop )
IF ( chkfile(SetFileName ,ld_verbose=.FALSE.) ) THEN ! look for another name
WRITE(SetFileName,'(a,"_",a,"_grid_",a,".nc")') TRIM(cdconf), TRIM(cdtag), TRIM(cdgrid)
IF ( chkfile( SetFileName, ld_verbose=.FALSE.) .AND. ll_stop ) THEN
PRINT *,' ERROR : missing grid',TRIM(cdgrid),'or even grid_',TRIM(cdgrid),' file '
PRINT *,' ERROR : missing grid ',TRIM(cdgrid),'or even grid_',TRIM(cdgrid),' file '
STOP
ENDIF
ENDIF
Expand Down

0 comments on commit 0370dad

Please sign in to comment.