Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanaEscobar committed Nov 12, 2024
1 parent 9bb38b1 commit 9aa5e09
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pkg/profiles/profiles_make_ncfile.F
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ SUBROUTINE PROFILES_MAKE_NCFILE( myThid )
JL = ILNBLNK( profilesDir )
WRITE(fnameequinc,'(3a,i3.3,a,i3.3,a)')
& profilesDir(1:JL),profFile(1:IL),'.',iG,'.',jG,'.equi.nc'
err = NF_OPEN(fnameequinc,NF_NOWRITE,
JL = ILNBLNK( fnameequinc )
err = NF_OPEN( fnameequinc(1:JL) ,NF_NOWRITE,
& fidforward(num_file,bi,bj))
ENDIF

Expand Down Expand Up @@ -184,10 +185,11 @@ SUBROUTINE PROFILES_MAKE_NCFILE( myThid )
WRITE(fnameequinc,'(3a)')
& profilesDir(1:JL),profFile(1:IL),'.equi.nc'

inquire( file=fnameequinc, exist=exst )
JL = ILNBLNK( fnameequinc )
inquire( file= fnameequinc(1:JL), exist=exst )
IF (.NOT.exst) THEN

err = NF_CREATE(fnameequinc,NF_CLOBBER,fid2)
err = NF_CREATE(fnameequinc(1:JL),NF_CLOBBER,fid2)
err = NF_DEF_DIM(fid2,'iDEPTH',Zlength,dimid1)
err = NF_DEF_DIM(fid2,'iPROF',length,dimid2)
vecid(1)=dimid1
Expand Down Expand Up @@ -215,7 +217,8 @@ SUBROUTINE PROFILES_MAKE_NCFILE( myThid )
err = NF_ENDDEF(fid2)

ELSE
err = NF_OPEN(fnameequinc, NF_WRITE, fid2)
JL = ILNBLNK( fnameequinc )
err = NF_OPEN( fnameequinc(1:JL), NF_WRITE, fid2)
ENDIF

C Write profiles
Expand Down

0 comments on commit 9aa5e09

Please sign in to comment.