New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
#1597 (in order to not use useless link) – NEMO

Opened 9 years ago

Closed 9 years ago

Last modified 3 years ago

#1597 closed Enhancement (fixed)

in order to not use useless link

Reported by: jpaul Owned by: nemo
Priority: low Milestone: 2015 release-3.6
Component: OFF Version: v3.6
Severity: Keywords: 2015 v3.6
Cc:

Description

in OFF_SRC/dtadyn.F90, when looking to fill the sf_dyn structure,
the code open a file using is basename to get dimensions.
Then it fill the structure running fld_fill.
It works well if we're using yearly climatology, however if you're using daily or monthly field you have to link one of your file to a file named wihtout suffix about year month day.
To avoid this, i propose to change the order of those operation.
If we first fill the structure running the fld_fill, then we just have to open the file using fld_clopn to get dimensions. fld_clopn manage yearly, monthly or daily field so it works for every case.

Now:

DO ifpr = 1, jfld

CALL iom_open( TRIM( cn_dir )TRIM( slf_d(ifpr)%clname ), inum )
idv = iom_varid( inum , slf_d(ifpr)%clvar ) ! id of the variable sdjf%clvar
idimv = iom_file ( inum )%ndims(idv) ! number of dimension for variable sdjf%clvar
IF( inum /= 0 ) CALL iom_close( inum ) ! close file if already open


...

END DO
! ! fill sf with slf_i and control print
CALL fld_fill( sf_dyn, slf_d, cn_dir, 'dta_dyn_init', 'Data in file', namdta_dyn' )

After:

! ! fill sf with slf_i and control print
CALL fld_fill( sf_dyn, slf_d, cn_dir, 'dta_dyn_init', 'Data in file', namdta_dyn' )
! Open file for each variable to get his number of dimension
DO ifpr = 1, jfld

CALL fld_clopn( sf_dyn(ifpr), nyear, nmonth, nday )
idv = iom_varid( sf_dyn(ifpr)%num , slf_d(ifpr)%clvar ) ! id of the variable sdjf%clvar
idimv = iom_file ( sf_dyn(ifpr)%num )%ndims(idv) ! number of dimension for variable sdjf%clvar
IF( sf_dyn(ifpr)%num /= 0 ) CALL iom_close( sf_dyn(ifpr)%num ) ! close file if already open



...

END DO


Commit History (2)

ChangesetAuthorTimeChangeLog
5768jpaul2015-09-29T12:45:56+02:00

see ticket #1597

5767jpaul2015-09-29T12:45:31+02:00

see ticket #1597

Change History (6)

comment:1 Changed 9 years ago by jpaul

Bug fix:

branches/2015/nemo_v3_6_STABLE

Committed at revision 5767

https://forge.ipsl.jussieu.fr/nemo/changeset/5767

trunk

Committed at revision 5768

https://forge.ipsl.jussieu.fr/nemo/changeset/5768

comment:2 Changed 9 years ago by jpaul

  • Resolution set to fixed
  • Status changed from new to closed

comment:3 Changed 8 years ago by nicolasmartin

  • Keywords 2015 nemo_v3_6* added

comment:4 Changed 7 years ago by nemo

  • Keywords release-3.6* added; nemo_v3_6* removed

comment:5 Changed 7 years ago by nemo

  • Keywords release-3.6* removed

comment:6 Changed 3 years ago by nemo

  • Keywords v3.6 added
Note: See TracTickets for help on using tickets.