#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)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
5768 | jpaul | 2015-09-29T12:45:56+02:00 | see ticket #1597 |
5767 | jpaul | 2015-09-29T12:45:31+02:00 | see ticket #1597 |
Change History (6)
comment:1 Changed 9 years ago by jpaul
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